*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --purple: #7F77DD;
    --purple-light: #EEEDFE;
    --purple-dark: #3C3489;
    --teal: #1D9E75;
    --teal-light: #E1F5EE;
    --coral: #D85A30;
    --coral-light: #FAECE7;
    --amber: #BA7517;
    --amber-light: #FAEEDA;
    --red-light: #FCEBEB;
    --red: #E24B4A;
    --bg: #ffffff;
    --bg2: #f5f5f3;
    --bg3: #efeeec;
    --text: #1a1a18;
    --muted: #6b6b67;
    --border: rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --radius-lg: 16px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg2);
    color: var(--text);
    line-height: 1.6;
    display: flex;
    min-height: 100vh;
}

/* ── SIDEBAR ──────────────────────────────── */
.sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--bg);
    border-right: 0.5px solid var(--border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 0 0 24px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 22px 24px 20px;
    border-bottom: 0.5px solid var(--border);
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 18px;
    text-decoration: none;
    color: var(--text);
}

.logo-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--purple);
    flex-shrink: 0;
}

.sidebar-nav {
    flex: 1;
    padding: 18px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-radius: 9px;
    font-size: 14px;
    color: var(--muted);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
}

.nav-item:hover {
    background: var(--bg2);
    color: var(--text);
}

.nav-item.active {
    background: var(--purple-light);
    color: var(--purple-dark);
    font-weight: 500;
}

.nav-item i {
    font-size: 18px;
}

.nav-section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--muted);
    padding: 12px 14px 6px;
    opacity: 0.6;
}

.sidebar-footer {
    padding: 0 12px;
    border-top: 0.5px solid var(--border);
    padding-top: 16px;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 9px;
    cursor: pointer;
    transition: background 0.15s;
}

.user-item:hover {
    background: var(--bg2);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--purple-light);
    color: var(--purple-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.user-name {
    font-size: 13px;
    font-weight: 500;
}

.user-role {
    font-size: 11px;
    color: var(--muted);
}

/* ── MAIN ─────────────────────────────────── */
.main {
    flex: 1;
    min-width: 0;
    padding: 40px 44px 60px;
}

/* ── HEADER ───────────────────────────────── */
.dash-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 36px;
    flex-wrap: wrap;
    gap: 16px;
}

.dash-header-left h1 {
    font-family: 'Syne', sans-serif;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 40px;
}

.role-badge.brand {
    background: var(--purple-light);
    color: var(--purple-dark);
}

.role-badge.creator {
    background: var(--teal-light);
    color: #085041;
}

.dash-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 40px;
    font-size: 13px;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    text-decoration: none;
}

.btn-outline {
    background: var(--bg);
    border: 0.5px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    background: var(--bg2);
}

.btn-primary {
    background: var(--purple);
    color: white;
    font-family: 'Syne', sans-serif;
    font-weight: 600;
}

.btn-primary:hover {
    opacity: 0.88;
}

/* ── STATS GRID ───────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: border-color 0.2s;
}

.stat-card:hover {
    border-color: var(--purple);
}

.stat-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-value {
    font-family: 'Syne', sans-serif;
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--muted);
}

/* ── 2-COL LAYOUT ─────────────────────────── */
.dash-cols {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    align-items: start;
}

/* ── SECTION CARD ─────────────────────────── */
.section-card {
    background: var(--bg);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.section-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 0.5px solid var(--border);
}

.section-card-title {
    font-family: 'Syne', sans-serif;
    font-size: 15px;
    font-weight: 700;
}

.section-card-link {
    font-size: 12px;
    color: var(--purple);
    cursor: pointer;
    text-decoration: none;
}

.section-card-link:hover {
    text-decoration: underline;
}

/* ── COLLABORATION ITEMS ──────────────────── */
.collab-list {
    display: flex;
    flex-direction: column;
}

.collab-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 24px;
    border-bottom: 0.5px solid var(--border);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: background 0.12s;
}

.collab-item:last-child {
    border-bottom: none;
}

.collab-item:hover {
    background: var(--bg2);
}

.collab-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 14px;
}

.collab-info {
    flex: 1;
    min-width: 0;
}

.collab-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.collab-username {
    font-size: 12px;
    color: var(--muted);
    margin-left: 6px;
    font-weight: 400;
}

.collab-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--muted);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 40px;
    font-size: 11px;
    font-weight: 500;
}

.status-pending {
    background: var(--amber-light);
    color: #633806;
}

.status-brief_sent {
    background: var(--purple-light);
    color: var(--purple-dark);
}

.status-approved {
    background: var(--teal-light);
    color: #085041;
}

.status-in_progress {
    background: #E6F1FB;
    color: #0C447C;
}

.status-delivered {
    background: var(--teal-light);
    color: #085041;
}

.status-dispute {
    background: var(--red-light);
    color: #791F1F;
}

.collab-arrow {
    color: var(--muted);
    font-size: 16px;
    flex-shrink: 0;
}

/* ── EMPTY STATE ──────────────────────────── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 48px 32px;
    color: var(--muted);
}

.empty-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--bg2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 14px;
}

.empty-state h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 13px;
    margin-bottom: 20px;
    max-width: 220px;
}

/* ── QUICK ACTIONS ────────────────────────── */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.qa-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    background: var(--bg);
    border: 0.5px solid var(--border);
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
}

.qa-btn:hover {
    border-color: var(--purple);
    background: var(--purple-light);
    color: var(--purple-dark);
}

.qa-btn:hover .qa-icon {
    background: white;
    color: var(--purple);
}

.qa-btn:hover .qa-arrow {
    color: var(--purple);
}

.qa-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--bg2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
    transition: all 0.15s;
}

.qa-label {
    flex: 1;
}

.qa-arrow {
    font-size: 14px;
    color: var(--muted);
    transition: color 0.15s;
}

/* ── DNA SCORE MINI ───────────────────────── */
.dna-mini {
    background: var(--bg);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-top: 20px;
}

.dna-mini-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.dna-mini-title {
    font-family: 'Syne', sans-serif;
    font-size: 14px;
    font-weight: 700;
}

.dna-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 40px;
    background: var(--amber-light);
    color: #633806;
}

.dna-score-big {
    font-family: 'Syne', sans-serif;
    font-size: 40px;
    font-weight: 800;
    color: var(--amber);
    line-height: 1;
    margin-bottom: 4px;
}

.dna-score-label {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 18px;
}

.dna-criteria {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dna-crit {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.dna-crit-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.dna-crit-label {
    color: var(--muted);
}

.dna-crit-val {
    font-weight: 500;
}

.dna-bar {
    height: 5px;
    background: var(--bg2);
    border-radius: 99px;
    overflow: hidden;
}

.dna-fill {
    height: 100%;
    border-radius: 99px;
}

/* ══════════════════════════════════════════════════
   RESPONSIVE
   Everything below adapts the layout above for
   tablet and phone widths. Nothing above this line
   was changed.
   ══════════════════════════════════════════════════ */

/* ── Tablet (≤968px): sidebar becomes a horizontal
      top bar (same pattern as the other dashboard
      file, for consistency across the site), and the
      1fr / 320px content split stacks to one column ── */
@media (max-width: 968px) {
    body {
        flex-direction: column;
    }

    .sidebar {
        position: sticky;
        top: 0;
        width: 100%;
        height: auto;
        flex-direction: row;
        align-items: center;
        border-right: none;
        border-bottom: 0.5px solid var(--border);
        padding: 0;
        z-index: 50;
    }

    .sidebar-logo {
        border-bottom: none;
        border-right: 0.5px solid var(--border);
        padding: 14px 18px;
        flex-shrink: 0;
    }

    .sidebar-nav {
        flex: 1;
        flex-direction: row;
        align-items: center;
        padding: 8px 10px;
        gap: 4px;
        overflow-x: auto;
    }

    .nav-item {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .nav-section-label {
        display: none;
    }

    .sidebar-footer {
        border-top: none;
        border-left: 0.5px solid var(--border);
        padding: 8px 10px;
        flex-shrink: 0;
    }

    .user-item {
        padding: 8px;
    }

    .user-name,
    .user-role {
        display: none;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dash-cols {
        grid-template-columns: 1fr;
    }
}

/* ── Tablet / large phone (≤768px) ───────────────── */
@media (max-width: 768px) {
    .main {
        padding: 24px 20px 44px;
    }

    .dash-header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 28px;
    }

    .dash-header-actions {
        width: 100%;
    }

    .dash-header-actions .btn {
        flex: 1;
        justify-content: center;
    }

    .section-card-header {
        padding: 18px 20px 14px;
    }

    .collab-item {
        padding: 12px 18px;
    }

    .dna-mini {
        padding: 18px 20px;
    }
}

/* ── Small phones (≤480px) ───────────────────────── */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 18px 20px;
    }

    .dash-header-left h1 {
        font-size: 22px;
    }

    .collab-meta {
        flex-wrap: wrap;
        row-gap: 4px;
    }

    .empty-state {
        padding: 36px 20px;
    }
}