/* ========== KLANTENPORTAAL CSS ========== */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1a1a2e;
    background: #f7f8fc;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ---------- Custom Properties ---------- */
:root {
    --primary: #186FBB;
    --primary-dark: #0f5a9a;
    --primary-light: #e8f2fc;
    --primary-glow: rgba(24,111,187,.15);
    --accent: #1b9aaa;
    --dark: #0d1b2a;
    --text: #1a1a2e;
    --text-light: #5a6377;
    --gray-100: #f7f8fc;
    --gray-200: #eef1f6;
    --gray-300: #dde2ec;
    --gray-400: #a4a4a4;
    --white: #ffffff;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow-sm: 0 2px 8px rgba(13,27,42,.06);
    --shadow-md: 0 8px 30px rgba(13,27,42,.08);
    --shadow-lg: 0 20px 60px rgba(13,27,42,.10);
    --shadow-glow: 0 8px 40px rgba(24,111,187,.18);
    --transition: .35s cubic-bezier(.4,0,.2,1);
    --sidebar-width: 290px;
    --sidebar-min-width: 220px;
    --sidebar-max-width: 340px;
    --success: #16a34a;
    --success-bg: #f0fdf4;
    --warn: #d97706;
    --warn-bg: #fffbeb;
    --danger: #dc2626;
    --danger-bg: #fef2f2;
    --info: #186FBB;
    --info-bg: #e8f2fc;
}

/* ========== LOGIN PAGE ========== */
body.login-page {
    background: linear-gradient(135deg, var(--dark) 0%, #1a2d45 50%, var(--primary-dark) 100%);
    min-height: 100vh;
}
.login-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.login-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
    width: 100%;
    max-width: 420px;
    padding: 40px;
}
.login-header {
    text-align: center;
    margin-bottom: 32px;
}
.login-logo {
    display: inline-block;
    margin-bottom: 24px;
}
.login-logo img {
    height: 40px;
    margin: 0 auto;
}
.login-header h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}
.login-header p {
    font-size: .9rem;
    color: var(--text-light);
}

/* Login form & fields */
.login-card .flash-message {
    margin: 0 0 16px;
}
.login-form,
.magic-sent-content {
    padding: 0;
}
.magic-link-fallback {
    padding: 0;
    margin-top: 12px;
}
.login-form + .magic-link-fallback {
    margin-top: 20px;
}
.magic-link-fallback + .magic-link-fallback {
    margin-top: 12px;
}
.login-form .form-group {
    margin-bottom: 20px;
}
.login-form .form-group:last-child {
    margin-bottom: 24px;
}
.login-form .form-group label {
    display: block;
    font-weight: 600;
    font-size: .85rem;
    margin-bottom: 6px;
    color: var(--text);
}
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.input-wrapper > svg {
    position: absolute;
    left: 12px;
    color: var(--gray-400);
    pointer-events: none;
    z-index: 1;
}
.input-wrapper input {
    width: 100%;
    padding: 12px 14px 12px 38px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: .95rem;
    font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
    background: var(--white);
    color: var(--text);
}
.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.toggle-password {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color .2s;
}
.toggle-password:hover { color: var(--text); }

/* Login email badge (step 2) */
.login-email-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: .88rem;
    color: var(--text);
    margin-bottom: 24px;
}
.login-email-badge svg { color: var(--text-light); flex-shrink: 0; }
.login-email-badge .change-email {
    margin-left: auto;
    color: var(--primary);
    font-size: .82rem;
    font-weight: 500;
}
.login-email-badge .change-email:hover { text-decoration: underline; }

/* Login buttons */
.btn-login {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: .95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-login:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}
.btn-outline-login {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    margin-top: 16px;
    text-align: center;
}
.btn-outline-login:hover {
    background: var(--primary);
    color: var(--white);
}
.btn-magic-link {
    width: 100%;
    padding: 12px;
    background: var(--gray-100);
    color: var(--text);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: .88rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-magic-link:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

/* 2FA step */
.twofa-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
    color: var(--primary);
}
.twofa-info {
    text-align: center;
    font-size: .88rem;
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Magic link sent */
.magic-sent-content {
    text-align: center;
}
.magic-sent-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}
.magic-sent-icon svg { color: var(--primary); }
.magic-sent-content h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.15rem;
    color: var(--dark);
    margin-bottom: 8px;
}
.magic-sent-content > p {
    font-size: .9rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 20px;
}
.magic-sent-tips {
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    text-align: left;
    margin-bottom: 20px;
}
.magic-sent-tips p {
    font-size: .85rem;
    color: var(--text);
    margin-bottom: 6px;
}
.magic-sent-tips ul {
    list-style: disc;
    padding-left: 18px;
}
.magic-sent-tips li {
    font-size: .83rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* Back link */
.back-to-login {
    display: block;
    text-align: center;
    padding: 0;
    margin-top: 16px;
    font-size: .88rem;
    color: var(--primary);
    font-weight: 500;
}
.back-to-login:hover { text-decoration: underline; }

/* Login footer */
.login-footer {
    text-align: center;
    padding: 16px;
    margin-top: 16px;
}
.login-footer p {
    font-size: .8rem;
    color: rgba(255,255,255,.5);
}

/* ========== PORTAL LAYOUT ========== */
.portal-layout {
    display: flex;
    min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.portal-sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-min-width);
    max-width: var(--sidebar-max-width);
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform .3s ease;
}
.sidebar-header {
    padding: 28px 20px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.sidebar-logo {
    display: block;
    line-height: 0;
}
.sidebar-logo img { height: 80px; width: auto; }
.sidebar-logo .logo-dark { display: none; }
.mobile-header-logo .logo-dark { display: none; }
.mobile-header-logo img { height: 28px; width: auto; object-fit: contain; }
.sidebar-brand h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
}
.sidebar-brand span {
    font-size: .75rem;
    color: var(--text-light);
}
.sidebar-nav {
    flex: 1;
    padding: 10px 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}
.sidebar-nav::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}
.sidebar-nav a,
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-light);
    transition: all .2s;
    min-width: 0;
}
.sidebar-nav a:hover {
    background: var(--gray-100);
    color: var(--text);
}
.sidebar-nav a.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}
.sidebar-nav a svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: .7;
}
.sidebar-nav a.active svg { opacity: 1; }
.sidebar-user {
    padding: 16px 16px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: .8rem;
    font-weight: 700;
    flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-info .name {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-user-info .email {
    font-size: .75rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 8px 4px;
}
.sidebar-footer {
    border-top: 1px solid var(--gray-200);
    padding: 12px;
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px;
}
.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: .8rem;
    font-weight: 700;
    flex-shrink: 0;
}
.sidebar-user-info {
    flex: 1; 
    min-width: 0; 
    display: flex;
    flex-direction: column;
}
.sidebar-user-name {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-user-company {
    font-size: .75rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.logout-link {
    margin-top: 4px;
    color: var(--text-light) !important;
}
.logout-link:hover {
    background: var(--danger-bg) !important;
    color: var(--danger) !important;
}
.sidebar-close {
    display: none;
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: var(--text-light);
    border-radius: 6px;
    transition: all .2s;
    margin-left: auto;
}
.sidebar-close:hover {
    background: var(--gray-100);
    color: var(--text);
}

/* ---------- Mobile Header ---------- */
.portal-mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    z-index: 99;
    align-items: center;
    padding: 0 16px;
    justify-content: space-between;
}
.mobile-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.mobile-logo img { height: 28px; }
.mobile-menu-toggle {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background .2s;
}
.mobile-menu-toggle:hover { background: var(--gray-100); }
.mobile-profile-btn {
    display: flex;
    align-items: center;
}
.mobile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: .75rem;
    font-weight: 700;
}
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(13,27,42,.4);
    z-index: 99;
    backdrop-filter: blur(2px);
}
.sidebar-overlay.visible {
    display: block;
}

/* ---------- Main Content ---------- */
.portal-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 32px;
    min-height: 100vh;
    animation: pageReveal .4s ease-out both;
}
@keyframes pageReveal {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ========== PAGE HEADER ========== */
.page-header {
    margin-bottom: 28px;
}
.page-header.with-back {
    margin-bottom: 28px;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .84rem;
    font-weight: 500;
    color: var(--text-light);
    padding: 6px 14px 6px 10px;
    border-radius: 8px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    transition: all .2s;
    margin-bottom: 16px;
}
.back-link:hover {
    color: var(--primary);
    background: var(--primary-light);
    border-color: var(--primary);
}
.back-link svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    transition: transform .2s;
}
.back-link:hover svg {
    transform: translateX(-2px);
}
.page-header-main {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.header-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.page-header h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--dark);
}
.page-header p {
    color: var(--text-light);
    font-size: .92rem;
    margin-top: 4px;
}
.page-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* ========== PORTAL CARDS ========== */
.portal-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    padding: 24px;
    transition: box-shadow .25s;
}
.portal-card + .portal-card {
    margin-top: 20px;
}
.dashboard-grid > .portal-card + .portal-card,
.detail-grid > .portal-card + .portal-card {
    margin-top: 0;
}
.portal-card:hover { box-shadow: var(--shadow-md); }
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}
.card-header h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
}
.card-header .view-all {
    font-size: .85rem;
    color: var(--primary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: gap .2s;
}
.card-header .view-all:hover { gap: 8px; }
.card-header .view-all svg { width: 16px; height: 16px; }
.card-hint {
    font-size: .78rem;
    color: var(--text-light);
    font-style: italic;
}

/* ========== STATS GRID ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-icon.green { background: var(--success-bg); color: var(--success); }
.stat-icon.orange { background: var(--warn-bg); color: var(--warn); }
.stat-icon.purple { background: #f3e8ff; color: #7c3aed; }
.stat-icon svg { width: 22px; height: 22px; }
.stat-info h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
}
.stat-info p {
    font-size: .82rem;
    color: var(--text-light);
    margin-top: 2px;
}

/* ========== DASHBOARD GRID ========== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}
.dashboard-grid > .portal-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}
.dashboard-grid .portal-card.full-width {
    grid-column: 1 / -1;
}

/* ========== DATA TABLE ========== */
.portal-table {
    width: 100%;
    border-collapse: collapse;
}
.portal-table th {
    text-align: left;
    padding: 10px 14px;
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: .05em;
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
}
.portal-table td {
    padding: 12px 14px;
    font-size: .9rem;
    border-bottom: 1px solid var(--gray-200);
    vertical-align: middle;
}
.portal-table tbody tr {
    transition: background .15s;
}
.portal-table tbody tr:hover {
    background: var(--gray-100);
}
.portal-table tbody tr:last-child td {
    border-bottom: none;
}
.portal-table a.row-link {
    color: var(--primary);
    font-weight: 500;
}
.portal-table a.row-link:hover {
    text-decoration: underline;
}
.table-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(24, 111, 187, .07);
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.table-action:hover {
    background: rgba(24, 111, 187, .14);
    color: var(--primary-dark);
}
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ========== STATUS BADGES ========== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: .76rem;
    font-weight: 600;
    white-space: nowrap;
}
.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.badge-pending { background: #dbeafe; color: #1e40af; }
.badge-pending::before { background: #1e40af; }
.badge-accepted, .badge-active, .badge-paid { background: var(--success-bg); color: var(--success); }
.badge-accepted::before, .badge-active::before, .badge-paid::before { background: var(--success); }
.badge-rejected, .badge-cancelled, .badge-overdue { background: var(--danger-bg); color: var(--danger); }
.badge-rejected::before, .badge-cancelled::before, .badge-overdue::before { background: var(--danger); }
.badge-on_hold { background: var(--gray-200); color: var(--text-light); }
.badge-on_hold::before { background: var(--gray-400); }
.badge-expired { background: #fff7ed; color: #c2410c; }
.badge-expired::before { background: #c2410c; }
.badge-processed { background: #f0fdf4; color: #166534; }
.badge-processed::before { background: #166534; }
.badge-planning { background: var(--info-bg); color: var(--info); }
.badge-planning::before { background: var(--info); }
.badge-draft { background: var(--gray-200); color: var(--text-light); }
.badge-draft::before { background: var(--gray-400); }
.badge-completed { background: #f0fdf4; color: #166534; }
.badge-completed::before { background: #166534; }
.badge-in_progress { background: #fff7ed; color: #c2410c; }
.badge-in_progress::before { background: #c2410c; }
.badge-unpaid { background: #fff7ed; color: #c2410c; }
.badge-unpaid::before { background: #c2410c; }

/* ========== FILTER BAR ========== */
.filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.filter-btn {
    padding: 8px 16px;
    border-radius: 50px;
    font-size: .82rem;
    font-weight: 500;
    border: 2px solid var(--gray-200);
    background: var(--white);
    color: var(--text-light);
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
    white-space: nowrap;
}
.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.filter-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ========== PROGRESS BAR ========== */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 4px;
    transition: width .6s ease;
}
.progress-text {
    font-size: .82rem;
    color: var(--text-light);
    margin-top: 4px;
}

/* ========== DETAIL VIEW ========== */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: stretch;
}
.detail-grid > .portal-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}
.detail-grid > .portal-card > .detail-rows {
    flex: 1;
}
.detail-grid .full-width { grid-column: 1 / -1; }
.detail-rows { display: flex; flex-direction: column; }
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-200);
    gap: 16px;
}
.detail-row:last-child { border-bottom: none; }
.detail-label {
    font-size: .85rem;
    color: var(--text-light);
    flex-shrink: 0;
    min-width: 120px;
}
.detail-value {
    font-size: .9rem;
    color: var(--text);
    font-weight: 500;
    text-align: right;
}
.detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.detail-header h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}
.detail-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .85rem;
    color: var(--text-light);
    margin-bottom: 16px;
    transition: color .2s;
}
.btn-back:hover { color: var(--primary); }
.btn-back svg { width: 16px; height: 16px; }

/* ========== BUTTONS ========== */
.btn-save {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}
.btn-save:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}
.btn-outline-sm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: .85rem;
    font-weight: 500;
    color: var(--text);
    background: var(--white);
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
}
.btn-outline-sm:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.btn-outline-sm svg { width: 16px; height: 16px; }
.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--danger);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}
.btn-danger:hover {
    background: #b91c1c;
    box-shadow: 0 4px 20px rgba(220,38,38,.25);
    transform: translateY(-1px);
}
.btn-danger-text {
    background: none;
    border: none;
    color: var(--danger);
    font-size: .85rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    padding: 8px 0;
    margin-top: 8px;
}
.btn-danger-text:hover { text-decoration: underline; }
.btn-pay {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--success);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}
.btn-pay:hover {
    background: #15803d;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(22,163,74,.3);
}
.btn-pay-sm {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    background: var(--success);
    color: var(--white);
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all .2s;
}
.btn-pay-sm:hover {
    background: #15803d;
    box-shadow: 0 2px 10px rgba(22,163,74,.3);
}
.btn-copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--gray-100);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: .85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
    color: var(--text);
    margin-top: 12px;
}
.btn-copy:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ========== FORMS ========== */
.profile-form .form-group {
    margin-bottom: 16px;
}
.profile-form .form-group label {
    display: block;
    font-weight: 600;
    font-size: .85rem;
    margin-bottom: 6px;
    color: var(--text);
}
.profile-form .form-group input,
.profile-form .form-group select,
.profile-form .form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
    background: var(--white);
    color: var(--text);
}
.profile-form .form-group input:focus,
.profile-form .form-group select:focus,
.profile-form .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-hint {
    display: block;
    font-size: .78rem;
    color: var(--text-light);
    margin-top: 4px;
}
.form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* ========== FLASH MESSAGES ========== */
.flash-message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: .88rem;
    font-weight: 500;
    margin-bottom: 20px;
    animation: flashIn .3s ease;
}
@keyframes flashIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.flash-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid #bbf7d0;
}
.flash-error {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid #fecaca;
}
.flash-info {
    background: var(--info-bg);
    color: var(--info);
    border: 1px solid #bfdbfe;
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}
.empty-state svg { color: var(--gray-400); margin: 0 auto 16px; }
.empty-state h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    color: var(--dark);
    margin-bottom: 6px;
}
.empty-state p {
    color: var(--text-light);
    font-size: .88rem;
}

/* ========== PROJECTS GRID ========== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
}
.project-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    padding: 20px;
    transition: all .25s;
    display: flex;
    flex-direction: column;
}
.project-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.project-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.project-card-header h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
}
.project-meta {
    display: flex;
    gap: 16px;
    margin-top: auto;
    padding-top: 12px;
    font-size: .82rem;
    color: var(--text-light);
}
.project-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}
.project-meta svg { width: 14px; height: 14px; }
.priority-badge {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.priority-high { background: var(--danger-bg); color: var(--danger); }
.priority-medium { background: var(--warn-bg); color: var(--warn); }
.priority-low { background: var(--success-bg); color: var(--success); }

/* ========== PAYMENT BANNER ========== */
.payment-banner {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
}
.payment-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.payment-banner-text h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
}
.payment-banner-text p {
    color: rgba(255,255,255,.8);
    font-size: .88rem;
    margin-top: 2px;
}
.payment-banner-hint {
    color: rgba(255,255,255,.7);
    font-size: .85rem;
    font-style: italic;
}
.overdue-banner {
    background: linear-gradient(135deg, #dc2626, #991b1b);
}

/* ========== PAYMENT TASKS (dashboard) ========== */
.payment-tasks-card {
    border-left: 4px solid var(--warn);
    margin-bottom: 20px;
}
.payment-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.payment-task-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    transition: background .2s;
    gap: 12px;
}
.payment-task-item:hover {
    background: var(--warn-bg);
}
.payment-task-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-decoration: none;
}
.payment-task-number {
    font-weight: 600;
    font-size: .9rem;
    color: var(--primary);
}
.payment-task-date {
    font-size: .8rem;
    color: var(--text-light);
}
.payment-task-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.payment-task-amount {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.payment-task-action {
    font-size: .82rem;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
}

/* ========== INVOICE LIST (dashboard) ========== */
.invoice-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.invoice-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    transition: background .15s;
}
.invoice-item:hover { background: var(--gray-100); }
.invoice-item.overdue {
    border-left: 3px solid var(--danger);
}
.invoice-item-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-decoration: none;
    min-width: 0;
}
.invoice-item-left:hover .invoice-number { text-decoration: underline; }
.invoice-number {
    font-weight: 600;
    font-size: .92rem;
    color: var(--primary);
}
.invoice-date {
    font-size: .82rem;
    color: var(--text-light);
}
.overdue-badge {
    display: inline-block;
    font-size: .72rem;
    font-weight: 600;
    color: var(--danger);
    background: rgba(220, 38, 38, .08);
    padding: 2px 8px;
    border-radius: 20px;
    width: fit-content;
    margin-top: 2px;
}
.invoice-item-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.invoice-amount {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* ========== CREDIT LINK ========== */
.credit-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: color .2s;
}
.credit-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ========== TASK LIST ========== */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.task-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-200);
    font-size: .9rem;
}
.task-item:last-child { border-bottom: none; }
.task-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.task-check.done {
    background: var(--success);
    border-color: var(--success);
    color: var(--white);
}
.task-check.done svg { width: 12px; height: 12px; }
.task-item.done .task-name {
    text-decoration: line-through;
    color: var(--text-light);
}

/* ========== ACTIVITY TIMELINE ========== */
.portal-card.activity-card {
    margin-top: 8px;
}
.activity-timeline { display: flex; flex-direction: column; }
.timeline-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    transition: background .15s;
    margin: 0 -20px;
    border-radius: 8px;
    position: relative;
}
.timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 37px;
    top: 50px;
    bottom: -14px;
    width: 2px;
    background: var(--gray-200);
}
.timeline-item:hover { background: var(--gray-100); }
.timeline-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.timeline-icon.timeline-success { background: #f0fdf4; color: #166534; }
.timeline-icon.timeline-blue { background: #dbeafe; color: #1e40af; }
.timeline-icon.timeline-orange { background: #fff7ed; color: #c2410c; }
.timeline-icon.timeline-danger { background: var(--danger-bg); color: var(--danger); }
.timeline-icon.timeline-grey { background: var(--gray-200); color: var(--text-light); }
.timeline-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.timeline-title {
    font-size: .9rem;
    font-weight: 600;
    color: var(--text);
}
.timeline-sub {
    font-size: .8rem;
    color: var(--text-light);
}
.timeline-date {
    font-size: .78rem;
    color: var(--text-light);
    white-space: nowrap;
    flex-shrink: 0;
    background: var(--gray-100);
    padding: 3px 10px;
    border-radius: 12px;
}

/* ========== PROFILE / SECURITY ========== */
.security-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.security-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 600;
}
.security-status.active {
    background: var(--success-bg);
    color: var(--success);
}
.security-status.inactive {
    background: var(--gray-200);
    color: var(--text-light);
}
.security-description {
    color: var(--text-light);
    font-size: .88rem;
    margin-bottom: 20px;
    line-height: 1.5;
}
.remove-password-form {
    border-top: 1px solid var(--gray-200);
    padding-top: 12px;
    margin-top: 16px;
}

/* 2FA Setup */
.twofa-setup-steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 20px;
}
.setup-step {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 700;
    flex-shrink: 0;
}
.step-content h4 {
    font-size: .92rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}
.step-content p {
    font-size: .85rem;
    color: var(--text-light);
}
.qrcode-container {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 16px;
    display: inline-block;
    margin: 12px 0;
}
.manual-key {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .85rem;
    color: var(--text-light);
}
.manual-key code {
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    padding: 6px 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: .85rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 1px;
    user-select: all;
}
.profile-form.inline {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}
.profile-form.inline .form-group { margin-bottom: 0; }
.profile-form.inline input { width: 140px; }

/* Recovery codes */
.recovery-card {
    border: 2px solid var(--warn);
    margin-bottom: 20px;
}
.recovery-warning {
    font-size: .88rem;
    color: var(--text);
    margin-bottom: 16px;
    line-height: 1.5;
}
.recovery-codes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}
.recovery-code {
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    padding: 8px 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: .9rem;
    font-weight: 600;
    text-align: center;
    color: var(--text);
    user-select: all;
}

/* ========== PROFILE HERO ========== */
.profile-hero { margin-bottom: 0; }
.profile-hero-inner {
    display: flex;
    align-items: center;
    gap: 20px;
}
.profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #2d8fe8);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    flex-shrink: 0;
    font-family: var(--font-heading);
}
.profile-hero-info h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 2px;
    color: var(--text);
}
.profile-company {
    font-size: .88rem;
    color: var(--text-light);
    margin-bottom: 2px;
}
.profile-email {
    font-size: .85rem;
    color: var(--text-light);
}
.profile-security-badges {
    display: flex;
    gap: 8px;
    margin-left: auto;
}
.security-badge {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    opacity: .5;
    transition: all .2s;
}
.security-badge.active {
    background: var(--success-bg);
    border-color: var(--success);
    color: var(--success);
    opacity: 1;
}
.profile-change-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    color: var(--text-light);
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-200);
}

/* ========== SECURITY CARDS ========== */
.security-card { overflow: hidden; }
.security-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-100);
}
.security-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    flex-shrink: 0;
}
.security-card-icon.active {
    background: var(--success-bg);
    color: var(--success);
}
.security-card-title { flex: 1; }
.security-card-title h3 {
    font-size: .95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}
.security-card-title p {
    font-size: .82rem;
    color: var(--text-light);
}
.security-card-body {
    padding-top: 16px;
}
.security-card-footer {
    border-top: 1px solid var(--gray-100);
    padding-top: 12px;
    margin-top: 16px;
}
.security-enabled-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .88rem;
    color: var(--success);
    background: var(--success-bg);
    padding: 10px 14px;
    border-radius: 8px;
}
.password-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
}
.password-dots {
    font-size: 1.1rem;
    letter-spacing: 3px;
    color: var(--text);
}
.form-actions-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}
.security-hidden-form {
    display: none;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
}
.security-hidden-form.visible {
    display: block;
}
.security-note {
    color: var(--text-light);
    font-size: .82rem;
}

/* ========== PASSKEY LIST ========== */
.passkey-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.passkey-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--gray-50, #f8f9fb);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
}
.passkey-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}
.passkey-info svg { color: var(--primary); flex-shrink: 0; }
.passkey-info strong {
    display: block;
    font-size: .88rem;
    font-weight: 600;
}
.passkey-info small {
    display: block;
    font-size: .78rem;
    color: var(--text-light);
    margin-top: 1px;
}
.passkey-name-form {
    margin-top: 14px;
    padding: 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    background: var(--gray-50, #f8f9fb);
}
.passkey-name-form label {
    display: block;
    font-size: .88rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}
.passkey-name-form input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-family: inherit;
    color: var(--text);
    background: var(--white);
    transition: border-color .2s, box-shadow .2s;
    margin-bottom: 10px;
}
.passkey-name-form input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.passkey-name-actions {
    display: flex;
    gap: 8px;
}

/* ========== LOGIN DIVIDER ========== */
.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    color: var(--text-light);
    font-size: .82rem;
}
.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}
.btn-passkey-login {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-400);
    border-radius: var(--radius-sm);
    background: var(--white);
    font-size: .88rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all .2s;
}
.btn-passkey-login:hover {
    background: var(--gray-100);
    border-color: var(--primary);
    color: var(--primary);
}
.btn-passkey-login.loading {
    pointer-events: none;
    opacity: .7;
}
.btn-passkey-login .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--gray-300);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .6s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.passkey-login-error {
    font-size: .82rem;
    color: var(--danger, #dc2626);
    text-align: center;
    margin-top: 10px;
    padding: 8px 12px;
    background: var(--danger-bg, #fef2f2);
    border-radius: var(--radius-sm);
    display: none;
}

/* ========== FULLSCREEN LOADING OVERLAY ========== */
.passkey-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: linear-gradient(135deg, var(--dark) 0%, #1a2d45 50%, var(--primary-dark) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}
.passkey-loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}
.passkey-loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255,255,255,.15);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
.passkey-loading-overlay p {
    color: rgba(255,255,255,.85);
    font-size: 1rem;
    font-weight: 500;
}
.passkey-loading-overlay .loading-logo {
    height: 50px;
    opacity: .9;
}

/* ========== PORTAL TABS ========== */
.tab-container { margin-top: 0; }
.portal-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 24px;
}
.tab-btn {
    padding: 12px 20px;
    border: none;
    background: none;
    font-size: .9rem;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    font-family: inherit;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all .2s;
}
.tab-btn:hover {
    color: var(--primary);
}
.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}

/* ========== MODAL ========== */
.portal-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(13,27,42,.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalFadeIn .2s ease;
}
@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.portal-modal {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 480px;
    animation: modalSlideIn .25s ease;
}
@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-20px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.portal-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 0;
}
.portal-modal-header h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark);
}
.portal-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color .2s;
}
.portal-modal-close:hover { color: var(--dark); }
.portal-modal-body {
    padding: 16px 24px;
    color: var(--text);
    font-size: .92rem;
    line-height: 1.6;
}
.portal-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px 20px;
}

/* ========== UTILITY CLASSES ========== */
.text-danger { color: var(--danger) !important; }
.text-success { color: var(--success) !important; }

/* ========== RELATED ITEMS LIST ========== */
.related-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}
.related-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    font-size: .88rem;
    transition: background .2s;
}
.related-item:hover {
    background: var(--gray-200);
}
.related-item a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}
.related-item a:hover {
    text-decoration: underline;
}

/* ========== PRIORITY BADGES ========== */
.priority-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
}
.priority-badge.low {
    background: #16a34a1f;
    color: var(--success);
}
.priority-badge.normal {
    background: #16a34a1f;
    color: var(--success);
}
.priority-badge.high {
    background: #d976061f;
    color: var(--warn);
}
.priority-badge.critical {
    background: #dc26261f;
    color: var(--danger);
}

/* ========== DETAIL STACK LAYOUT ========== */
.detail-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* --- Info Grid (label/value pairs) --- */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px 32px;
}
.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.info-item.full {
    grid-column: 1 / -1;
}
.info-item-label {
    font-size: .78rem;
    font-weight: 500;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.info-item-value {
    font-size: .92rem;
    color: var(--text);
    font-weight: 500;
}

/* --- Card Actions (buttons bar) --- */
.card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid var(--gray-200);
}

/* --- Items Table (line items) --- */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -24px;
    padding: 0 24px;
}
.items-table {
    width: 100%;
    border-collapse: collapse;
}
.items-table th {
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-light);
    padding: 10px 14px;
    text-align: left;
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
    background: var(--gray-100);
}
.items-table td {
    padding: 14px 14px;
    font-size: .88rem;
    color: var(--text);
    border-bottom: 1px solid var(--gray-200);
    vertical-align: top;
}
.items-table tbody tr:last-child td {
    border-bottom: none;
}
.items-table tbody tr:hover td {
    background: var(--gray-100);
}
.col-product {
    white-space: nowrap;
    min-width: 120px;
}
.col-desc {
    white-space: pre-line;
    line-height: 1.55;
    max-width: 440px;
    font-size: .85rem;
    color: var(--text-light);
}
.col-number {
    text-align: center;
    white-space: nowrap;
}
.items-table th.col-number { text-align: center; }
.col-price {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.items-table th.col-price { text-align: right; }
.col-total {
    font-weight: 600;
}

/* --- Totals Section --- */
.totals-section {
    display: flex;
    justify-content: flex-end;
    padding: 20px 0 0;
    border-top: 2px solid var(--gray-200);
}
.totals-table {
    width: 280px;
    border-collapse: collapse;
}
.totals-table td {
    padding: 5px 0;
    font-size: .9rem;
    font-variant-numeric: tabular-nums;
}
.totals-label {
    color: var(--text-light);
    font-weight: 400;
    padding-right: 24px;
}
.totals-amount {
    text-align: right;
    white-space: nowrap;
    font-weight: 500;
    color: var(--text);
}
.totals-grand {
    border-top: 2px solid var(--dark);
}
.totals-grand td {
    padding-top: 12px !important;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--dark);
}

/* --- Progress Bar (project detail) --- */
.progress-bar.large {
    height: 12px;
    border-radius: 6px;
    margin-bottom: 8px;
}
.progress-percentage {
    font-size: .95rem;
    font-weight: 700;
    color: var(--primary);
}
.progress-detail {
    font-size: .82rem;
    color: var(--text-light);
}
.progress-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.progress-fill.overdue {
    background: linear-gradient(90deg, var(--danger), #e85d5d);
}

/* ========== WELCOME BANNER ========== */
.portal-welcome {
    background: linear-gradient(135deg, var(--primary) 0%, #2d8fe8 50%, var(--accent) 100%);
    border-radius: var(--radius);
    padding: 32px 36px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(24,111,187,.18);
}
.portal-welcome::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.portal-welcome::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: 10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.welcome-text {
    position: relative;
    z-index: 1;
}
.welcome-text h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.65rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}
.welcome-text p {
    color: rgba(255,255,255,.85);
    font-size: .95rem;
}

/* ========== STAT CARD ICON VARIANTS ========== */
.stat-icon.quotes-icon {
    background: linear-gradient(135deg, #e8f2fc, #d4e8fa);
    color: var(--primary);
}
.stat-icon.projects-icon {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    color: var(--success);
}
.stat-icon.invoices-icon {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    color: var(--warn);
}
.stat-icon.paid-icon {
    background: linear-gradient(135deg, #f0fdf4, #bbf7d0);
    color: #15803d;
}
.stat-card {
    position: relative;
    overflow: hidden;
    transition: all .3s cubic-bezier(.4,0,.2,1);
}
.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity .3s;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.stat-card:hover::after {
    opacity: 1;
}
.stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
    display: block;
}
.stat-label {
    font-size: .82rem;
    color: var(--text-light);
    display: block;
    margin-top: 2px;
}
.stat-badge {
    display: inline-flex;
    align-items: center;
    font-size: .72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    margin-left: auto;
    align-self: flex-start;
    white-space: nowrap;
}
.stat-badge.pending {
    background: var(--warn-bg);
    color: var(--warn);
}
.stat-badge.warning {
    background: var(--danger-bg);
    color: var(--danger);
}

/* ========== ENHANCED BACKGROUND ========== */
body:not(.login-page) {
    background: linear-gradient(160deg, #f0f4fa 0%, #f7f8fc 40%, #f0f7ff 100%);
    background-attachment: fixed;
}

/* ========== ENHANCED CARDS ========== */
.portal-card {
    transition: all .3s cubic-bezier(.4,0,.2,1);
}
.portal-card:hover {
    transform: translateY(-2px);
}

/* ========== SIDEBAR ENHANCEMENT ========== */
.portal-sidebar {
    background: linear-gradient(180deg, var(--white) 0%, #f8faff 100%);
}
.sidebar-nav a.active {
    background: linear-gradient(135deg, var(--primary-light), #d6e9fa);
    box-shadow: 0 2px 8px rgba(24,111,187,.1);
}
.sidebar-nav a.active svg {
    color: var(--primary);
}
.sidebar-user-avatar {
    box-shadow: 0 3px 12px rgba(24,111,187,.25);
}

/* ========== PROJECT LIST (dashboard) ========== */
.project-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.project-item {
    display: block;
    padding: 16px;
    border-radius: var(--radius-sm);
    transition: all .25s;
    border: 1px solid transparent;
}
.project-item:hover {
    background: var(--gray-100);
    border-color: var(--gray-200);
}
.project-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.project-number {
    font-size: .8rem;
    color: var(--text-light);
    font-weight: 500;
}
.project-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: .95rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}
.project-deadline {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: .8rem;
    color: var(--text-light);
    margin-top: 6px;
}
.project-deadline svg {
    flex-shrink: 0;
}
.progress-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}
.progress-bar-wrapper .progress-bar {
    flex: 1;
}

/* ========== STATUS BADGES (project dashboard items) ========== */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 600;
    white-space: nowrap;
}
.status-badge.not-started {
    background: var(--gray-200);
    color: var(--text-light);
}
.status-badge.in-progress {
    background: #fff7ed;
    color: #c2410c;
}
.status-badge.review {
    background: #dbeafe;
    color: #1e40af;
}

/* ========== CARD LINK ========== */
.card-link {
    font-size: .85rem;
    color: var(--primary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: gap .2s;
}
.card-link:hover {
    gap: 8px;
}

/* ========== ANIMATED GRADIENT ACCENT ========== */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.portal-welcome {
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr 1fr;
        gap: 14px 20px;
    }
    .items-table th,
    .items-table td {
        padding: 10px 10px;
        font-size: .82rem;
    }
    .col-desc {
        max-width: 200px;
    }
    .totals-table {
        width: 100%;
    }
    .card-actions {
        flex-direction: column;
    }
    .card-actions .btn-save,
    .card-actions .btn-outline-sm,
    .card-actions .btn-danger,
    .card-actions .btn-pay {
        width: 100%;
        justify-content: center;
    }
    .portal-sidebar {
        transform: translateX(-100%);
    }
    .portal-sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }
    .sidebar-logo img {
        height: 50px;
    }
    .sidebar-close {
        display: block;
    }
    .portal-mobile-header {
        display: flex;
    }
    .portal-main {
        margin-left: 0;
        padding: 76px 16px 24px;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .portal-welcome { padding: 24px 20px; }
    .welcome-text h1 { font-size: 1.3rem; }
    .page-header h1 { font-size: 1.3rem; }
    .projects-grid {
        grid-template-columns: 1fr;
    }
    .payment-banner {
        flex-direction: column;
        text-align: center;
    }
    .profile-form.inline {
        flex-direction: column;
        align-items: stretch;
    }
    .profile-form.inline input { width: 100%; }
    .filter-bar { gap: 6px; }
    .filter-btn { padding: 6px 12px; font-size: .78rem; }
    .detail-row {
        flex-direction: column;
        gap: 4px;
    }
    .detail-value { text-align: left; }
    .portal-table th,
    .portal-table td {
        padding: 8px 10px;
        font-size: .82rem;
    }
    .detail-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .profile-hero-inner {
        flex-direction: column;
        text-align: center;
    }
    .profile-security-badges { justify-content: center; position:relative;left:-31.5%;}
    .security-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .security-status { align-self: flex-start; }
    .passkey-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .login-card { border-radius: 12px; padding: 24px; }
    .login-header { margin-bottom: 20px; }
    .login-card .flash-message { margin: 0 0 12px; }
    .recovery-codes-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ========== DARK MODE TOGGLE ========== */
.dark-mode-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--gray-100);
    color: var(--text-light);
    font-size: .85rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all .2s;
    margin-bottom: 10px;
}
.dark-mode-toggle:hover {
    background: var(--gray-200);
    color: var(--text);
}
.sidebar-tour-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--gray-100);
    color: var(--text-light);
    font-size: .85rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all .2s;
    margin-bottom: 10px;
}
.sidebar-tour-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
}
.sidebar-tour-btn svg {
    flex-shrink: 0;
}
.dark-mode-toggle .icon-moon { display: none !important; }
.dark-mode-toggle .icon-sun { display: block !important; flex-shrink: 0; }
[data-theme="dark"] .dark-mode-toggle .icon-moon { display: block !important; flex-shrink: 0; }
[data-theme="dark"] .dark-mode-toggle .icon-sun { display: none !important; }

.mobile-dark-toggle {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background .2s;
}
.mobile-dark-toggle:hover { background: var(--gray-100); }
.mobile-dark-toggle .icon-moon { display: none !important; }
.mobile-dark-toggle .icon-sun { display: block !important; flex-shrink: 0; }
[data-theme="dark"] .mobile-dark-toggle .icon-moon { display: block !important; flex-shrink: 0; }
[data-theme="dark"] .mobile-dark-toggle .icon-sun { display: none !important; }

/* ========== DARK MODE ========== */
[data-theme="dark"] {
    --primary: #4da3e8;
    --primary-dark: #3b8fd4;
    --primary-light: #1a2d45;
    --primary-glow: rgba(77,163,232,.2);
    --accent: #2bbaca;
    --dark: #e8ecf2;
    --text: #d4dae4;
    --text-light: #8a95a8;
    --gray-100: #1a2035;
    --gray-200: #232d42;
    --gray-300: #2e3a52;
    --gray-400: #4a5568;
    --white: #111827;
    --shadow-sm: 0 2px 8px rgba(0,0,0,.25);
    --shadow-md: 0 8px 30px rgba(0,0,0,.35);
    --shadow-lg: 0 20px 60px rgba(0,0,0,.45);
    --shadow-glow: 0 8px 40px rgba(77,163,232,.2);
    --success: #34d399;
    --success-bg: rgba(52,211,153,.12);
    --warn: #fbbf24;
    --warn-bg: rgba(251,191,36,.12);
    --danger: #f87171;
    --danger-bg: rgba(248,113,113,.12);
    --info: #4da3e8;
    --info-bg: rgba(77,163,232,.12);
}

[data-theme="dark"] body:not(.login-page) {
    background: linear-gradient(160deg, #0f172a 0%, #111827 40%, #0d1b2e 100%);
}

[data-theme="dark"] .portal-sidebar {
    background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
    border-right-color: #232d42;
}
[data-theme="dark"] .sidebar-header {
    border-bottom-color: #232d42;
}
[data-theme="dark"] .sidebar-logo .logo-light {
    display: none;
}
[data-theme="dark"] .sidebar-logo .logo-dark {
    display: block;
}
[data-theme="dark"] .mobile-header-logo .logo-light {
    display: none;
}
[data-theme="dark"] .mobile-header-logo .logo-dark {
    display: block;
}
[data-theme="dark"] .sidebar-nav a.active {
    background: linear-gradient(135deg, #1a2d45, #1e3350);
    box-shadow: 0 2px 8px rgba(77,163,232,.15);
}
[data-theme="dark"] .sidebar-footer {
    border-top-color: #232d42;
}
[data-theme="dark"] .sidebar-tour-btn {
    background: rgba(255,255,255,.06);
    color: #94a3b8;
}
[data-theme="dark"] .sidebar-tour-btn:hover {
    background: rgba(24,111,187,.15);
    color: #60a5fa;
}
[data-theme="dark"] .sidebar-divider {
    background: #232d42;
}

[data-theme="dark"] .portal-mobile-header {
    background: #111827;
    border-bottom-color: #232d42;
}

[data-theme="dark"] .portal-card {
    background: #111827;
    border-color: #232d42;
}
[data-theme="dark"] .stat-card {
    background: #111827;
    border-color: #232d42;
}
[data-theme="dark"] .stat-card::after {
    background: linear-gradient(90deg, #4da3e8, #2bbaca);
}

[data-theme="dark"] .stat-icon.quotes-icon {
    background: linear-gradient(135deg, #1a2d45, #1e3350);
    color: #4da3e8;
}
[data-theme="dark"] .stat-icon.projects-icon {
    background: linear-gradient(135deg, rgba(52,211,153,.12), rgba(52,211,153,.2));
    color: #34d399;
}
[data-theme="dark"] .stat-icon.invoices-icon {
    background: linear-gradient(135deg, rgba(251,191,36,.12), rgba(251,191,36,.2));
    color: #fbbf24;
}
[data-theme="dark"] .stat-icon.paid-icon {
    background: linear-gradient(135deg, rgba(52,211,153,.12), rgba(52,211,153,.25));
    color: #34d399;
}

[data-theme="dark"] .portal-welcome {
    background: linear-gradient(135deg, #1a365d 0%, #1e3a5f 50%, #1a3550 100%);
    box-shadow: 0 8px 32px rgba(0,0,0,.3);
}

[data-theme="dark"] .portal-table th {
    border-bottom-color: #2e3a52;
    background: #0f172a;
}
[data-theme="dark"] .portal-table td {
    border-bottom-color: #232d42;
}
[data-theme="dark"] .portal-table tbody tr:hover {
    background: #1a2035;
}

[data-theme="dark"] .items-table th {
    background: #0f172a;
    border-bottom-color: #2e3a52;
}
[data-theme="dark"] .items-table td {
    border-bottom-color: #232d42;
}
[data-theme="dark"] .items-table tbody tr:hover td {
    background: #1a2035;
}

[data-theme="dark"] .filter-btn {
    background: #111827;
    border-color: #2e3a52;
    color: #8a95a8;
}
[data-theme="dark"] .filter-btn:hover {
    border-color: #4da3e8;
    color: #4da3e8;
}
[data-theme="dark"] .filter-btn.active {
    background: #4da3e8;
    color: #111827;
    border-color: #4da3e8;
}

[data-theme="dark"] .progress-bar {
    background: #232d42;
}

[data-theme="dark"] .login-card {
    background: #111827;
}
[data-theme="dark"] .login-header h1 {
    color: #d4dae4;
}
[data-theme="dark"] .login-header p {
    color: #8896ab;
}
[data-theme="dark"] .login-form .form-group label {
    color: #d4dae4;
}
[data-theme="dark"] .login-email-badge {
    background: #1a2035;
    border-color: #2e3a52;
    color: #d4dae4;
}
[data-theme="dark"] .btn-magic-link {
    background: #1a2035;
    border-color: #2e3a52;
    color: #d4dae4;
}
[data-theme="dark"] .magic-sent-content h2 {
    color: #d4dae4;
}
[data-theme="dark"] .magic-sent-tips {
    background: #1a2035;
}
[data-theme="dark"] .input-wrapper input {
    background: #1a2035;
    border-color: #2e3a52;
    color: #d4dae4;
}
[data-theme="dark"] .input-wrapper input:focus {
    border-color: #4da3e8;
}

[data-theme="dark"] .detail-row {
    border-bottom-color: #232d42;
}
[data-theme="dark"] .totals-grand {
    border-top-color: #d4dae4;
}

[data-theme="dark"] .payment-tasks-card {
    border-left-color: #fbbf24;
}

[data-theme="dark"] .badge-pending { background: rgba(77,163,232,.15); color: #4da3e8; }
[data-theme="dark"] .badge-accepted,
[data-theme="dark"] .badge-active,
[data-theme="dark"] .badge-paid { background: rgba(52,211,153,.15); }
[data-theme="dark"] .badge-rejected,
[data-theme="dark"] .badge-cancelled,
[data-theme="dark"] .badge-overdue { background: rgba(248,113,113,.15); }
[data-theme="dark"] .badge-expired { background: rgba(249,115,22,.15); color: #fb923c; }
[data-theme="dark"] .badge-on_hold { background: #232d42; }
[data-theme="dark"] .badge-planning { background: rgba(77,163,232,.15); }
[data-theme="dark"] .badge-draft { background: #232d42; color: var(--text-light); }
[data-theme="dark"] .badge-completed { background: rgba(52,211,153,.15); color: #34d399; }
[data-theme="dark"] .badge-processed { background: rgba(52,211,153,.15); color: #34d399; }
[data-theme="dark"] .badge-in_progress { background: rgba(249,115,22,.15); color: #fb923c; }
[data-theme="dark"] .badge-unpaid { background: rgba(249,115,22,.15); color: #fb923c; }

[data-theme="dark"] .timeline-item:hover { background: #1a2035; }
[data-theme="dark"] .timeline-item::after { background: #2e3a52; }
[data-theme="dark"] .timeline-icon.timeline-success { background: rgba(52,211,153,.15); color: #34d399; }
[data-theme="dark"] .timeline-icon.timeline-blue { background: rgba(77,163,232,.15); color: #4da3e8; }
[data-theme="dark"] .timeline-icon.timeline-orange { background: rgba(249,115,22,.15); color: #fb923c; }
[data-theme="dark"] .timeline-icon.timeline-danger { background: rgba(248,113,113,.15); color: #f87171; }
[data-theme="dark"] .timeline-icon.timeline-grey { background: #232d42; }
[data-theme="dark"] .timeline-date { background: #1a2035; }

[data-theme="dark"] .project-item:hover {
    background: #1a2035;
    border-color: #2e3a52;
}

[data-theme="dark"] .project-card {
    background: #111827;
    border-color: #232d42;
}
[data-theme="dark"] .project-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,.4);
}

[data-theme="dark"] .back-link {
    background: #1a2035;
    border-color: #2e3a52;
    color: #8a95a8;
}
[data-theme="dark"] .back-link:hover {
    color: #4da3e8;
    background: #1a2d45;
    border-color: #4da3e8;
}

[data-theme="dark"] .profile-form .form-group input,
[data-theme="dark"] .profile-form .form-group select,
[data-theme="dark"] .profile-form .form-group textarea {
    background: #1a2035;
    border-color: #2e3a52;
    color: #d4dae4;
}
[data-theme="dark"] .profile-form .form-group input:focus,
[data-theme="dark"] .profile-form .form-group select:focus,
[data-theme="dark"] .profile-form .form-group textarea:focus {
    border-color: #4da3e8;
}

[data-theme="dark"] .btn-outline-sm {
    background: #111827;
    border-color: #2e3a52;
    color: #d4dae4;
}
[data-theme="dark"] .btn-outline-sm:hover {
    border-color: #4da3e8;
    color: #4da3e8;
}

[data-theme="dark"] .security-card-icon {
    background: #1a2035;
}
[data-theme="dark"] .security-card-icon.active {
    background: rgba(52,211,153,.12);
}

[data-theme="dark"] .portal-modal {
    background: #111827;
}
[data-theme="dark"] .portal-modal-overlay {
    background: rgba(0,0,0,.6);
}

[data-theme="dark"] .payment-task-item {
    background: #1a2035;
}
[data-theme="dark"] .payment-task-item:hover {
    background: rgba(251,191,36,.08);
}

[data-theme="dark"] .invoice-item {
    background: #1a2035;
}
[data-theme="dark"] .invoice-item:hover {
    background: #232d42;
}

[data-theme="dark"] .related-item {
    background: #1a2035;
}
[data-theme="dark"] .related-item:hover {
    background: #232d42;
}

[data-theme="dark"] .recovery-code {
    background: #1a2035;
    border-color: #2e3a52;
}
[data-theme="dark"] .manual-key code {
    background: #1a2035;
    border-color: #2e3a52;
}

[data-theme="dark"] .qrcode-container {
    background: #fff;
}

[data-theme="dark"] .passkey-item {
    background: #1a2035;
    border-color: #2e3a52;
}
[data-theme="dark"] .passkey-name-form {
    background: #1a2035;
    border-color: #2e3a52;
}

[data-theme="dark"] .tab-btn {
    color: #8a95a8;
}
[data-theme="dark"] .tab-btn:hover {
    color: #4da3e8;
}
[data-theme="dark"] .tab-btn.active {
    color: #4da3e8;
    border-bottom-color: #4da3e8;
}
[data-theme="dark"] .portal-tabs {
    border-bottom-color: #2e3a52;
}

[data-theme="dark"] .empty-state svg {
    color: #4a5568;
}

[data-theme="dark"] .sidebar-overlay.visible {
    background: rgba(0,0,0,.6);
}

/* ========== GEBRUIKERSBEHEER ========== */
.users-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.user-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
    transition: all .2s;
    flex-wrap: wrap;
}
.user-item:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}
.user-item.user-inactive {
    opacity: .55;
}
.user-item.user-inactive:hover {
    opacity: .75;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: .9rem;
    flex-shrink: 0;
}
.owner-avatar {
    background: linear-gradient(135deg, var(--primary), var(--accent));
}
.user-info {
    flex: 1;
    min-width: 0;
}
.user-name {
    font-weight: 600;
    font-size: .92rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.user-email {
    font-size: .82rem;
    color: var(--text-light);
    margin-top: 2px;
}
.user-meta {
    font-size: .75rem;
    color: var(--gray-400);
    margin-top: 4px;
}
.user-role {
    flex-shrink: 0;
}
.user-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* Role badges */
.role-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.role-owner {
    background: linear-gradient(135deg, #0d1b2a, #1e3a5f);
    color: #fff;
}
.role-admin {
    background: var(--info-bg);
    color: var(--info);
}
.role-member {
    background: var(--gray-200);
    color: var(--text-light);
}

.status-badge.inactive {
    background: var(--danger-bg);
    color: var(--danger);
    font-size: .7rem;
    padding: 1px 8px;
    border-radius: 12px;
    font-weight: 500;
}

/* Role select */
.role-select {
    padding: 4px 8px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: .8rem;
    background: var(--white);
    color: var(--text);
    cursor: pointer;
    outline: none;
}
.role-select:focus {
    border-color: var(--primary);
}

/* User action buttons */
.btn-user-action {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--gray-300);
    background: var(--white);
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
}
.btn-user-action:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}
.btn-remove:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: var(--danger-bg);
}
.btn-deactivate:hover {
    border-color: var(--warn);
    color: var(--warn);
    background: var(--warn-bg);
}
.btn-activate:hover {
    border-color: var(--success);
    color: var(--success);
    background: var(--success-bg);
}
.btn-resend:hover {
    border-color: var(--info);
    color: var(--info);
    background: var(--info-bg);
}

/* Add user form */
.add-user-form {
    margin-top: 8px;
}
.add-user-fields {
    display: grid;
    grid-template-columns: 1fr 1fr 140px auto;
    gap: 12px;
    align-items: end;
}
.add-user-fields .form-group {
    margin: 0;
}
.add-user-fields .form-group label {
    display: block;
    font-size: .8rem;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 6px;
}
.add-user-fields .form-group input,
.add-user-fields .form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: .88rem;
    color: var(--text);
    background: var(--white);
    transition: border-color .2s;
    outline: none;
}
.add-user-fields .form-group input:focus,
.add-user-fields .form-group select:focus {
    border-color: var(--primary);
}
.btn-add-user {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}
.btn-add-user:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-glow);
}

.user-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
    font-size: .72rem;
}

/* ── Contract cancellation styles ── */
.contract-banner {
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 20px;
}
.contract-banner-warning {
    background: rgba(245, 158, 11, .08);
    border: 1px solid rgba(245, 158, 11, .2);
}
.contract-banner-danger {
    background: rgba(239, 68, 68, .08);
    border: 1px solid rgba(239, 68, 68, .2);
}
.contract-banner-info {
    background: rgba(59, 130, 246, .08);
    border: 1px solid rgba(59, 130, 246, .2);
}
.contract-banner-content {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.contract-banner-icon {
    flex-shrink: 0;
    margin-top: 2px;
}
.contract-banner-warning .contract-banner-icon { color: #f59e0b; }
.contract-banner-danger .contract-banner-icon { color: #ef4444; }
.contract-banner-info .contract-banner-icon { color: #3b82f6; }
.contract-banner-text h3 {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 600;
}
.contract-banner-text p {
    margin: 0;
    font-size: .9rem;
    color: var(--text-light);
    line-height: 1.5;
}

[data-theme="dark"] .contract-banner-warning {
    background: rgba(245, 158, 11, .12);
    border-color: rgba(245, 158, 11, .25);
}
[data-theme="dark"] .contract-banner-danger {
    background: rgba(239, 68, 68, .12);
    border-color: rgba(239, 68, 68, .25);
}
[data-theme="dark"] .contract-banner-info {
    background: rgba(59, 130, 246, .12);
    border-color: rgba(59, 130, 246, .25);
}

/* ========== CONTRACT SUMMARY STRIP ========== */
.contract-summary-strip {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 16px 8px;
    margin-bottom: 24px;
}
.contract-summary-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    min-width: 0;
}
.contract-summary-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    border-radius: 10px;
    color: var(--primary);
}
.contract-summary-icon svg {
    width: 20px;
    height: 20px;
}
.contract-summary-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.contract-summary-label {
    font-size: .72rem;
    font-weight: 500;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.contract-summary-value {
    font-size: .95rem;
    font-weight: 700;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.contract-summary-divider {
    width: 1px;
    height: 36px;
    background: var(--gray-300);
    flex-shrink: 0;
}
@media (max-width: 768px) {
    .contract-summary-strip {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px;
    }
    .contract-summary-item {
        flex: 1 1 calc(50% - 12px);
        padding: 0;
    }
    .contract-summary-divider {
        display: none;
    }
}
@media (max-width: 480px) {
    .contract-summary-item {
        flex: 1 1 100%;
    }
}

/* ========== CONTRACT DETAIL GRID ========== */
.contract-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 32px;
}
.contract-detail-section {
    padding: 0;
}
.contract-detail-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: .05em;
    padding-bottom: 10px;
    margin-bottom: 4px;
    border-bottom: 2px solid var(--primary-light);
}
.contract-detail-rows {
    display: flex;
    flex-direction: column;
}
.contract-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-200);
    gap: 12px;
}
.contract-detail-row:last-child {
    border-bottom: none;
}
.contract-detail-label {
    font-size: .85rem;
    color: var(--text-light);
    font-weight: 500;
}
.contract-detail-value {
    font-size: .88rem;
    color: var(--text);
    font-weight: 500;
    text-align: right;
}
@media (max-width: 640px) {
    .contract-detail-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

[data-theme="dark"] .contract-summary-strip {
    background: rgba(255,255,255,.04);
    border-color: rgba(255,255,255,.08);
}
[data-theme="dark"] .contract-summary-icon {
    background: rgba(24,111,187,.15);
}
[data-theme="dark"] .contract-summary-value {
    color: var(--white);
}
[data-theme="dark"] .contract-detail-heading {
    border-bottom-color: rgba(24,111,187,.25);
}
[data-theme="dark"] .contract-detail-row {
    border-bottom-color: rgba(255,255,255,.06);
}

.contract-cancel-section .cancel-content {
    padding: 20px;
}
.cancel-notice {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: rgba(245, 158, 11, .08);
    border: 1px solid rgba(245, 158, 11, .2);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
}
.cancel-notice svg {
    flex-shrink: 0;
    color: #f59e0b;
    margin-top: 2px;
}
.cancel-notice p {
    margin: 0 0 4px;
    font-size: .9rem;
    line-height: 1.5;
    color: var(--text-light);
}
[data-theme="dark"] .cancel-notice {
    background: rgba(245, 158, 11, .12);
    border-color: rgba(245, 158, 11, .25);
}

.cancel-form .form-group {
    margin-bottom: 16px;
}
.cancel-form .form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    font-size: .9rem;
}
.cancel-form .form-group label .required {
    color: #ef4444;
}
.cancel-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    font-family: inherit;
    font-size: .9rem;
    resize: vertical;
    background: var(--bg, #fff);
    color: var(--text, #1e293b);
    transition: border-color .2s;
    box-sizing: border-box;
}
.cancel-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(24, 111, 187, .1);
}

.cancel-summary {
    background: var(--bg-light, #f8fafc);
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 20px;
}
.cancel-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: .9rem;
}
.cancel-summary-row span {
    color: var(--text-light);
}
[data-theme="dark"] .cancel-summary {
    background: var(--bg-alt, #1e293b);
}

.btn-cancel-contract {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .2s;
}
.btn-cancel-contract:hover {
    background: #dc2626;
}
.btn-cancel-contract:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.btn-portal {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s;
}
.btn-portal:hover {
    opacity: .9;
}

/* Roles info */
.roles-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.role-info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.role-info-item .role-badge {
    flex-shrink: 0;
    margin-top: 2px;
}
.role-info-item p {
    font-size: .85rem;
    color: var(--text-light);
    line-height: 1.5;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .add-user-fields {
        grid-template-columns: 1fr;
    }
    .user-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .user-actions {
        width: 100%;
        justify-content: flex-end;
    }
    .user-role {
        width: 100%;
    }
}

/* Dark mode */
[data-theme="dark"] .user-item {
    border-color: #2e3a52;
    background: transparent;
}
[data-theme="dark"] .user-item:hover {
    border-color: #4da3e8;
    background: rgba(77,163,232,.08);
}
[data-theme="dark"] .user-avatar {
    background: #4da3e8;
}
[data-theme="dark"] .user-name {
    color: #d4dae4;
}
[data-theme="dark"] .role-select {
    background: #1a2035;
    border-color: #2e3a52;
    color: #d4dae4;
}
[data-theme="dark"] .role-select:focus {
    border-color: #4da3e8;
}
[data-theme="dark"] .btn-user-action {
    background: #1a2035;
    border-color: #2e3a52;
    color: #8a95a8;
}
[data-theme="dark"] .btn-user-action:hover {
    border-color: #4da3e8;
    color: #4da3e8;
    background: rgba(77,163,232,.1);
}
[data-theme="dark"] .btn-remove:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239,68,68,.1);
}
[data-theme="dark"] .add-user-fields .form-group input,
[data-theme="dark"] .add-user-fields .form-group select {
    background: #1a2035;
    border-color: #2e3a52;
    color: #d4dae4;
}
[data-theme="dark"] .add-user-fields .form-group input:focus,
[data-theme="dark"] .add-user-fields .form-group select:focus {
    border-color: #4da3e8;
}
[data-theme="dark"] .role-member {
    background: #1a2035;
    color: #8a95a8;
}
[data-theme="dark"] .role-admin {
    background: rgba(77,163,232,.15);
    color: #4da3e8;
}
[data-theme="dark"] .user-count {
    background: rgba(77,163,232,.15);
    color: #4da3e8;
}
[data-theme="dark"] .status-badge.inactive {
    background: rgba(239,68,68,.15);
    color: #ef4444;
}

/* ═══════════════════════════════════════════════════════════════════════
   RONDLEIDING / GUIDED TOUR
   ═══════════════════════════════════════════════════════════════════════ */

.tour-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 9990;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}
.tour-overlay.active {
    opacity: 0;
    pointer-events: auto;
}

.tour-spotlight {
    position: absolute;
    z-index: 9991;
    border-radius: 12px;
    box-shadow: 0 0 0 9999px rgba(0,0,0,.55);
    transition: top .4s ease, left .4s ease, width .4s ease, height .4s ease;
    pointer-events: none;
    opacity: 0;
}
.tour-spotlight.active {
    opacity: 1;
}
.tour-spotlight-highlight {
    box-shadow: 0 0 0 9999px rgba(0,0,0,.55), 0 0 0 4px var(--primary), 0 0 20px rgba(24,111,187,.4);
}

.tour-tooltip {
    position: absolute;
    z-index: 9992;
    width: 340px;
    max-width: calc(100vw - 32px);
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2), 0 0 0 1px rgba(0,0,0,.05);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity .3s ease, transform .3s ease;
    font-family: 'Inter', sans-serif;
}
.tour-tooltip.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.tour-tooltip-arrow {
    position: absolute;
    width: 14px;
    height: 14px;
    background: var(--white);
    transform: rotate(45deg);
    border-radius: 2px;
}
.tour-tooltip-bottom .tour-tooltip-arrow {
    top: -7px;
    left: 50%;
    margin-left: -7px;
    box-shadow: -1px -1px 2px rgba(0,0,0,.06);
}
.tour-tooltip-top .tour-tooltip-arrow {
    bottom: -7px;
    left: 50%;
    margin-left: -7px;
    box-shadow: 1px 1px 2px rgba(0,0,0,.06);
}
.tour-tooltip-right .tour-tooltip-arrow {
    left: -7px;
    top: 50%;
    margin-top: -7px;
    box-shadow: -1px 1px 2px rgba(0,0,0,.06);
}
.tour-tooltip-left .tour-tooltip-arrow {
    right: -7px;
    top: 50%;
    margin-top: -7px;
    box-shadow: 1px -1px 2px rgba(0,0,0,.06);
}

.tour-tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px 0;
}
.tour-tooltip-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
}
.tour-tooltip-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    border-radius: 4px;
    transition: color .15s;
}
.tour-tooltip-close:hover {
    color: var(--danger);
}

.tour-tooltip-body {
    padding: 10px 20px 16px;
    font-size: .88rem;
    line-height: 1.6;
    color: var(--text-light);
}

.tour-tooltip-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px 16px;
    border-top: 1px solid var(--gray-200);
}
.tour-tooltip-progress {
    font-size: .78rem;
    color: var(--text-light);
    font-weight: 500;
}
.tour-tooltip-buttons {
    display: flex;
    gap: 8px;
}

.tour-btn {
    padding: 7px 16px;
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all .15s;
    font-family: 'Inter', sans-serif;
}
.tour-btn-skip {
    background: transparent;
    color: var(--text-light);
}
.tour-btn-skip:hover {
    background: var(--gray-100);
    color: var(--text);
}
.tour-btn-next {
    background: var(--primary);
    color: #fff;
}
.tour-btn-next:hover {
    background: var(--primary-dark);
}

/* Dark mode */
[data-theme="dark"] .tour-tooltip {
    background: #1e293b;
    box-shadow: 0 20px 60px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.08);
}
[data-theme="dark"] .tour-tooltip-arrow {
    background: #1e293b;
}
[data-theme="dark"] .tour-tooltip-title {
    color: #f1f5f9;
}
[data-theme="dark"] .tour-tooltip-close {
    color: #64748b;
}
[data-theme="dark"] .tour-tooltip-close:hover {
    color: var(--danger);
}
[data-theme="dark"] .tour-tooltip-body {
    color: #94a3b8;
}
[data-theme="dark"] .tour-tooltip-footer {
    border-top-color: rgba(255,255,255,.08);
}
[data-theme="dark"] .tour-tooltip-progress {
    color: #64748b;
}
[data-theme="dark"] .tour-btn-skip {
    color: #94a3b8;
}
[data-theme="dark"] .tour-btn-skip:hover {
    background: rgba(255,255,255,.08);
    color: #e2e8f0;
}
[data-theme="dark"] .tour-btn-next {
    background: #4da3e8;
    color: #fff;
}
[data-theme="dark"] .tour-btn-next:hover {
    background: #3b8fd4;
}
[data-theme="dark"] .tour-overlay {
    background: rgba(0,0,0,.75);
}
[data-theme="dark"] .tour-spotlight {
    box-shadow: 0 0 0 9999px rgba(0,0,0,.75);
    background: rgba(255,255,255,.06);
}
[data-theme="dark"] .tour-spotlight-highlight {
    box-shadow: 0 0 0 9999px rgba(0,0,0,.75), 0 0 0 3px rgba(77,163,232,.9), 0 0 40px rgba(77,163,232,.6), 0 0 80px rgba(77,163,232,.25);
    background: rgba(255,255,255,.06);
}

/* Mobile */
@media (max-width: 768px) {
    .tour-tooltip {
        width: 300px;
    }
    .tour-tooltip-right .tour-tooltip-arrow,
    .tour-tooltip-left .tour-tooltip-arrow {
        display: none;
    }
    .tour-tooltip-right,
    .tour-tooltip-left {
        /* Op mobile laten we de tooltip gewoon onder verschijnen */
    }
}
