﻿@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500&family=DM+Sans:wght@300;400;500&display=swap');

:root {
    --sidebar-width: 220px;
    --sidebar-collapsed: 64px;
}

/* Store link hidden on desktop — logo in sidebar handles home navigation */
.store-link { display: none; }

/* Address page action bar */
.address-action-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.25rem;
}

/* ── LAYOUT ── */
.user-layout {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    background: #f7f5f2;
    font-family: 'DM Sans', sans-serif;
}

/* ── SIDEBAR ── */
.user-sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: #fff;
    border-right: 0.5px solid #e5e5e5;
    display: flex;
    flex-direction: column;
    transition: width 0.2s ease;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
}

    .user-sidebar.collapsed {
        width: var(--sidebar-collapsed);
    }

/* ── SIDEBAR HEADER ── */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1rem;
    border-bottom: 0.5px solid #eee;
    min-height: 64px;
}

.logo {
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
}

.logo-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    color: #1a1a1a;
}

.user-sidebar.collapsed .logo-text {
    display: none;
}

.collapse-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #aaa;
    font-size: 14px;
    padding: 4px;
    transition: color 0.15s;
    flex-shrink: 0;
}

    .collapse-btn:hover {
        color: #1a1a1a;
    }

/* ── MENU ── */
.sidebar-menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem 0.75rem;
    gap: 2px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    color: #888;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    border: none;
    background: none;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    width: 100%;
    text-align: left;
}

    .menu-item i {
        font-size: 14px;
        width: 16px;
        text-align: center;
        flex-shrink: 0;
    }

    .menu-item span {
        overflow: hidden;
        transition: opacity 0.15s;
    }

.user-sidebar.collapsed .menu-item span {
    opacity: 0;
    width: 0;
}

.menu-item:hover {
    background: #f7f5f2;
    color: #1a1a1a;
}

.menu-item.active,
.menu-item:global(.active) {
    background: #f7f5f2;
    color: #1a1a1a;
    font-weight: 500;
}

/* ── SIDEBAR FOOTER ── */
.sidebar-footer {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    gap: 2px;
    border-top: 0.5px solid #eee;
}

.menu-item.logout {
    color: #c0392b;
}

    .menu-item.logout:hover {
        background: #fef2f2;
        color: #991b1b;
    }

/* ── MAIN CONTENT ── */
.user-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    transition: margin-left 0.2s ease;
    min-height: 100vh;
    min-height: 100dvh;
}

    .user-content.collapsed {
        margin-left: var(--sidebar-collapsed);
    }

/* ── INFLUENCER STATUS BANNER ── */
.inf-status-banner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    border-radius: 14px;
    margin-bottom: 1.5rem;
    font-family: 'DM Sans', sans-serif;
    line-height: 1.5;
}

.inf-status-banner i {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.inf-status-banner strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 3px;
}

.inf-status-banner p {
    margin: 0;
    font-size: 13px;
    opacity: 0.85;
}

.inf-status-banner.pending {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.inf-status-banner.rejected {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.inf-status-banner.suspended {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    color: #374151;
}

/* ── SHARED PAGE SHELL ── */
.user-page {
    padding: 2.5rem 2rem;
    font-family: 'DM Sans', sans-serif;
}

.user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
}

    .user-header h2 {
        font-family: 'Cormorant Garamond', serif;
        font-size: 1.8rem;
        font-weight: 300;
        color: #1a1a1a;
        margin: 0;
    }

.user-card {
    background: #fff;
    border: 0.5px solid #e5e5e5;
    border-radius: 16px;
    overflow: hidden;
}

.user-empty {
    padding: 3rem 20px;
    text-align: center;
    color: #aaa;
    font-size: 13px;
    letter-spacing: 0.05em;
}

/* ── USER TABLE ── */
.user-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.user-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #aaa;
    border-bottom: 0.5px solid #eee;
}

.user-table td {
    padding: 14px 16px;
    color: #333;
    border-bottom: 0.5px solid #f5f5f5;
    vertical-align: middle;
}

.user-table tbody tr:last-child td {
    border-bottom: none;
}

.user-table tbody tr:hover td {
    background: #fafaf8;
}

/* ── STATS GRID ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 0.25rem;
}

.stat-card {
    background: #fff;
    border: 0.5px solid #e5e5e5;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f7f5f2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #555;
    flex-shrink: 0;
}

.stat-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.stat-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #aaa;
}

.stat-value {
    font-size: 1.35rem;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    color: #1a1a1a;
    line-height: 1.1;
}

.payout-table-header {
    padding: 1.25rem 1.25rem 0;
}

.payout-table-header h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-weight: 300;
    color: #1a1a1a;
    margin: 0 0 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 0.5px solid #eee;
}

.earned-amount {
    font-weight: 600;
    color: #1a7a4a;
}

/* ── STATUS BADGE ── */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.status-badge.paid {
    background: #ecfdf5;
    color: #065f46;
}

.status-badge.cancelled {
    background: #f3f4f6;
    color: #6b7280;
}

@media (max-width: 768px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }

    /* ── LAYOUT: covers full viewport, nothing outside can scroll ── */
    .user-layout {
        position: fixed;
        inset: 0;
        flex-direction: column;
        overflow: hidden;
        min-height: unset;
    }

    /* Tab bar: normal flex child — always visible at top, never moves */
    .user-sidebar,
    .user-sidebar.collapsed {
        position: static;
        width: 100%;
        min-height: auto;
        flex-shrink: 0;
        border-right: none;
        border-bottom: 0.5px solid #eee;
        box-shadow: 0 2px 10px rgba(0,0,0,.06);
        flex-direction: row;
        align-items: stretch;
        background: #fff;
        z-index: auto;
    }

    .sidebar-header,
    .collapse-btn { display: none !important; }

    /* ── TAB ROW: equal-width, no scroll ── */
    .sidebar-menu {
        flex: 1;
        flex-direction: row;
        overflow: visible;
        padding: 6px 8px;
        gap: 2px;
        border-top: none;
        mask-image: none;
        -webkit-mask-image: none;
    }

    .menu-item {
        flex: 1;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 9px 6px;
        font-size: 11px;
        font-weight: 500;
        letter-spacing: 0.02em;
        text-transform: uppercase;
        border-radius: 10px;
        color: #bbb;
        border: none;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
        min-height: 44px;
    }

    .menu-item i {
        font-size: 18px;
        width: auto;
        flex-shrink: 0;
    }

    .menu-item span {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        opacity: 1;
        width: auto;
    }

    .menu-item.active,
    .menu-item:global(.active) {
        background: #f2f0ed;
        color: #111;
        font-weight: 700;
    }

    /* ── LOGOUT: right side ── */
    .sidebar-footer {
        flex-direction: row;
        border-top: none;
        border-left: 0.5px solid #f0f0f0;
        padding: 6px 8px;
        align-self: stretch;
        align-items: center;
        flex-shrink: 0;
        gap: 0;
    }

    .sidebar-footer .menu-item {
        flex: none;
        padding: 7px 10px;
        font-size: 9.5px;
        flex-direction: column;
        gap: 3px;
        color: #e05252;
    }

    .sidebar-footer .menu-item span { display: block; }
    .sidebar-footer .menu-item:hover { background: #fff5f5; }
    .sidebar-footer .menu-item.store-link {
        display: flex;
        color: #555;
        border-right: 0.5px solid #f0f0f0;
    }
    .sidebar-footer .menu-item.store-link:hover { background: #f5f4f2; color: #111; }

    /* Content: only this scrolls — tab bar above it never moves */
    .user-content,
    .user-content.collapsed {
        margin-left: 0 !important;
        width: 100%;
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-top: 0;
    }

    .user-page { padding: 1rem 1rem 4rem; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }

    .menu-item { font-size: 8.5px; padding: 7px 2px; }
    .menu-item i { font-size: 16px; }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
