/* Publisher Dashboard Home (icopify.co) */

body.publisher-app.dashboard-home .dashboard-layout {
    display: block !important;
}

body.publisher-app.dashboard-home .dashboard-main {
    margin-left: 280px !important;
    width: calc(100% - 280px) !important;
    background: #eef1f6 !important;
    display: flex !important;
    flex-direction: column !important;
}

body.publisher-app.dashboard-home .dashboard-header {
    position: fixed !important;
    top: 0 !important;
    left: 280px !important;
    right: 0 !important;
    z-index: 250 !important;
    background: #fff !important;
    border-bottom: 1px solid #e2e8f0;
    min-height: 56px;
    justify-content: flex-end !important;
}

body.publisher-app.dashboard-home .dashboard-content,
body.pub-tasks-page.dashboard-home .dashboard-content {
    padding: 76px 24px 90px;
}

body.publisher-app.pub-affiliate-page.dashboard-home .dashboard-layout {
    display: block !important;
}

body.publisher-app.pub-affiliate-page .dashboard-main {
    margin-left: 280px !important;
    width: calc(100% - 280px) !important;
}

body.publisher-app.pub-affiliate-page .dashboard-header {
    left: 280px !important;
}

body.publisher-app.pub-affiliate-page .pub-adxom-bar {
    left: 280px;
}

@media (max-width: 992px) {
    body.publisher-app.pub-affiliate-page .dashboard-main {
        margin-left: 0 !important;
        width: 100% !important;
    }

    body.publisher-app.pub-affiliate-page .dashboard-header {
        left: 0 !important;
    }

    body.publisher-app.pub-affiliate-page .pub-adxom-bar {
        left: 0;
    }
}

body.publisher-app.dashboard-home .sidebar .nav-group-toggle.nav-group-affiliate {
    color: #94a3b8;
}

body.publisher-app.dashboard-home .sidebar .nav-group-affiliate.active-group {
    color: #fff;
}

body.publisher-app.dashboard-home .sidebar-nav {
    display: flex;
    flex-direction: column;
    flex: 1;
}

body.publisher-app.dashboard-home .pub-sidebar-promo {
    margin-top: auto;
}

/* Sidebar bottom promo */
.pub-sidebar-promo {
    margin: 16px 12px 20px;
    padding: 16px;
    border-radius: 10px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    text-align: center;
    overflow: hidden;
}

.pub-sidebar-promo-img {
    width: 100%;
    height: 88px;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 12px;
    background: url('https://images.unsplash.com/photo-1522071820081-009f0129c71c?w=400&q=80') center/cover no-repeat;
}

.pub-sidebar-promo p {
    margin: 0 0 12px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
}

.pub-sidebar-promo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 6px;
    background: linear-gradient(180deg, #4ade80, #22c55e);
    color: #0f172a;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

/* Alert bar */
.pub-alert-bar {
    background: #334155;
    color: #e2e8f0;
    font-size: 0.875rem;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.pub-alert-bar strong {
    color: #4ade80;
    font-weight: 700;
}

/* Stats */
.pub-stat-muted {
    cursor: default;
    color: #64748b !important;
}

/* Tips panel */
.pub-tips-panel .dash-panel-header {
    border-bottom: 1px solid #e2e8f0;
}

.pub-tips-list {
    list-style: none;
    margin: 0;
    padding: 8px 20px 20px;
}

.pub-tips-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.5;
    border-bottom: 1px solid #f1f5f9;
}

.pub-tips-list li:last-child {
    border-bottom: none;
}

.pub-tips-list li i {
    color: #22c55e;
    margin-top: 3px;
    flex-shrink: 0;
}

/* Balance widget */
.pub-balance-widget {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 55%, #1e40af 100%);
    border-radius: 12px;
    padding: 20px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.pub-balance-widget::after {
    content: '';
    position: absolute;
    right: -20px;
    bottom: -30px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.pub-balance-widget-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.pub-balance-label {
    font-size: 0.85rem;
    opacity: 0.95;
}

.pub-balance-widget-top i {
    font-size: 1.25rem;
    opacity: 0.9;
}

.pub-balance-amount {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.pub-balance-withdraw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #fff;
    color: #1d4ed8;
    font-weight: 700;
    font-size: 0.875rem;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
}

.pub-balance-withdraw-btn:hover {
    background: #f8fafc;
}

.pub-activity-empty {
    padding: 20px 16px;
    color: #94a3b8;
    font-size: 0.875rem;
    text-align: center;
}

/* Publisher balance pills — green, yellow, blue */
body.publisher-app .balance-pill-green { background: #22c55e; }
body.publisher-app .balance-pill-yellow { background: #eab308; }
body.publisher-app .balance-pill-blue { background: #3b82f6; }

body.publisher-app a.pub-balance-pill {
    position: relative;
    text-decoration: none;
    color: #fff;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.15s ease;
}

body.publisher-app a.pub-balance-pill:hover {
    filter: brightness(1.06);
}

body.publisher-app .pub-balance-pill-tip {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    background: #fff;
    color: #334155;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    border-radius: 4px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.14);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    z-index: 400;
}

body.publisher-app .pub-balance-pill-tip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: #fff;
}

body.publisher-app a.pub-balance-pill:hover .pub-balance-pill-tip,
body.publisher-app a.pub-balance-pill:focus-visible .pub-balance-pill-tip {
    opacity: 1;
    visibility: visible;
}

/* Adxom footer bar */
.pub-adxom-bar {
    position: fixed;
    bottom: 0;
    left: 280px;
    right: 0;
    z-index: 900;
    background: linear-gradient(90deg, #0f172a, #1e293b);
    color: #fff;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.pub-adxom-bar a {
    color: #4ade80;
    font-weight: 700;
    text-decoration: none;
}

.pub-adxom-bar strong {
    color: #fbbf24;
}

.pub-adxom-bar .btn-adxom {
    background: linear-gradient(180deg, #4ade80, #22c55e);
    color: #0f172a;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    white-space: nowrap;
}

body.publisher-app.has-adxom-bar .dashboard-content {
    padding-bottom: 100px;
}

@media (max-width: 992px) {
    body.publisher-app.dashboard-home .dashboard-main {
        margin-left: 0 !important;
        width: 100% !important;
    }

    body.publisher-app.dashboard-home .dashboard-header {
        left: 0 !important;
    }

    .pub-adxom-bar {
        left: 0;
    }
}
