/* ============================================
   VERACITA ACCOUNT PAGE - Matching App Landing Design
   Premium SaaS Style - Consistent Colors & Effects
   CORRECTED VERSION - Added loading states
   ============================================ */

/* Feature-flag system — Sprint 1-4 panels hidden until flags flip on */
[data-feature-disabled="true"] { display: none !important; }

/* ===== SKIP NAV (a11y) ===== */
.vc-skip-nav {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 9999;
    padding: 8px 16px;
    background: var(--brand-gradient);
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.2s;
}
.vc-skip-nav:focus {
    top: 16px;
}

/* ===== ACCOUNT-PAGE LOCAL VARS (brand palette + layout — not in veracita-tokens.css) ===== */
:root {
    /* Brand Colors (account-specific palette) */
    --brand-blue: #4384ff;
    --brand-purple: #7b42ff;
    --brand-green: #10b981;
    --brand-red: #ef4444;
    --brand-gold: #f59e0b;

    /* Dark-mode surface aliases used by account panels */
    --bg-card: rgba(255, 255, 255, 0.02);
    --bg-elevated: rgba(255, 255, 255, 0.03);
    --bg-hover: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.08);
    --border-subtle: rgba(255, 255, 255, 0.05);
    --border-hover: rgba(255, 255, 255, 0.15);
    --text-primary: rgba(255, 255, 255, 0.95);
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);

    /* Accent Colors */
    --accent-green: #10b981;
    --accent-green-hover: #059669;
    --accent-purple: #7b42ff;
    --accent-blue: #4384ff;
    --danger: #ef4444;
    --danger-hover: #dc2626;

    /* Layout */
    --sidebar-width: 240px;

    /* Gradients */
    --brand-gradient: linear-gradient(135deg, #4384ff 0%, #7b42ff 100%);
    --card-gradient: linear-gradient(135deg, rgba(67, 132, 255, 0.08) 0%, rgba(123, 66, 255, 0.08) 100%);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* body background, color, and font are set by veracita-tokens.css.
   Only set account-specific overrides here. */
body {
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ===== LOADING STATES - NEW ===== */
.loading-placeholder {
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    color: transparent !important;
}

.loading-text {
    color: var(--text-muted) !important;
    font-style: italic;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Small loading spinner for inline use */
.loading-spinner-small {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--brand-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

/* History loading state */
.history-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    gap: 16px;
}

.history-loading p {
    color: var(--text-muted);
    font-size: 14px;
}

/* History empty state */
.history-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.history-empty svg {
    width: 48px;
    height: 48px;
    opacity: 0.5;
    margin-bottom: 16px;
    stroke: var(--text-muted);
}

.history-empty p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    font-size: 15px;
}

.history-empty .btn-primary {
    margin-top: 16px;
    display: inline-block;
    text-decoration: none;
    padding: 12px 24px;
}

/* ===== AMBIENT BACKGROUND - Matching app-landing-page ===== */
.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
    animation: orbFloat 20s ease-in-out infinite;
}

.ambient-orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(67, 132, 255, 0.3) 0%, transparent 70%);
    top: -200px;
    left: -100px;
    animation-delay: 0s;
}

.ambient-orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(123, 66, 255, 0.25) 0%, transparent 70%);
    bottom: -150px;
    right: -100px;
    animation-delay: -10s;
}

.ambient-orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(67, 132, 255, 0.2) 0%, transparent 70%);
    top: 50%;
    right: 20%;
    animation-delay: -5s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -20px) scale(1.05); }
    50% { transform: translate(-20px, 30px) scale(0.95); }
    75% { transform: translate(-30px, -10px) scale(1.02); }
}

/* ===== APP LAYOUT ===== */
.app-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    position: relative;
    z-index: 1;
}

/* ===== TOP BAR ===== */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 48px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.01);
    backdrop-filter: blur(10px);
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border-color: rgba(67, 132, 255, 0.3);
    transform: translateX(-2px);
}

.btn-back[data-active="true"] {
    border-color: rgba(16, 185, 129, 0.4);
}

.btn-back[data-active="true"] #backToPlatformLabel::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-green, #10b981);
    margin-right: 8px;
    vertical-align: middle;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.btn-back svg {
    width: 18px;
    height: 18px;
}

.btn-add-credits {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--accent-green) 0%, #059669 100%);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
}

.btn-add-credits:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35);
}

.btn-add-credits svg {
    width: 20px;
    height: 20px;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: rgba(10, 10, 15, 0.95);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    backdrop-filter: blur(20px);
}

.sidebar-header {
    padding: 28px 24px;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: var(--brand-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(67, 132, 255, 0.3);
}

.logo-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    flex: 1;
    padding: 24px 16px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 28px;
}

.nav-section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0 12px;
    margin-bottom: 10px;
}

.nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: transparent;
    border: none;
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    text-decoration: none;
    margin-bottom: 4px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--card-gradient);
    color: var(--text-primary);
    border: 1px solid rgba(67, 132, 255, 0.2);
}

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    stroke: url(#icon-gradient-blue-purple);
}

.nav-item.active svg {
    stroke: var(--brand-blue);
}

.nav-item-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nav-item-disabled:hover {
    background: transparent;
    color: var(--text-secondary);
}

.nav-item-disabled svg {
    stroke: var(--text-muted);
}

.referral-link {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.08), rgba(139, 92, 246, 0.08));
    border: 1px solid rgba(236, 72, 153, 0.15);
}

.referral-link:hover {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.12), rgba(139, 92, 246, 0.12));
    border-color: rgba(236, 72, 153, 0.25);
}

.sidebar-footer {
    padding: 20px 16px;
    border-top: 1px solid var(--border);
}

/* ===== CONTENT CONTAINER ===== */
.content-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 48px 80px;
}

/* ===== HERO CARD ===== */
.hero-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 44px 50px;
    margin-bottom: 28px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(67, 132, 255, 0.03) 0%, rgba(123, 66, 255, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.4s;
}

.hero-card:hover {
    border-color: rgba(67, 132, 255, 0.2);
}

.hero-card:hover::before {
    opacity: 1;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    position: relative;
    z-index: 1;
}

.hero-identity {
    display: flex;
    align-items: center;
    gap: 28px;
}

.avatar {
    width: 88px;
    height: 88px;
    background: var(--brand-gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(67, 132, 255, 0.3);
}

.identity-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.identity-name {
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.identity-email {
    font-size: 17px;
    color: var(--text-secondary);
}

.identity-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.25);
    padding: 8px 18px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #fbbf24;
    margin-top: 10px;
    width: fit-content;
}

.identity-badge svg {
    width: 16px;
    height: 16px;
    stroke: #fbbf24;
}

.hero-stats {
    display: flex;
    align-items: stretch;
    gap: 18px;
}

.stat-box {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px 36px;
    text-align: center;
    min-width: 150px;
    transition: all 0.3s;
}

.stat-box.clickable {
    cursor: pointer;
    text-decoration: none;
}

.stat-box.clickable:hover {
    background: rgba(67, 132, 255, 0.08);
    border-color: rgba(67, 132, 255, 0.3);
    transform: translateY(-2px);
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-value.green {
    color: var(--accent-green);
}

.stat-label {
    font-size: 15px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* ===== REFERRAL CARD ===== */
.referral-card {
    background: linear-gradient(135deg, rgba(67, 132, 255, 0.08) 0%, rgba(123, 66, 255, 0.12) 100%);
    border: 1px solid rgba(123, 66, 255, 0.2);
    border-radius: 24px;
    padding: 44px 50px;
    margin-bottom: 44px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.referral-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15), transparent 70%);
    pointer-events: none;
}

.referral-card:hover {
    border-color: rgba(123, 66, 255, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(123, 66, 255, 0.15);
}

.referral-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

.referral-title-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.referral-icon {
    width: 64px;
    height: 64px;
    background: var(--brand-gradient);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(67, 132, 255, 0.35);
}

.referral-icon svg {
    width: 32px;
    height: 32px;
    color: white;
}

.referral-title {
    font-size: 24px;
    font-weight: 600;
}

.referral-subtitle {
    font-size: 17px;
    color: var(--text-secondary);
    margin-top: 6px;
}

.referral-subtitle .highlight {
    color: var(--brand-blue);
    font-weight: 600;
}

.referral-subtitle .separator {
    color: var(--text-muted);
    margin: 0 8px;
}

.commission-badge {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 12px 24px;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 600;
    color: var(--accent-green);
}

.referral-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    position: relative;
    z-index: 1;
}

.referral-code-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 14px;
    padding: 18px 24px;
}

.code-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.code-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.code-value {
    font-size: 26px;
    font-weight: 700;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    letter-spacing: 3px;
    color: #c4b5fd;
}

.btn-copy {
    width: 48px;
    height: 48px;
    background: rgba(139, 92, 246, 0.2);
    border: none;
    border-radius: 12px;
    color: var(--accent-purple);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-copy:hover {
    background: rgba(139, 92, 246, 0.35);
    transform: scale(1.05);
}

.btn-copy svg {
    width: 20px;
    height: 20px;
}

.referral-stats {
    display: flex;
    align-items: center;
    gap: 36px;
}

.referral-stat {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.referral-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.referral-stat-label {
    font-size: 16px;
    color: var(--text-muted);
}

.btn-share {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 36px;
    background: var(--brand-gradient);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(67, 132, 255, 0.35);
}

.btn-share:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(67, 132, 255, 0.45);
}

.btn-share svg {
    width: 22px;
    height: 22px;
}

/* ===== PANEL CONTAINER ===== */
.panel-container {
    margin-top: 20px;
}

.panel {
    display: none;
}

.panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== SECTIONS ===== */
.section {
    margin-bottom: 36px;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 18px;
}

.section-title.danger-title {
    color: var(--danger);
}

.section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--brand-blue);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-text:hover {
    background: rgba(67, 132, 255, 0.1);
}

/* ===== SETTINGS LIST ===== */
.settings-list {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s;
}

.settings-list:hover {
    border-color: rgba(67, 132, 255, 0.15);
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    border-bottom: 1px solid var(--border-subtle);
    transition: all 0.2s;
    cursor: pointer;
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.settings-item-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.settings-item-label {
    font-size: 17px;
    font-weight: 500;
    color: var(--text-primary);
}

.settings-item-label-danger {
    color: var(--danger) !important;
}

.settings-item-value {
    font-size: 15px;
    color: var(--text-muted);
}

/* Session info styling */
.session-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.session-current {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.session-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.session-details {
    color: var(--text-muted);
    font-size: 14px;
}

/* ===== BUTTONS ===== */
.btn-action {
    padding: 12px 22px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-action:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.btn-action.btn-green {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.25);
    color: var(--accent-green);
}

.btn-action.btn-green:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
}

.btn-danger {
    padding: 12px 22px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 10px;
    color: var(--danger);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
    color: var(--accent-green);
}

.verified-badge svg {
    width: 18px;
    height: 18px;
}

.coming-soon-badge {
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.25);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-gold);
}

.coming-soon-badge-small {
    background: rgba(251, 191, 36, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 600;
    color: var(--brand-gold);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-left: auto;
}

/* ===== DANGER SECTION ===== */
.danger-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid rgba(239, 68, 68, 0.2);
}

.danger-warning {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 14px;
    padding: 18px 22px;
    margin-bottom: 20px;
}

.danger-warning svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--danger);
}

.danger-warning p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.danger-list {
    border-color: rgba(239, 68, 68, 0.2);
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
    display: flex;
    gap: 6px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid var(--border);
}

.theme-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.theme-btn:hover {
    color: var(--text-secondary);
}

.theme-btn.active {
    background: var(--brand-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(67, 132, 255, 0.25);
}

.theme-btn svg {
    width: 16px;
    height: 16px;
}

/* ===== TOGGLE SWITCH ===== */
.toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    transition: all 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--brand-gradient);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

/* ===== HISTORY STATS GRID ===== */
.history-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.history-stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: all 0.3s;
}

.history-stat-card:hover {
    border-color: rgba(67, 132, 255, 0.2);
    background: rgba(255, 255, 255, 0.03);
}

.history-stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-stat-icon svg {
    width: 26px;
    height: 26px;
}

.history-stat-icon.green {
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-green);
}

.history-stat-icon.yellow {
    background: rgba(251, 191, 36, 0.12);
    color: var(--brand-gold);
}

.history-stat-icon.red {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
}

.history-stat-icon.purple {
    background: rgba(139, 92, 246, 0.12);
    color: var(--accent-purple);
}

.history-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.history-stat-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== HISTORY LIST ===== */
.history-list {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 28px;
    border-bottom: 1px solid var(--border-subtle);
    transition: all 0.2s;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.history-item-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-item-icon.verified {
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-green);
}

.history-item-icon.warning {
    background: rgba(251, 191, 36, 0.12);
    color: var(--brand-gold);
}

.history-item-icon.failed {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
}

.history-item-icon.pending {
    background: rgba(139, 92, 246, 0.12);
    color: var(--accent-purple);
}

.history-item-icon svg {
    width: 22px;
    height: 22px;
}

.history-item-info {
    flex: 1;
}

.history-item-name {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
}

.history-item-meta {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

.history-item-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 10px;
}

.history-item-status.verified {
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-green);
}

.history-item-status.warning {
    background: rgba(251, 191, 36, 0.12);
    color: var(--brand-gold);
}

.history-item-status.failed {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
}

.history-item-status.pending {
    background: rgba(139, 92, 246, 0.12);
    color: var(--accent-purple);
}

.history-item-status svg {
    width: 16px;
    height: 16px;
}

/* =================================================== */
/* PENDING VERIFICATIONS SECTION                       */
/* =================================================== */

.section-description {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin: -8px 0 16px 0;
    line-height: 1.5;
}

.pending-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #000;
    font-size: 12px;
    font-weight: 700;
    border-radius: 12px;
}

.pending-sessions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pending-session-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(217, 119, 6, 0.04) 100%);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.pending-session-card:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(217, 119, 6, 0.08) 100%);
    border-color: rgba(245, 158, 11, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.15);
}

.pending-session-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pending-session-icon svg {
    width: 24px;
    height: 24px;
    stroke: #f59e0b;
}

.pending-session-info {
    flex: 1;
    min-width: 0;
}

.pending-session-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.pending-session-name {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pending-session-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
}

.pending-session-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 10px;
}

.pending-session-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
}

.pending-session-stat svg {
    width: 14px;
    height: 14px;
    stroke: rgba(245, 158, 11, 0.8);
}

.pending-progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.pending-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #d97706);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.pending-session-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.btn-resume-session {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-resume-session:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.btn-resume-session:active {
    transform: translateY(0);
}

.btn-resume-session svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.btn-dismiss-session {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-dismiss-session:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.btn-dismiss-session svg {
    width: 14px;
    height: 14px;
}

/* ===== ACTIVE WORKSPACE ===== */
.workspace-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.workspace-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: linear-gradient(135deg, #7b42ff 0%, #4f46e5 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 12px;
}

.workspace-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(123, 66, 255, 0.08) 0%, rgba(79, 70, 229, 0.04) 100%);
    border: 1px solid rgba(123, 66, 255, 0.2);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.workspace-card:hover {
    background: linear-gradient(135deg, rgba(123, 66, 255, 0.12) 0%, rgba(79, 70, 229, 0.08) 100%);
    border-color: rgba(123, 66, 255, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(123, 66, 255, 0.15);
}

.workspace-card.fade-out {
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.workspace-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(123, 66, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.workspace-card-icon svg {
    width: 24px;
    height: 24px;
    stroke: #7b42ff;
}

.workspace-card-info {
    flex: 1;
    min-width: 0;
}

.workspace-card-name {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.workspace-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2px;
}

.workspace-card-screen {
    font-size: 13px;
    color: rgba(123, 66, 255, 0.9);
    font-weight: 500;
}

.workspace-card-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
}

.workspace-card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.btn-workspace-resume {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #7b42ff 0%, #4f46e5 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-workspace-resume:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(123, 66, 255, 0.4);
}

.btn-workspace-resume:active {
    transform: translateY(0);
}

.btn-workspace-resume svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.btn-workspace-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    align-self: center;
}

.btn-workspace-remove:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.btn-workspace-remove svg {
    width: 14px;
    height: 14px;
}

/* ===== REFERRAL STEPS ===== */
.referral-steps {
    display: flex;
    gap: 24px;
}

.referral-step {
    flex: 1;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s;
}

.referral-step:hover {
    border-color: rgba(67, 132, 255, 0.2);
    background: rgba(255, 255, 255, 0.03);
}

.step-number {
    width: 36px;
    height: 36px;
    background: var(--brand-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.step-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.step-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ===== COMMISSION TABLE ===== */
.commission-table {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

.commission-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 32px;
    padding: 18px 28px;
    border-bottom: 1px solid var(--border-subtle);
    align-items: center;
}

.commission-row:last-child {
    border-bottom: none;
}

.commission-row.header {
    background: rgba(255, 255, 255, 0.02);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.commission-row.muted {
    opacity: 0.6;
}

.commission-row .rate {
    font-weight: 600;
    color: var(--brand-blue);
}

.commission-row .earning {
    font-weight: 600;
    color: var(--accent-green);
}

/* ===== REFERRAL LINK BOX ===== */
.referral-link-box {
    display: flex;
    gap: 14px;
}

.referral-link-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

.btn-copy-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 24px;
    background: var(--brand-gradient);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(67, 132, 255, 0.35);
}

.btn-copy-link svg {
    width: 18px;
    height: 18px;
}

/* ===== MODALS ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-panel {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 1px solid var(--border);
    border-radius: 24px;
    max-width: 560px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal-panel {
    transform: scale(1) translateY(0);
}

.modal-panel.modal-small {
    max-width: 480px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 32px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(67, 132, 255, 0.08) 0%, rgba(123, 66, 255, 0.08) 100%);
}

.modal-header h2 {
    font-size: 22px;
    font-weight: 600;
}

.modal-header-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
}

.modal-header-danger h2 {
    color: var(--danger);
}

.btn-close {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 10px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-close svg {
    width: 20px;
    height: 20px;
}

.modal-body {
    padding: 32px;
}

.modal-text {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 28px;
    line-height: 1.6;
}

.modal-danger-warning {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 24px;
}

.modal-danger-warning svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    color: var(--danger);
}

.modal-danger-warning p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.modal-danger-warning strong {
    color: var(--danger);
}

/* ===== FORM ELEMENTS ===== */
.form-group {
    margin-bottom: 22px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.form-input {
    width: 100%;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--brand-blue);
    background: rgba(67, 132, 255, 0.05);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* Modal Form Elements - Direct styling for inputs/selects in modals */
.modal-body input[type="text"],
.modal-body input[type="email"],
.modal-body input[type="password"],
.modal-body input[type="number"],
.modal-body input[type="url"],
.modal-body select,
.modal-body textarea {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.modal-body input:focus,
.modal-body select:focus,
.modal-body textarea:focus {
    outline: none;
    border-color: var(--brand-blue);
    background: rgba(67, 132, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(67, 132, 255, 0.15);
}

.modal-body input::placeholder,
.modal-body textarea::placeholder {
    color: var(--text-muted);
}

.modal-body select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}

.modal-body select option {
    background: #1a1a2e;
    color: var(--text-primary);
    padding: 10px;
}

.modal-body label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.modal-body .form-hint,
.modal-body small {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

.modal-body .label-optional {
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 4px;
}

/* Modal Footer */
.modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 32px;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
}

.modal-footer .btn-secondary,
.modal-footer .btn-primary {
    flex: 1;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-footer .btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.modal-footer .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.modal-footer .btn-primary {
    background: var(--brand-gradient);
    border: none;
    color: white;
    box-shadow: 0 4px 16px rgba(67, 132, 255, 0.3);
}

.modal-footer .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(67, 132, 255, 0.4);
}

.modal-footer .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Modal Org specific styles */
.modal-panel.modal-org {
    max-width: 520px;
}

/* Modal Invite specific styles */
.modal-panel.modal-invite {
    max-width: 480px;
}

/* Modal Invitations specific styles */
.modal-panel.modal-invitations {
    max-width: 560px;
}

/* Invitation list in modal */
.invitation-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    margin-bottom: 12px;
}

.invitation-item:last-child {
    margin-bottom: 0;
}

.invitation-info {
    flex: 1;
}

.invitation-org-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.invitation-role {
    font-size: 13px;
    color: var(--text-muted);
}

.invitation-actions {
    display: flex;
    gap: 8px;
}

.invitation-actions .btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 8px;
}

/* Empty invitations state */
.no-invitations {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.no-invitations svg {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-invitations p {
    font-size: 14px;
}

.modal-actions {
    display: flex;
    gap: 14px;
    margin-top: 28px;
}

.btn-secondary {
    flex: 1;
    padding: 16px 28px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.btn-primary {
    flex: 1;
    padding: 16px 28px;
    background: var(--brand-gradient);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(67, 132, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(67, 132, 255, 0.4);
}

/* ===== CREDIT PACKAGES ===== */
.credit-packages {
    display: flex;
    gap: 18px;
}

.credit-package {
    flex: 1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.credit-package:hover {
    border-color: rgba(67, 132, 255, 0.3);
    background: rgba(67, 132, 255, 0.05);
    transform: translateY(-4px);
}

.credit-package.popular {
    border-color: rgba(67, 132, 255, 0.4);
    background: linear-gradient(135deg, rgba(67, 132, 255, 0.1), rgba(123, 66, 255, 0.1));
}

.package-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--brand-gradient);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
}

.package-credits {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.package-price {
    display: block;
    font-size: 18px;
    color: var(--accent-green);
    font-weight: 600;
}

/* ===== REFUND MODAL ===== */
.refund-info p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.refund-summary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}

.refund-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.refund-row:last-child {
    border-bottom: none;
}

.refund-row span:first-child {
    color: var(--text-secondary);
    font-size: 15px;
}

.refund-row span:last-child {
    color: var(--text-primary);
    font-size: 17px;
    font-weight: 600;
}

.refund-row.highlight {
    background: rgba(67, 132, 255, 0.05);
}

.refund-row.highlight span:last-child {
    color: var(--accent-green);
    font-size: 20px;
}

/* ===== SHARE BUTTONS ===== */
.share-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 20px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.share-btn svg {
    width: 22px;
    height: 22px;
}

.share-btn.email {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.share-btn.email:hover {
    background: rgba(255, 255, 255, 0.1);
}

.share-btn.linkedin {
    background: #0a66c2;
    color: white;
}

.share-btn.linkedin:hover {
    background: #004182;
}

.share-btn.twitter {
    background: #1d9bf0;
    color: white;
}

.share-btn.twitter:hover {
    background: #0c7abf;
}

.share-btn.copy {
    background: var(--brand-gradient);
    color: white;
}

.share-btn.copy:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(67, 132, 255, 0.35);
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 28px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

.toast.success {
    border-color: rgba(16, 185, 129, 0.4);
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.4);
}

.toast.info {
    border-color: rgba(67, 132, 255, 0.4);
}

.toast-message {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 52px;
    height: 52px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--brand-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== LIGHT THEME ===== */
body.light-theme {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: #0f172a;
}

body.light-theme .sidebar {
    background: rgba(255, 255, 255, 0.95);
    border-right-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .hero-card,
body.light-theme .referral-card,
body.light-theme .settings-list,
body.light-theme .history-list,
body.light-theme .stat-box {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .identity-name,
body.light-theme .history-item-name,
body.light-theme .settings-item-label {
    color: #0f172a;
}

body.light-theme .identity-email,
body.light-theme .settings-item-value,
body.light-theme .text-muted {
    color: #64748b;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .sidebar {
        width: 200px;
    }

    .main-content {
        margin-left: 200px;
    }

    .hero-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 32px;
    }

    .hero-stats {
        width: 100%;
        justify-content: flex-start;
    }

    .referral-body {
        flex-wrap: wrap;
    }

    .history-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .referral-steps {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
    }

    .content-container {
        padding: 24px 20px 60px;
    }

    .top-bar {
        padding: 16px 20px;
    }

    .hero-card,
    .referral-card {
        padding: 28px 24px;
    }

    .credit-packages {
        flex-direction: column;
    }

    .share-buttons {
        grid-template-columns: 1fr;
    }

    .history-stats-grid {
        grid-template-columns: 1fr;
    }

    .pending-session-card {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .pending-session-actions {
        flex-direction: row;
    }

    .btn-resume-session {
        flex: 1;
    }

    .workspace-card {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .workspace-card-actions {
        flex-direction: row;
        gap: 8px;
    }

    .btn-workspace-resume {
        flex: 1;
    }
}

/* ============================================
   DASHBOARD PANEL STYLES
   Premium SaaS Design - Linear/Stripe inspired
   ============================================ */

/* Dashboard Account Type Card */
.dashboard-account-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(249, 115, 22, 0.08) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out;
}

.dashboard-account-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.account-type-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.account-type-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.account-type-icon svg {
    width: 28px;
    height: 28px;
    stroke: white;
    fill: rgba(255, 255, 255, 0.1);
}

.account-type-info {
    flex: 1;
}

.account-type-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.badge-tier {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fbbf24;
    text-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.badge-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    opacity: 0.9;
}

.account-type-perks {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.account-type-locked {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(245, 158, 11, 0.2);
    font-size: 0.875rem;
    color: #fbbf24;
}

.account-type-locked svg {
    width: 16px;
    height: 16px;
    stroke: #fbbf24;
}

/* Dashboard Sections */
.dashboard-section {
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
}

.dashboard-section:nth-child(2) { animation-delay: 0.1s; }
.dashboard-section:nth-child(3) { animation-delay: 0.2s; }
.dashboard-section:nth-child(4) { animation-delay: 0.3s; }
.dashboard-section:nth-child(5) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Credits Display Card */
.credits-display-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.credits-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.credits-amount {
    display: flex;
    flex-direction: column;
}

.credits-value {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.credits-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.btn-add-credits-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add-credits-inline:hover {
    background: var(--bg-elevated);
    border-color: var(--brand-green);
    color: var(--brand-green);
}

.btn-add-credits-inline svg {
    width: 16px;
    height: 16px;
}

/* Credits Meter */
.credits-meter {
    margin-bottom: 16px;
}

.meter-bar {
    height: 8px;
    background: rgba(16, 185, 129, 0.15);
    border-radius: 4px;
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
    border-radius: 4px;
    transition: width 0.8s ease-out;
}

.meter-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.credits-rate {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: rgba(16, 185, 129, 0.08);
    border-radius: 8px;
    font-size: 0.875rem;
}

.rate-label {
    color: var(--text-secondary);
}

.rate-value {
    font-weight: 600;
    color: var(--brand-green);
}

.rate-savings {
    color: var(--text-muted);
    padding-left: 8px;
    border-left: 1px solid var(--border);
}

/* Referral Display Card */
.referral-display-card {
    background: linear-gradient(135deg, rgba(123, 66, 255, 0.08) 0%, rgba(67, 132, 255, 0.05) 100%);
    border: 1px solid rgba(123, 66, 255, 0.2);
    border-radius: 12px;
    padding: 24px;
}

.referral-code-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.code-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(123, 66, 255, 0.3);
    border-radius: 8px;
    flex: 1;
}

.code-prefix {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.code-main {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--brand-purple);
    letter-spacing: 1px;
    font-family: 'SF Mono', Monaco, monospace;
}

.btn-copy-code {
    padding: 8px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s ease;
    border-radius: 6px;
}

.btn-copy-code:hover {
    color: var(--brand-purple);
    background: rgba(123, 66, 255, 0.1);
}

.btn-copy-code svg {
    width: 18px;
    height: 18px;
}

.btn-share-referral {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #7b42ff 0%, #5b21b6 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-share-referral:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(123, 66, 255, 0.4);
}

.btn-share-referral svg {
    width: 18px;
    height: 18px;
}

/* Referral Stats Row */
.referral-stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.referral-stat-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.referral-stat-box .stat-icon {
    width: 40px;
    height: 40px;
    background: rgba(123, 66, 255, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.referral-stat-box .stat-icon.earnings {
    background: rgba(16, 185, 129, 0.15);
}

.referral-stat-box .stat-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--brand-purple);
}

.referral-stat-box .stat-icon.earnings svg {
    stroke: var(--brand-green);
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Commission Rates Summary */
.commission-rates-summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.commission-rate-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.rate-type {
    color: var(--text-secondary);
}

.rate-amount {
    font-weight: 600;
    color: var(--brand-purple);
}

/* Quick Actions Grid */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.quick-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-action-card:hover {
    background: var(--bg-elevated);
    border-color: var(--brand-blue);
    transform: translateY(-2px);
}

.action-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-icon.verify {
    background: rgba(16, 185, 129, 0.15);
}
.action-icon.verify svg { stroke: var(--brand-green); }

.action-icon.share {
    background: rgba(123, 66, 255, 0.15);
}
.action-icon.share svg { stroke: var(--brand-purple); }

.action-icon.history {
    background: rgba(67, 132, 255, 0.15);
}
.action-icon.history svg { stroke: var(--brand-blue); }

.action-icon.credits {
    background: rgba(245, 158, 11, 0.15);
}
.action-icon.credits svg { stroke: var(--brand-gold); }

.action-icon svg {
    width: 22px;
    height: 22px;
}

.action-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
}

.quick-action-card:hover .action-label {
    color: var(--text-primary);
}

/* Recent Activity */
.recent-activity-list {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.activity-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.activity-empty svg {
    width: 48px;
    height: 48px;
    stroke: var(--text-muted);
    margin-bottom: 16px;
    opacity: 0.5;
}

.activity-empty p {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.btn-start-verifying {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--brand-gradient);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-start-verifying:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(67, 132, 255, 0.3);
}

/* Activity Item */
.activity-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s ease;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    background: var(--bg-hover);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon.verified { background: rgba(16, 185, 129, 0.15); }
.activity-icon.verified svg { stroke: var(--brand-green); }

.activity-icon.warning { background: rgba(245, 158, 11, 0.15); }
.activity-icon.warning svg { stroke: var(--brand-gold); }

.activity-icon.failed { background: rgba(239, 68, 68, 0.15); }
.activity-icon.failed svg { stroke: var(--brand-red); }

.activity-icon svg {
    width: 20px;
    height: 20px;
}

.activity-info {
    flex: 1;
    min-width: 0;
}

.activity-title {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.activity-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.activity-status {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 6px;
}

.activity-status.verified {
    background: rgba(16, 185, 129, 0.15);
    color: var(--brand-green);
}

.activity-status.warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--brand-gold);
}

.activity-status.failed {
    background: rgba(239, 68, 68, 0.15);
    color: var(--brand-red);
}

/* Non-founder Dashboard (Regular User) */
.dashboard-account-card.regular-user {
    background: var(--bg-card);
    border-color: var(--border);
}

.dashboard-account-card.regular-user .account-type-icon {
    background: var(--bg-elevated);
    box-shadow: none;
}

.dashboard-account-card.regular-user .account-type-icon svg {
    stroke: var(--text-secondary);
}

.dashboard-account-card.regular-user .badge-tier {
    color: var(--text-primary);
    text-shadow: none;
}

.dashboard-account-card.regular-user .account-type-locked {
    border-color: var(--border);
    color: var(--text-secondary);
}

/* ============================================
   ADD CREDITS MODAL - Premium Design
   ============================================ */

.modal-credits {
    max-width: 520px;
}

.modal-header-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.modal-header-icon {
    width: 48px;
    height: 48px;
    background: var(--brand-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(67, 132, 255, 0.3);
}

.modal-header-icon svg {
    width: 24px;
    height: 24px;
    stroke: white;
}

.modal-header-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Rate Display */
.credits-rate-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    margin-bottom: 24px;
}

.rate-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.credits-rate-display .rate-label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.credits-rate-display .rate-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-green);
}

.rate-discount {
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-gold);
    background: rgba(245, 158, 11, 0.15);
    padding: 4px 10px;
    border-radius: 20px;
}

.rate-comparison {
    text-align: right;
}

.standard-rate {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: line-through;
}

/* Quick Select Buttons */
.credits-quick-select {
    margin-bottom: 24px;
}

.quick-select-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.quick-select-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.quick-btn {
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 50px;
}

.quick-btn:hover {
    background: rgba(67, 132, 255, 0.1);
    border-color: rgba(67, 132, 255, 0.3);
    color: var(--text-primary);
}

.quick-btn.active {
    background: var(--brand-gradient);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 12px rgba(67, 132, 255, 0.3);
}

/* Slider Section */
.credits-slider-section {
    margin-bottom: 24px;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.slider-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.credits-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
}

.credits-amount-input {
    width: 80px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    text-align: right;
    font-family: 'SF Mono', Monaco, monospace;
}

.credits-amount-input:focus {
    outline: none;
}

.credits-amount-input::-webkit-inner-spin-button,
.credits-amount-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.credits-suffix {
    font-size: 13px;
    color: var(--text-muted);
}

/* Slider */
.slider-container {
    position: relative;
    padding: 10px 0;
}

.credits-slider {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.credits-slider::-webkit-slider-runnable-track {
    height: 8px;
    background: transparent;
    border-radius: 4px;
}

.credits-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    margin-top: -8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 0 2px var(--brand-blue);
    cursor: grab;
    transition: transform 0.15s ease;
}

.credits-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.credits-slider::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.05);
}

.credits-slider::-moz-range-track {
    height: 8px;
    background: transparent;
    border-radius: 4px;
}

.credits-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 0 2px var(--brand-blue);
    cursor: grab;
}

.slider-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1;
}

.slider-fill {
    height: 100%;
    background: var(--brand-gradient);
    border-radius: 4px;
    transition: width 0.1s ease;
}

.slider-markers {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-muted);
}

/* Price Summary */
.credits-price-summary {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.summary-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.summary-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.summary-credits .summary-value {
    font-size: 16px;
    font-family: 'SF Mono', Monaco, monospace;
}

.summary-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}

.summary-total .summary-label {
    font-weight: 600;
    color: var(--text-primary);
}

.summary-price {
    font-size: 24px !important;
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.summary-savings {
    background: rgba(16, 185, 129, 0.08);
    margin: 8px -20px -20px;
    padding: 12px 20px;
    border-radius: 0 0 13px 13px;
}

.summary-savings .summary-label {
    color: var(--accent-green);
}

.summary-savings-value {
    color: var(--accent-green) !important;
}

.summary-minimum {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 8px;
    font-size: 13px;
    color: var(--brand-gold);
}

.summary-minimum svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Purchase Button */
.btn-purchase {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 28px;
    background: linear-gradient(135deg, var(--accent-green) 0%, #059669 100%);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
    margin-bottom: 16px;
}

.btn-purchase:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.btn-purchase:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-purchase svg {
    width: 20px;
    height: 20px;
}

.btn-price {
    margin-left: auto;
    padding-left: 16px;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 700;
}

/* Credits Note */
.credits-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
}

.credits-note svg {
    width: 16px;
    height: 16px;
    stroke: var(--accent-green);
    flex-shrink: 0;
}

/* Responsive Dashboard */
@media (max-width: 768px) {
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .referral-code-display {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-share-referral {
        width: 100%;
        justify-content: center;
    }

    .referral-stats-row {
        grid-template-columns: 1fr;
    }

    .credits-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .btn-add-credits-inline {
        width: 100%;
        justify-content: center;
    }

    .account-type-header {
        flex-direction: column;
        text-align: center;
    }

    .account-type-icon {
        margin: 0 auto;
    }

    .account-type-badge {
        justify-content: center;
    }
}

/* ============================================
   TEAM / ORGANIZATION STYLES
   Phase 1 - Foundation
   ============================================ */

/* No Organization State */
.no-org-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    text-align: center;
}

.no-org-message svg {
    width: 64px;
    height: 64px;
    stroke: var(--text-muted);
    margin-bottom: 24px;
    opacity: 0.5;
}

.no-org-message h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.no-org-message p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    max-width: 400px;
    line-height: 1.6;
}

/* Organization Settings Card */
.org-settings-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    animation: fadeInUp 0.4s ease-out;
}

.org-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px;
    background: linear-gradient(135deg, rgba(67, 132, 255, 0.08) 0%, rgba(123, 66, 255, 0.05) 100%);
    border-bottom: 1px solid var(--border);
}

.org-avatar {
    width: 72px;
    height: 72px;
    background: var(--brand-gradient);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(67, 132, 255, 0.3);
}

.org-info {
    flex: 1;
    min-width: 0;
}

.org-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.org-slug {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-family: 'SF Mono', Monaco, monospace;
}

.org-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.org-role-badge.role-owner {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.org-role-badge.role-admin {
    background: rgba(123, 66, 255, 0.15);
    color: #a78bfa;
}

.org-role-badge.role-member {
    background: rgba(67, 132, 255, 0.15);
    color: #60a5fa;
}

.org-role-badge.role-external {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

/* Organization Details */
.org-details {
    padding: 24px 28px;
}

.org-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.org-detail-row:last-child {
    border-bottom: none;
}

.org-detail-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.org-detail-value {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
}

.org-detail-value.mono {
    font-family: 'SF Mono', Monaco, monospace;
}

/* Aliases for detail-row (HTML uses both org-detail-row and detail-row) */
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.detail-value {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Validation Status (inline text) */
.validation-pending {
    color: #fbbf24;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.validation-pending::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #f59e0b;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.validation-valid,
.validation-verified {
    color: #34d399;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.validation-valid::before,
.validation-verified::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
}

.validation-invalid,
.validation-rejected {
    color: #f87171;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Validation Status Badges */
.validation-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.validation-badge.pending {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.validation-badge.valid {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.validation-badge.invalid {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.validation-badge.manual_review {
    background: rgba(67, 132, 255, 0.15);
    color: #60a5fa;
}

.validation-badge.skipped {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

.validation-badge svg {
    width: 14px;
    height: 14px;
}

/* Organization Credits Card */
.org-credits-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.02) 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 16px;
    padding: 24px 28px;
    margin-top: 24px;
}

.org-credits-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.org-credits-balance {
    display: flex;
    flex-direction: column;
}

.credits-balance-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.credits-balance-value {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.org-credits-rate {
    text-align: right;
}

.credits-rate-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.credits-rate-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--accent-green);
}

.org-credits-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid rgba(16, 185, 129, 0.2);
}

.credits-stat {
    display: flex;
    flex-direction: column;
}

.credits-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.credits-stat-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Members Panel */
.members-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.members-count {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.members-count strong {
    color: var(--text-primary);
}

.btn-invite-member {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--brand-gradient);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-invite-member:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 132, 255, 0.35);
}

.btn-invite-member:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-invite-member svg {
    width: 16px;
    height: 16px;
}

/* Members Grid */
.members-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.member-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    transition: all 0.2s ease;
}

.member-card:hover {
    border-color: rgba(67, 132, 255, 0.3);
    background: var(--bg-elevated);
}

.member-card.is-you {
    border-color: rgba(67, 132, 255, 0.2);
    background: linear-gradient(135deg, rgba(67, 132, 255, 0.05) 0%, transparent 100%);
}

.member-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    flex-shrink: 0;
    overflow: hidden;
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-info {
    flex: 1;
    min-width: 0;
}

.member-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.member-name .you-badge {
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--brand-blue);
    background: rgba(67, 132, 255, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.member-email {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.member-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.member-joined {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Create Organization Modal */
.modal-create-org {
    max-width: 560px;
}

.modal-create-org .modal-header {
    background: linear-gradient(135deg, rgba(67, 132, 255, 0.1) 0%, rgba(123, 66, 255, 0.08) 100%);
}

.form-section {
    margin-bottom: 28px;
}

.form-section:last-child {
    margin-bottom: 0;
}

.form-section-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-subtle);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-select {
    width: 100%;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 44px;
}

.form-select:focus {
    outline: none;
    border-color: var(--brand-blue);
    background-color: rgba(67, 132, 255, 0.05);
}

.form-select option {
    background: #1e293b;
    color: var(--text-primary);
}

.form-hint {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.form-optional {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: normal;
    margin-left: 8px;
}

.btn-create-org {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 28px;
    background: var(--brand-gradient);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(67, 132, 255, 0.3);
}

.btn-create-org:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(67, 132, 255, 0.4);
}

.btn-create-org:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-create-org svg {
    width: 20px;
    height: 20px;
}

/* Error state for forms */
.form-input.error,
.form-select.error {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
}

.form-error {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    color: var(--danger);
    margin-top: 8px;
}

.form-error svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ============================================
   ORGANIZATION SETTINGS - ENHANCED STYLES
   ============================================ */

/* Main Settings Container */
.org-settings-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Enhanced Org Settings Card */
.org-settings-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: fadeInUp 0.4s ease-out;
}

.org-settings-card:hover {
    border-color: rgba(67, 132, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Enhanced Header with gradient */
.org-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px;
    background: linear-gradient(135deg,
        rgba(67, 132, 255, 0.12) 0%,
        rgba(139, 92, 246, 0.08) 50%,
        rgba(16, 185, 129, 0.05) 100%);
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.org-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

/* Enhanced Avatar */
.org-avatar {
    width: 72px;
    height: 72px;
    background: var(--brand-gradient);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(67, 132, 255, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
}

/* Company Info Section */
.org-company-info {
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-subtle);
}

.org-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.org-section-title svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.company-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.info-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border);
}

.info-item-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.info-item-value {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
}

.info-item-value.mono {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.875rem;
}

/* Stats Cards Row */
.org-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-subtle);
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 14px;
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(67, 132, 255, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.stat-card-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 12px;
}

.stat-card-icon svg {
    width: 22px;
    height: 22px;
}

.stat-card-icon.members {
    background: rgba(67, 132, 255, 0.15);
    color: #60a5fa;
}

.stat-card-icon.credits {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.stat-card-icon.sessions {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

.stat-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-card-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Enhanced Credits Card */
.org-credits-card {
    background: linear-gradient(135deg,
        rgba(16, 185, 129, 0.1) 0%,
        rgba(16, 185, 129, 0.02) 100%);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 16px;
    padding: 24px 28px;
    margin-top: 24px;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.1);
}

.org-credits-card:hover {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.15);
}

/* Billing Section */
.org-billing-section {
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-subtle);
}

.billing-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.billing-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 14px;
    transition: all 0.2s ease;
}

.billing-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(67, 132, 255, 0.2);
}

.billing-card-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(67, 132, 255, 0.1);
    border-radius: 10px;
    color: var(--brand-blue);
    flex-shrink: 0;
}

.billing-card-icon svg {
    width: 20px;
    height: 20px;
}

.billing-card-content {
    flex: 1;
    min-width: 0;
}

.billing-card-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.billing-card-value {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Actions Section */
.org-actions-section {
    padding: 24px 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-org-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-org-action:hover {
    background: rgba(67, 132, 255, 0.1);
    border-color: rgba(67, 132, 255, 0.3);
    transform: translateY(-1px);
}

.btn-org-action svg {
    width: 18px;
    height: 18px;
    opacity: 0.8;
}

.btn-org-action.primary {
    background: var(--brand-gradient);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 12px rgba(67, 132, 255, 0.25);
}

.btn-org-action.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 132, 255, 0.35);
}

/* Danger Zone Section */
.org-danger-zone {
    margin-top: 32px;
    padding: 24px 28px;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 16px;
}

.danger-zone-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.danger-zone-header svg {
    width: 20px;
    height: 20px;
    color: #f87171;
}

.danger-zone-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #f87171;
}

.danger-zone-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.danger-zone-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    max-width: 400px;
}

.btn-delete-org {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 10px;
    color: #f87171;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-delete-org:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: #f87171;
}

.btn-delete-org svg {
    width: 16px;
    height: 16px;
}

/* Empty Org State */
.no-org-card {
    background: linear-gradient(135deg,
        rgba(67, 132, 255, 0.08) 0%,
        rgba(139, 92, 246, 0.05) 100%);
    border: 1px dashed rgba(67, 132, 255, 0.3);
    border-radius: 16px;
    padding: 48px 32px;
    text-align: center;
}

.no-org-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(67, 132, 255, 0.15);
    border-radius: 16px;
    color: var(--brand-blue);
}

.no-org-icon svg {
    width: 32px;
    height: 32px;
}

.no-org-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.no-org-description {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Team Responsive */
@media (max-width: 768px) {
    .org-header {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
    }

    .org-avatar {
        margin: 0 auto;
    }

    .org-name {
        justify-content: center;
        flex-wrap: wrap;
    }

    .members-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .btn-invite-member {
        width: 100%;
        justify-content: center;
    }

    .member-card {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding: 20px;
    }

    .member-meta {
        align-items: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .org-credits-stats {
        grid-template-columns: 1fr;
    }

    /* Enhanced responsive - Organization Settings */
    .company-info-grid {
        grid-template-columns: 1fr;
    }

    .org-stats-row {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .stat-card {
        flex-direction: row;
        text-align: left;
        gap: 16px;
        padding: 16px;
    }

    .stat-card-icon {
        margin-bottom: 0;
    }

    .stat-card-content {
        display: flex;
        flex-direction: column;
    }

    .billing-cards-grid {
        grid-template-columns: 1fr;
    }

    .org-actions-section {
        flex-direction: column;
        padding: 20px;
    }

    .btn-org-action {
        width: 100%;
        justify-content: center;
    }

    .danger-zone-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .danger-zone-text {
        max-width: none;
    }

    .btn-delete-org {
        width: 100%;
        justify-content: center;
    }

    .org-company-info,
    .org-billing-section {
        padding: 20px;
    }
}

/* ============================================
   PHASE 2: MEMBER MANAGEMENT STYLES
   ============================================ */

/* Role Select Dropdown */
.role-select {
    padding: 8px 32px 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px;
}

.role-select:hover {
    border-color: var(--brand-blue);
    background-color: rgba(67, 132, 255, 0.08);
}

.role-select:focus {
    outline: none;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(67, 132, 255, 0.15);
}

.role-select option {
    background: #1e293b;
    color: var(--text-primary);
    padding: 8px;
}

/* Member Role Section */
.member-role-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Member Actions */
.member-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.btn-icon-danger:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.btn-icon svg {
    width: 18px;
    height: 18px;
}

/* Members List Container */
.members-list-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Members Footer */
.members-footer {
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
}

/* Leave/Danger Outline Button */
.btn-danger-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    color: #f87171;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger-outline:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.5);
}

.btn-danger-outline svg {
    width: 16px;
    height: 16px;
}

/* You Badge */
.you-badge {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(67, 132, 255, 0.15);
    color: var(--brand-blue);
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Modal Sizes */
.modal-sm {
    max-width: 440px;
}

/* Warning Text */
.warning-text {
    color: #f87171 !important;
    font-size: 0.875rem;
}

/* Confirm Input */
.confirm-input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9375rem;
    margin-top: 12px;
}

.confirm-input:focus {
    outline: none;
    border-color: var(--brand-blue);
    background: rgba(67, 132, 255, 0.05);
}

.confirm-input::placeholder {
    color: var(--text-muted);
}

/* Button Warning */
.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4);
}

/* Button Danger */
.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

/* Loading Spinner Tiny (for buttons) */
.loading-spinner-tiny {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ============================================
   ACTIVITY LOG STYLES
   ============================================ */

.activity-log {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.activity-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border);
}

.activity-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(123, 66, 255, 0.15);
    border-radius: 10px;
    color: #a78bfa;
    flex-shrink: 0;
}

.activity-icon svg {
    width: 16px;
    height: 16px;
}

/* Activity icon colors by type */
.activity-icon.organization_created {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.activity-icon.member_added {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.activity-icon.member_removed,
.activity-icon.member_left {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.activity-icon.role_changed {
    background: rgba(67, 132, 255, 0.15);
    color: #60a5fa;
}

.activity-icon.ownership_transferred {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.activity-icon.settings_updated {
    background: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
}

.activity-icon.credits_added {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.activity-icon.credits_used {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-description {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.activity-description strong {
    color: var(--text-primary);
    font-weight: 600;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Activity Empty State */
.activity-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.activity-empty svg {
    width: 48px;
    height: 48px;
    stroke: var(--text-muted);
    margin-bottom: 16px;
    opacity: 0.5;
}

.activity-empty p {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

/* Activity Restricted */
.activity-restricted {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    color: var(--text-muted);
}

/* Member Card with grid layout for actions */
.member-card {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 16px;
}

/* Member Card Responsive */
@media (max-width: 768px) {
    .member-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .member-avatar {
        margin: 0 auto;
    }

    .member-role-section {
        justify-content: center;
    }

    .member-actions {
        justify-content: center;
    }
}

/* ===== PHASE 3: INVITATIONS ===== */

/* Invite Modal */
.modal-invite {
    max-width: 480px;
}

.role-descriptions {
    margin-top: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
}

.role-desc strong {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.role-desc ul {
    margin: 0;
    padding-left: 20px;
    color: var(--text-muted);
    font-size: 0.8125rem;
    line-height: 1.6;
}

.role-desc li {
    margin-bottom: 4px;
}

/* Pending Invitations Section */
.pending-invitations-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
}

.pending-invitations-section h3 {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.invitations-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.invitation-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.invitation-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border);
}

.invitation-info {
    flex: 1;
    min-width: 0;
}

.invitation-email {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.invitation-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.invitation-date,
.invitation-expiry {
    opacity: 0.8;
}

.invitation-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Invitation Notification */
.invitation-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.invitation-notification.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

.invitation-notification-content {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.95), rgba(139, 92, 246, 0.95));
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 420px;
    backdrop-filter: blur(8px);
}

.invitation-notification-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #fff;
    flex-shrink: 0;
}

.invitation-notification-icon svg {
    width: 24px;
    height: 24px;
}

.invitation-notification-text {
    flex: 1;
    min-width: 0;
}

.invitation-notification-text strong {
    display: block;
    color: #fff;
    margin-bottom: 2px;
    font-size: 0.9375rem;
}

.invitation-notification-text span {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.8);
}

.invitation-notification-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Small button variants for notification */
.btn-sm {
    padding: 6px 14px;
    font-size: 0.8125rem;
}

/* My Invitations Modal */
.modal-invitations {
    max-width: 520px;
}

.invitations-list-modal {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 120px;
}

.invitation-card-full {
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.invitation-card-full:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(99, 102, 241, 0.3);
}

.invitation-org {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.org-avatar-sm {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--brand-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    font-weight: 600;
    color: #fff;
    overflow: hidden;
    flex-shrink: 0;
}

.org-avatar-sm img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.org-details {
    flex: 1;
    min-width: 0;
}

.org-details strong {
    display: block;
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 2px;
}

.org-details span {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.invitation-role-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.invitation-card-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Accept Invite Modal */
.accept-invite-content {
    padding: 32px 24px;
    text-align: center;
}

.org-avatar-lg {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    border-radius: 16px;
    background: var(--brand-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 600;
    color: #fff;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.org-avatar-lg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.accept-invite-content h3 {
    margin: 0 0 8px;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.accept-invite-content p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.9375rem;
}

/* Activity icon colors for invitation types */
.activity-icon.invitation_sent {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}

.activity-icon.invitation_accepted {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.activity-icon.invitation_declined {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.activity-icon.invitation_revoked {
    background: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
}

/* Empty state for invitations */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.empty-state svg {
    stroke: var(--text-muted);
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin: 0;
}

/* Responsive adjustments for invitations */
@media (max-width: 480px) {
    .invitation-notification {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }

    .invitation-notification-content {
        flex-wrap: wrap;
        max-width: none;
    }

    .invitation-notification-text {
        flex: 1 0 calc(100% - 56px);
    }

    .invitation-notification-actions {
        width: 100%;
        margin-top: 12px;
        justify-content: flex-end;
    }

    .invitation-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .invitation-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .invitation-card-actions {
        width: 100%;
    }

    .invitation-card-actions .btn-secondary,
    .invitation-card-actions .btn-primary {
        flex: 1;
    }
}

/* ============================================
   PHASE 4: ORGANIZATION CREDITS STYLES
   ============================================ */

/* Organization Credits Section */
.org-credits-section {
    margin-top: 0;
    padding: 24px 28px;
    border-top: 1px solid var(--border-subtle);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.03) 0%, transparent 100%);
}

.org-credits-section h3 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.org-credits-section h3::before {
    content: '';
    width: 4px;
    height: 16px;
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    border-radius: 2px;
}

/* Credits Overview */
.credits-overview {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.credit-stat {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px 24px;
    text-align: center;
    transition: all 0.2s ease;
}

.credit-stat:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(16, 185, 129, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.credit-stat.primary {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.1);
}

.credit-stat.primary:hover {
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15);
}

.credit-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.credit-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Lifetime Stats */
.credits-lifetime {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}

.lifetime-stat {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.lifetime-label {
    opacity: 0.8;
}

.lifetime-value {
    color: var(--text-secondary);
    font-weight: 500;
    margin-left: 6px;
}

/* Credits Actions */
.credits-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.8125rem;
}

/* Credit Packages Grid */
.credit-packages {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.credit-package {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.credit-package:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(139, 92, 246, 0.4);
}

.credit-package.popular {
    border-color: rgba(139, 92, 246, 0.5);
    background: rgba(139, 92, 246, 0.08);
}

.credit-package.selected {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.15);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.3);
}

.package-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.package-credits {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.package-price {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Custom Amount Input */
.custom-amount {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
}

.custom-amount label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.custom-input-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.custom-input-group input {
    flex: 1;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
}

.custom-input-group input:focus {
    outline: none;
    border-color: var(--brand-blue);
}

.custom-price {
    color: var(--text-muted);
    min-width: 100px;
    font-size: 0.875rem;
}

/* Credit History Table */
.credit-history-table {
    width: 100%;
    border-collapse: collapse;
}

.credit-history-table th,
.credit-history-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

.credit-history-table th {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.credit-history-table td {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.credit-history-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.credit-history-table .positive {
    color: #4ade80;
    font-weight: 600;
}

.credit-history-table .negative {
    color: #f87171;
    font-weight: 600;
}

/* Member Usage Grid */
.usage-stats-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.member-usage-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.member-usage-card:hover {
    background: rgba(255, 255, 255, 0.04);
}

.member-avatar-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.3));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #a78bfa;
    flex-shrink: 0;
}

.member-usage-info {
    flex: 1;
    min-width: 0;
}

.member-usage-info .member-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.member-usage-info .member-email {
    font-size: 0.8125rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-usage-stats {
    display: flex;
    gap: 20px;
}

.usage-stat {
    text-align: right;
}

.usage-value {
    display: block;
    font-weight: 600;
    font-size: 1rem;
    color: #fff;
}

.usage-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Credit Source Badge */
.credit-source-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.credit-source-badge.org {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

.credit-source-badge.personal {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.credit-source-badge svg {
    width: 14px;
    height: 14px;
}

/* Modal Credits */
.modal-credits {
    max-width: 520px;
}

.modal-lg {
    max-width: 700px;
}

.credits-intro {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin-bottom: 8px;
}

/* Activity icons for credit actions */
.activity-icon.credits_used {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.activity-icon.credits_added {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

/* Error State */
.error-state {
    color: var(--danger);
    text-align: center;
    padding: 24px;
}

/* Phase 4 Responsive */
@media (max-width: 640px) {
    .credits-overview {
        flex-direction: column;
    }

    .credits-lifetime {
        flex-direction: column;
        gap: 8px;
    }

    .credits-actions {
        flex-direction: column;
    }

    .credits-actions .btn-sm {
        width: 100%;
        justify-content: center;
    }

    .credit-packages {
        grid-template-columns: 1fr;
    }

    .member-usage-card {
        flex-wrap: wrap;
    }

    .member-usage-stats {
        width: 100%;
        justify-content: space-around;
        padding-top: 12px;
        border-top: 1px solid var(--border-subtle);
        margin-top: 8px;
    }

    .usage-stat {
        text-align: center;
    }

    .credit-history-table {
        display: block;
        overflow-x: auto;
    }
}

/* ============================================
   PHASE 5: TEAM DASHBOARD & BILLING STYLES
   ============================================ */

/* Dashboard Stats Grid */
.team-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.dashboard-stat-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s ease;
}

.dashboard-stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.dashboard-stat-card .stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.dashboard-stat-card .stat-value {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.dashboard-stat-card .stat-value.gradient-text {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-stat-card .stat-change {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.dashboard-stat-card .stat-change.positive {
    color: var(--accent-green);
}

.dashboard-stat-card .stat-change.negative {
    color: var(--danger);
}

/* Dashboard Stat Card - Icon and Content Layout */
.dashboard-stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dashboard-stat-card .stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.dashboard-stat-card .stat-icon svg {
    width: 24px;
    height: 24px;
}

.dashboard-stat-card .stat-icon.credits-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.05) 100%);
    color: #34d399;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

.dashboard-stat-card .stat-icon.sessions-icon {
    background: linear-gradient(135deg, rgba(67, 132, 255, 0.15) 0%, rgba(67, 132, 255, 0.05) 100%);
    color: #60a5fa;
    box-shadow: 0 2px 8px rgba(67, 132, 255, 0.15);
}

.dashboard-stat-card .stat-icon.usage-icon {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(139, 92, 246, 0.05) 100%);
    color: #a78bfa;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.15);
}

.dashboard-stat-card .stat-icon.members-icon {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.05) 100%);
    color: #fbbf24;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

.dashboard-stat-card .stat-content {
    flex: 1;
    min-width: 0;
}

/* Enhanced dashboard stat card hover */
.dashboard-stat-card:hover {
    border-color: rgba(67, 132, 255, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.dashboard-stat-card:hover .stat-icon {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

/* Billing Info Grid */
.billing-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.billing-info-item {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 16px;
}

.billing-info-item .info-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.billing-info-item .info-value {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 500;
}

.billing-info-item .info-value.highlight {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Billing label and value (used in HTML) */
.billing-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
    display: block;
}

.billing-value {
    font-size: 0.9375rem;
    color: var(--text-primary);
    font-weight: 500;
}

.billing-value.status-active {
    color: #34d399;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.billing-value.status-active::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.billing-value.status-inactive {
    color: var(--text-muted);
}

/* Billing Actions */
.billing-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Invoices Table */
.invoices-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.invoices-table th,
.invoices-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

.invoices-table th {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    background: var(--bg-card);
}

.invoices-table td {
    font-size: 14px;
    color: var(--text-primary);
}

.invoices-table tr:hover td {
    background: var(--bg-hover);
}

.invoices-table .invoice-number {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 13px;
}

.invoices-table .invoice-amount {
    font-weight: 600;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.status-paid,
.status-badge.status-active {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.status-badge.status-pending {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.status-badge.status-overdue,
.status-badge.status-failed {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.status-badge.status-inactive,
.status-badge.status-draft {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

/* Form Elements for Billing */
.input-with-suffix {
    display: flex;
    align-items: center;
    gap: 0;
}

.input-with-suffix input {
    border-radius: 8px 0 0 8px;
    border-right: none;
}

.input-with-suffix .input-suffix {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-left: none;
    border-radius: 0 8px 8px 0;
    padding: 12px 16px;
    color: var(--text-secondary);
    font-size: 14px;
    white-space: nowrap;
}

/* Toggle Switch */
.toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.toggle-label input[type="checkbox"] {
    display: none;
}

.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 13px;
    transition: all 0.2s ease;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: all 0.2s ease;
}

.toggle-label input:checked + .toggle-switch {
    background: var(--brand-gradient);
    border-color: transparent;
}

.toggle-label input:checked + .toggle-switch::after {
    left: 25px;
    background: white;
}

.toggle-text {
    font-size: 14px;
    color: var(--text-primary);
}

/* Info Box */
.info-box {
    background: rgba(67, 132, 255, 0.1);
    border: 1px solid rgba(67, 132, 255, 0.2);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.info-box svg {
    flex-shrink: 0;
    color: var(--brand-blue);
}

/* Auto-Recharge Fields */
.auto-recharge-fields {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

.auto-recharge-fields.hidden {
    display: none;
}

.recharge-preview {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}

.recharge-preview .preview-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.recharge-preview .preview-value {
    font-size: 20px;
    font-weight: 600;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Organization Billing Section - Enhanced */
.org-billing-section {
    margin-top: 0;
    padding: 24px 28px;
    border-top: 1px solid var(--border-subtle);
    background: linear-gradient(135deg, rgba(67, 132, 255, 0.03) 0%, transparent 100%);
}

.org-billing-section h3,
.org-billing-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.org-billing-section h3::before,
.org-billing-section h4::before {
    content: '';
    width: 4px;
    height: 16px;
    background: linear-gradient(135deg, #4384ff 0%, #7b42ff 100%);
    border-radius: 2px;
}

.org-billing-section h4 svg {
    color: var(--brand-blue);
}

/* Invoice Download Button */
.btn-invoice-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-invoice-download:hover {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
}

/* Empty State */
.invoices-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.invoices-empty svg {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.invoices-empty p {
    font-size: 14px;
}

/* Phase 5 Responsive */
@media (max-width: 768px) {
    .team-dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .billing-info-grid {
        grid-template-columns: 1fr;
    }

    .billing-actions {
        flex-direction: column;
    }

    .billing-actions .btn-sm {
        width: 100%;
        justify-content: center;
    }

    .invoices-table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .team-dashboard-stats {
        grid-template-columns: 1fr;
    }

    .dashboard-stat-card .stat-value {
        font-size: 24px;
    }
}

/* ============================================
   RETURN TO WORK BANNER
   Shows when user has an active session in progress
   ============================================ */

.return-to-work-banner {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.1));
    border-bottom: 1px solid rgba(59, 130, 246, 0.3);
    padding: 12px 24px;
    position: sticky;
    top: 0;
    z-index: 1000;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.return-banner-content {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.return-banner-icon {
    color: #3b82f6;
    flex-shrink: 0;
}

.return-banner-icon svg {
    display: block;
}

.return-banner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.return-banner-text strong {
    color: rgba(255, 255, 255, 0.95);
    font-size: 14px;
    font-weight: 600;
}

.return-banner-text span {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
}

.return-banner-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.return-banner-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.return-banner-btn:active {
    transform: translateY(0);
}

.return-banner-btn svg {
    flex-shrink: 0;
}

.return-banner-dismiss {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s ease, background 0.2s ease;
    flex-shrink: 0;
}

.return-banner-dismiss:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
}

.return-banner-dismiss svg {
    display: block;
}

/* Light theme support */
[data-theme="light"] .return-to-work-banner,
.theme-light .return-to-work-banner {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.05));
    border-bottom-color: rgba(59, 130, 246, 0.2);
}

[data-theme="light"] .return-banner-text strong,
.theme-light .return-banner-text strong {
    color: #0f172a;
}

[data-theme="light"] .return-banner-text span,
.theme-light .return-banner-text span {
    color: #64748b;
}

[data-theme="light"] .return-banner-dismiss,
.theme-light .return-banner-dismiss {
    color: rgba(15, 23, 42, 0.4);
}

[data-theme="light"] .return-banner-dismiss:hover,
.theme-light .return-banner-dismiss:hover {
    color: rgba(15, 23, 42, 0.8);
    background: rgba(15, 23, 42, 0.05);
}

/* Responsive */
@media (max-width: 768px) {
    .return-to-work-banner {
        padding: 12px 16px;
    }

    .return-banner-content {
        gap: 12px;
    }

    .return-banner-icon {
        display: none;
    }

    .return-banner-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .return-banner-content {
        flex-wrap: wrap;
    }

    .return-banner-text {
        order: 1;
        flex-basis: calc(100% - 32px);
    }

    .return-banner-btn {
        order: 3;
        flex-grow: 1;
        justify-content: center;
    }

    .return-banner-dismiss {
        order: 2;
    }
}

/* ============================================
   DEVELOPER DASHBOARD STYLES
   API Keys, Usage Stats, Quick Start, Webhooks
   ============================================ */

/* ---- Stat Tiles ---- */
.dev-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.dev-stat-tile {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.2s ease;
}

.dev-stat-tile:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.dev-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.dev-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---- API Key List ---- */
.dev-key-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border-subtle);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.dev-key-row {
    display: grid;
    grid-template-columns: 140px 1fr auto auto auto 80px 100px auto;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    background: var(--bg-elevated);
    transition: background 0.15s ease;
}

.dev-key-row:hover {
    background: var(--bg-hover);
}

.dev-key-revoked {
    opacity: 0.5;
}

.dev-key-prefix code {
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 0.8125rem;
    color: var(--brand-purple);
    background: rgba(123, 66, 255, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
}

.dev-key-name {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dev-key-requests {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.dev-key-created {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.dev-key-placeholder {
    width: 60px;
}

/* Status badges */
.dev-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.dev-badge-active {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.dev-badge-revoked {
    background: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
}

/* ---- Usage Chart ---- */
.dev-chart-container {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.dev-chart-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.dev-chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 120px;
}

.dev-chart-bar {
    flex: 1;
    min-width: 4px;
    background: linear-gradient(180deg, var(--brand-blue) 0%, var(--brand-purple) 100%);
    border-radius: 2px 2px 0 0;
    transition: opacity 0.2s ease;
    cursor: default;
}

.dev-chart-bar:hover {
    opacity: 0.8;
}

.dev-chart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Mode breakdown */
.dev-mode-breakdown {
    display: flex;
    gap: 24px;
    padding: 12px 0;
}

.dev-mode-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dev-mode-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dev-mode-count {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

/* ---- Code Blocks (Quick Start) ---- */
.dev-code-block {
    background: #12121e;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

.dev-code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dev-code-title {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.dev-code-copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dev-code-copy:hover {
    background: rgba(123, 66, 255, 0.15);
    border-color: rgba(123, 66, 255, 0.3);
    color: var(--brand-purple);
}

.dev-code-copy svg {
    width: 14px;
    height: 14px;
}

.dev-code-content {
    padding: 16px 20px;
    margin: 0;
    font-family: 'SF Mono', Monaco, Consolas, 'Liberation Mono', monospace;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: #c9d1d9;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* ---- Webhook List ---- */
.dev-webhook-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border-subtle);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.dev-webhook-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-elevated);
    transition: background 0.15s ease;
}

.dev-webhook-row:hover {
    background: var(--bg-hover);
}

.dev-webhook-info {
    flex: 1;
    min-width: 0;
}

.dev-webhook-url code {
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 0.8125rem;
    color: var(--brand-blue);
    word-break: break-all;
}

.dev-webhook-events {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.dev-webhook-failures {
    font-size: 0.75rem;
    color: var(--danger);
    font-weight: 500;
}

.dev-webhook-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.btn-danger-sm {
    color: var(--danger) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
}

.btn-danger-sm:hover {
    background: rgba(239, 68, 68, 0.15) !important;
}

/* ---- Create Key Modal: Radio + Checkbox Groups ---- */
.dev-radio-group {
    display: flex;
    gap: 12px;
}

.dev-radio-label {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.dev-radio-label:hover {
    border-color: var(--border-hover);
}

.dev-radio-label:has(input:checked) {
    border-color: var(--brand-blue);
    background: rgba(67, 132, 255, 0.08);
}

.dev-radio-label input {
    margin-bottom: 2px;
}

.dev-radio-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.dev-radio-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.dev-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.dev-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.dev-checkbox-label:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.dev-checkbox-label:has(input:checked) {
    border-color: var(--brand-blue);
    background: rgba(67, 132, 255, 0.08);
    color: var(--text-primary);
}

.dev-checkbox-label input {
    accent-color: var(--brand-blue);
}

/* ---- API Key Created: Warning + Display ---- */
.dev-key-warning {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 10px;
    margin-bottom: 20px;
}

.dev-key-warning svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #fbbf24;
}

.dev-key-warning p {
    margin: 0;
    font-size: 0.875rem;
    color: #fbbf24;
    font-weight: 500;
}

.dev-key-display {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: #12121e;
    border: 1px solid rgba(123, 66, 255, 0.3);
    border-radius: 10px;
    margin-bottom: 20px;
}

.dev-key-display code {
    flex: 1;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 0.8125rem;
    color: var(--brand-purple);
    word-break: break-all;
    line-height: 1.5;
}

.btn-copy-key {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(123, 66, 255, 0.15);
    border: 1px solid rgba(123, 66, 255, 0.3);
    border-radius: 8px;
    color: var(--brand-purple);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-copy-key:hover {
    background: rgba(123, 66, 255, 0.25);
}

.btn-copy-key svg {
    width: 16px;
    height: 16px;
}

/* ---- Developer Panel Responsive ---- */
@media (max-width: 768px) {
    .dev-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dev-key-row {
        grid-template-columns: 1fr auto;
        gap: 8px;
    }

    .dev-key-requests,
    .dev-key-created {
        display: none;
    }

    .dev-radio-group {
        flex-direction: column;
    }

    .dev-mode-breakdown {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .dev-stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .dev-stat-value {
        font-size: 1.25rem;
    }

    .dev-webhook-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .dev-webhook-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ---- API Key: Mode Scoping & Privacy (new columns) ---- */

/* Form hint text below labels */
.form-hint {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8125rem;
    margin-top: 2px;
    margin-bottom: 8px;
}

/* Checkbox group for allowed modes */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--brand-purple);
    cursor: pointer;
}

/* Select control for privacy mode */
.form-control {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
}

.form-control:focus {
    border-color: var(--brand-purple);
}

.form-control option {
    background: #1a1a2e;
    color: var(--text-primary);
}

/* Mode badge pills in key list */
.dev-key-modes {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-width: 90px;
}

.mode-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    background: rgba(123, 66, 255, 0.15);
    color: #c4b5fd;
    border: 1px solid rgba(123, 66, 255, 0.35);
    white-space: nowrap;
}

.mode-badge-all {
    background: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.3);
}

/* Privacy mode label in key list */
.privacy-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.privacy-label.ephemeral {
    color: #fca5a5;
}

.privacy-label.restricted {
    color: #fcd34d;
}

@media (max-width: 768px) {
    .dev-key-modes,
    .privacy-label {
        display: none;
    }
}

/* BYOK indicator badge */
.byok-badge {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.35);
}

/* Form input (for BYOK text fields) */
.form-input {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--brand-purple);
    box-shadow: 0 0 0 2px rgba(123, 66, 255, 0.15);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

/* ============================================
   SIDEBAR CREDIT PILL
   ============================================ */

.sidebar-credit-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 12px 8px;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(67, 132, 255, 0.12) 0%, rgba(123, 66, 255, 0.12) 100%);
    border: 1px solid rgba(67, 132, 255, 0.25);
    border-radius: 10px;
    cursor: default;
    transition: border-color 0.2s;
}

.sidebar-credit-pill:hover {
    border-color: rgba(67, 132, 255, 0.45);
}

.sidebar-credit-pill svg {
    width: 14px;
    height: 14px;
    stroke: var(--brand-blue);
    flex-shrink: 0;
}

.credit-pill-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    flex: 1;
    white-space: nowrap;
}

.credit-pill-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--brand-blue);
    white-space: nowrap;
}

/* ============================================
   FIRST-RUN WELCOME MODAL
   ============================================ */

.welcome-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
    animation: welcomeFadeIn 0.3s ease;
}

@keyframes welcomeFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.welcome-modal {
    position: relative;
    background: linear-gradient(145deg, rgba(20, 20, 35, 0.98) 0%, rgba(15, 15, 28, 0.98) 100%);
    border: 1px solid rgba(67, 132, 255, 0.3);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255,255,255,0.04);
    animation: welcomeSlideUp 0.35s ease;
}

@keyframes welcomeSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.welcome-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.welcome-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.welcome-modal-close svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}

.welcome-modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(67, 132, 255, 0.2), rgba(123, 66, 255, 0.2));
    border: 1px solid rgba(67, 132, 255, 0.35);
}

.welcome-modal-icon svg {
    width: 30px;
    height: 30px;
    stroke: var(--brand-blue);
}

.welcome-modal-icon.founder-icon {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(234, 88, 12, 0.2));
    border-color: rgba(249, 115, 22, 0.35);
}

.welcome-modal-icon.founder-icon svg {
    stroke: #f97316;
}

.welcome-modal-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.welcome-modal-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.welcome-credit-badge {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.15));
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
}

.welcome-credit-badge.founder-credits {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15), rgba(234, 88, 12, 0.15));
    border-color: rgba(249, 115, 22, 0.35);
}

.welcome-credit-amount {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--brand-green);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.welcome-credit-badge.founder-credits .welcome-credit-amount {
    color: #f97316;
}

.welcome-credit-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.welcome-modal-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.welcome-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: var(--brand-gradient);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    margin-bottom: 0.75rem;
}

.welcome-cta-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.welcome-cta-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    flex-shrink: 0;
}

.welcome-skip-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s;
}

.welcome-skip-btn:hover {
    color: var(--text-secondary);
}

/* ============================================
   BILLING PANEL — Subscription Management
   ============================================ */

.billing-plan-card {
    background: var(--card-bg, rgba(255,255,255,0.03));
    border: 1px solid var(--border-color, rgba(255,255,255,0.08));
    border-radius: 12px;
    padding: 20px;
}

.billing-plan-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.billing-plan-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary, #fff);
}

.billing-plan-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.billing-plan-badge.founder {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.2), rgba(245, 158, 11, 0.15));
    color: #fbbf24;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.billing-plan-badge.trial {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.billing-plan-badge.payg {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.billing-plan-cta {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color, rgba(255,255,255,0.08));
}

.billing-plan-cta .btn-action {
    width: 100%;
    text-align: center;
    justify-content: center;
}

/* Usage breakdown bars */
.billing-usage-summary {
    background: var(--card-bg, rgba(255,255,255,0.03));
    border: 1px solid var(--border-color, rgba(255,255,255,0.08));
    border-radius: 12px;
    padding: 20px;
}

.billing-usage-breakdown {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.billing-usage-bar-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.billing-usage-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary, #a0a0a0);
}

.billing-usage-bar-track {
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}

.billing-usage-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
    min-width: 0;
}

.billing-usage-bar-fill.veracita { background: #3b82f6; }
.billing-usage-bar-fill.oraclea  { background: #8b5cf6; }
.billing-usage-bar-fill.hermera  { background: #f59e0b; }
.billing-usage-bar-fill.odyssera { background: #10b981; }

/* Empty state */
.billing-empty-state {
    padding: 24px;
    text-align: center;
    color: var(--text-muted, #666);
    font-size: 0.9rem;
    background: var(--card-bg, rgba(255,255,255,0.03));
    border: 1px solid var(--border-color, rgba(255,255,255,0.08));
    border-radius: 12px;
}

/* Upgrade cards grid */
.billing-upgrade-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.billing-upgrade-card {
    background: var(--card-bg, rgba(255,255,255,0.03));
    border: 1px solid var(--border-color, rgba(255,255,255,0.08));
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.2s;
}

.billing-upgrade-card:hover {
    border-color: rgba(59, 130, 246, 0.4);
}

.billing-upgrade-card.featured {
    border-color: rgba(234, 179, 8, 0.4);
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.05), rgba(245, 158, 11, 0.03));
}

.billing-upgrade-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary, #fff);
}

.billing-upgrade-card-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #fff);
}

.billing-upgrade-card-price small {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-secondary, #a0a0a0);
}

.billing-upgrade-card-detail {
    font-size: 0.85rem;
    color: var(--text-secondary, #a0a0a0);
    line-height: 1.5;
}

.billing-upgrade-card .btn-action {
    margin-top: auto;
    width: 100%;
    text-align: center;
    justify-content: center;
}

.billing-upgrade-card .spots-remaining {
    font-size: 0.8rem;
    color: #fbbf24;
    font-weight: 500;
}

@media (max-width: 768px) {
    .billing-upgrade-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   TEAM USAGE PANEL
   ============================================ */

.usage-controls-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.usage-period-select {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
    padding: 8px 12px;
    cursor: pointer;
    flex: 1;
    min-width: 160px;
    max-width: 220px;
}

.usage-period-select:focus {
    outline: none;
    border-color: var(--brand-blue);
}

.usage-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.usage-summary-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 20px;
    transition: border-color 0.2s;
}

.usage-summary-card:hover {
    border-color: var(--border-hover);
}

.usage-card-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    margin-bottom: 6px;
}

.usage-card-product {
    font-size: 1.25rem;
}

.usage-card-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.usage-card-skeleton {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    height: 82px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.usage-section {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 16px;
}

.usage-section-title {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}

.usage-table-wrap {
    overflow-x: auto;
}

.usage-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.usage-table thead th {
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 0 12px 10px 0;
    border-bottom: 1px solid var(--border);
}

.usage-table tbody tr {
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.usage-table tbody tr:last-child {
    border-bottom: none;
}

.usage-table tbody td {
    padding: 10px 12px 10px 0;
    vertical-align: middle;
}

.usage-num {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--text-primary);
}

.usage-meta {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.member-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.member-avatar-sm {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.member-name-sm {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.member-email-sm {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.usage-product-tag {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(67, 132, 255, 0.1);
    border: 1px solid rgba(67, 132, 255, 0.2);
    border-radius: 12px;
    font-size: 0.75rem;
    color: var(--brand-blue);
    font-weight: 500;
}

.usage-empty {
    color: var(--text-muted);
    font-size: 0.875rem;
    text-align: center;
    padding: 20px 0;
}

/* Product breakdown bars */
.usage-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.usage-bar-row {
    display: grid;
    grid-template-columns: 90px 1fr 40px;
    align-items: center;
    gap: 12px;
}

.usage-bar-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.usage-bar-track {
    height: 8px;
    background: rgba(255,255,255,0.07);
    border-radius: 4px;
    overflow: hidden;
}

.usage-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
    min-width: 2px;
}

.usage-bar-veracita { background: linear-gradient(90deg, #4384ff, #7b42ff); }
.usage-bar-oraclea  { background: linear-gradient(90deg, #06b6d4, #3b82f6); }
.usage-bar-hermera  { background: linear-gradient(90deg, #8b5cf6, #ec4899); }
.usage-bar-odyssera { background: linear-gradient(90deg, #10b981, #34d399); }

.usage-bar-pct {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    text-align: right;
}

/* Burn rate */
.usage-burn-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.55;
}

.usage-burn-card svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--brand-blue);
    stroke: var(--brand-blue);
}

.usage-burn-card strong {
    color: var(--text-primary);
}

/* ============================================
   SSO SECTION (in Org Settings panel)
   ============================================ */

.org-sso-section {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    margin-top: 4px;
}

.org-sso-section h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.sso-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.sso-badge-active {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.sso-badge-inactive {
    background: rgba(255,255,255,0.06);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.sso-intro {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 8px 0 12px;
}

.sso-configured-summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0 12px;
}

.sso-summary-row,
.sso-detail-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
}

.sso-sp-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    min-width: 90px;
}

.sso-sp-value {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-family: monospace;
    word-break: break-all;
}

/* SSO Modal body */
.modal-sso {
    max-width: 560px;
}

.sso-setup,
.sso-configured {
    padding: 0 4px;
}

.sso-sp-info {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
}

.sso-info-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.sso-info-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.sso-sp-row {
    margin-bottom: 10px;
}

.sso-sp-row:last-child {
    margin-bottom: 0;
}

.sso-sp-value-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.sso-form .form-group {
    margin-bottom: 16px;
}

.form-divider-text {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 4px 0 16px;
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
    font-family: monospace;
    font-size: 0.8125rem;
}

.sso-status-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.sso-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.sso-status-dot.active  { background: #10b981; }
.sso-status-dot.inactive { background: var(--text-muted); }

.sso-status-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    transition: 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--brand-blue);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(16px);
}

/* ============================================
   EXPORT CENTER (in Org Settings panel)
   ============================================ */

.org-export-section {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    margin-top: 4px;
}

.org-export-section h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 14px;
}

.export-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.export-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    width: 100%;
}

.export-btn:hover {
    border-color: var(--border-hover);
    background: rgba(255,255,255,0.04);
}

.export-btn svg {
    flex-shrink: 0;
    color: var(--text-muted);
    stroke: var(--text-muted);
}

.export-btn-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.export-btn-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 1px;
}

/* ============================================
   AUDIT LOG VIEWER (Activity panel)
   ============================================ */

.audit-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    align-items: center;
}

.audit-search {
    flex: 1;
    min-width: 180px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
    padding: 8px 12px;
}

.audit-search:focus,
.audit-filter-select:focus,
.audit-filter-date:focus {
    outline: none;
    border-color: var(--brand-blue);
}

.audit-filter-select,
.audit-filter-date {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.8125rem;
    padding: 8px 10px;
    cursor: pointer;
}

.audit-filter-date {
    color-scheme: dark;
    min-width: 120px;
}

.audit-log-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.audit-log-item:last-child {
    border-bottom: none;
}

.audit-log-content {
    flex: 1;
    min-width: 0;
}

.audit-log-description {
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.audit-log-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 3px;
}

.audit-log-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.audit-log-actor {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.audit-log-actor::before {
    content: '·';
    margin-right: 6px;
    opacity: 0.5;
}

.audit-log-details {
    flex-shrink: 0;
}

.audit-log-details summary {
    font-size: 0.75rem;
    color: var(--text-muted);
    cursor: pointer;
    list-style: none;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: border-color 0.2s;
}

.audit-log-details summary:hover {
    border-color: var(--border-hover);
    color: var(--text-secondary);
}

.audit-log-details pre {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px;
    margin-top: 6px;
    white-space: pre-wrap;
    word-break: break-all;
    max-width: 260px;
}

/* modal footer actions (reused) */
.modal-footer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 768px) {
    .usage-summary-grid {
        grid-template-columns: 1fr 1fr;
    }

    .audit-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .audit-search,
    .audit-filter-select,
    .audit-filter-date {
        width: 100%;
        max-width: 100%;
    }

    .usage-bar-row {
        grid-template-columns: 70px 1fr 36px;
    }
}

@media (max-width: 480px) {
    .usage-summary-grid {
        grid-template-columns: 1fr;
    }
}
