/* ── Fabric Hub Stylesheet ── */
/* Brand: Kindo — primary #4826fd, accent #F5A623, Kindo palette */

:root {
    --brand-primary: #4826fd;
    --brand-primary-hover: #3511f5;
    --brand-primary-light: rgba(72, 38, 253, 0.08);
    --brand-secondary: #595374;
    --brand-accent: #F5A623;
    --brand-accent-light: rgba(245, 166, 35, 0.1);
    --brand-danger: #E8620A;
    --brand-success: #10B981;
    --brand-warning: #F59E0B;
    --brand-info: #3B82F6;

    /* Light theme — Kindo lavender palette */
    --bg: #f2efff;
    --surface: #ffffff;
    --surface-hover: #ede9ff;
    --text: #24137f;
    --text-muted: #595374;
    --text-light: #9c94b7;
    --border: #c8befe;
    --border-light: #dad4ff;
    --sidebar-bg: #1d0f65;
    --sidebar-text: #b1afd0;
    --sidebar-hover: rgba(72, 38, 253, 0.2);
    --sidebar-active: #4826fd;
    --shadow-sm: 0 1px 3px rgba(36, 19, 127, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(36, 19, 127, 0.08), 0 2px 4px -1px rgba(36, 19, 127, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(36, 19, 127, 0.1), 0 4px 6px -2px rgba(36, 19, 127, 0.05);
    --radius: 8px;
    --radius-lg: 12px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --sidebar-width: 260px;
    --sidebar-collapsed: 0px;
    --topbar-height: 60px;
}

[data-theme="dark"] {
    --bg: #15172e;
    --surface: #1d1e36;
    --surface-hover: #252245;
    --text: #ffffff;
    --text-muted: #b1afd0;
    --text-light: #444460;
    --border: #342d89;
    --border-light: #252745;
    --sidebar-bg: #06061d;
    --sidebar-hover: rgba(72, 38, 253, 0.25);
    --sidebar-active: #4826fd;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 8px -1px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 12px 20px -3px rgba(0, 0, 0, 0.6);
}

/* ── Reset ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
}

a {
    color: var(--brand-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ── Sidebar ── */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.2s ease;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(103, 97, 250, 0.15);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--sidebar-text);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: none;
}

.sidebar-toggle:hover {
    background: rgba(103, 97, 250, 0.15);
}

.sidebar-nav {
    list-style: none;
    flex: 1;
    padding: 12px 8px;
    overflow-y: auto;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--sidebar-text);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
}

.sidebar-nav li a:hover {
    background: var(--sidebar-hover);
    color: #fff;
    text-decoration: none;
}

.sidebar-nav li a.active {
    background: var(--sidebar-active);
    color: #fff;
}

.sidebar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-top: 1px solid rgba(103, 97, 250, 0.15);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
}

.user-role {
    color: var(--sidebar-text);
    font-size: 11px;
}

.sidebar-logout {
    color: var(--sidebar-text);
    padding: 6px;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.sidebar-logout:hover {
    color: #fff;
    background: rgba(232, 98, 10, 0.2);
}

/* ── Main Content ── */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Top Bar ── */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    height: var(--topbar-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 4px;
}

.page-title {
    font-size: 18px;
    font-weight: 600;
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-toggle,
.help-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.theme-toggle:hover,
.help-btn:hover {
    background: var(--surface-hover);
    color: var(--text);
    border-color: var(--brand-primary);
}

[data-theme="light"] .moon-icon { display: none; }
[data-theme="dark"] .sun-icon { display: none; }

/* ── Page Content ── */
.page-content {
    padding: 28px;
    flex: 1;
}

/* ── Flash Messages ── */
.flash-container {
    padding: 16px 28px 0;
}

.flash {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 8px;
    font-size: 14px;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.flash-success { background: rgba(16, 185, 129, 0.1); color: #059669; border: 1px solid rgba(16, 185, 129, 0.2); }
.flash-danger { background: rgba(232, 98, 10, 0.1); color: #E8620A; border: 1px solid rgba(232, 98, 10, 0.2); }
.flash-warning { background: rgba(245, 158, 11, 0.1); color: #D97706; border: 1px solid rgba(245, 158, 11, 0.2); }
.flash-info { background: rgba(59, 130, 246, 0.1); color: #2563EB; border: 1px solid rgba(59, 130, 246, 0.2); }

.flash-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    padding: 0 4px;
}

.flash-close:hover { opacity: 1; }

/* ── Cards & Stats ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.15s ease;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ── Sections ── */
.section {
    margin-bottom: 28px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 16px;
    font-weight: 600;
}

/* ── Action Cards ── */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease;
    box-shadow: var(--shadow-sm);
}

.action-card:hover {
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    text-decoration: none;
    color: var(--brand-primary);
}

/* ── Info Box ── */
.info-box {
    background: var(--brand-primary-light);
    border: 1px solid rgba(72, 38, 253, 0.15);
    border-radius: var(--radius);
    padding: 16px 20px;
    font-size: 14px;
    color: var(--text-muted);
}

/* ── Auth Pages — Kindo Branded ── */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    padding: 20px;
    background: #15172e;
    background-image:
        radial-gradient(ellipse 80% 60% at 50% 40%, rgba(72, 38, 253, 0.18), transparent),
        radial-gradient(ellipse 60% 50% at 20% 80%, rgba(141, 118, 255, 0.10), transparent),
        radial-gradient(ellipse 50% 40% at 80% 20%, rgba(103, 97, 250, 0.08), transparent);
    flex-direction: column;
    gap: 16px;
}

.auth-card {
    background: rgba(29, 30, 54, 0.7);
    border: 1px solid rgba(103, 97, 250, 0.15);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.auth-logo-icons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-kindo-icon {
    filter: brightness(1.1);
}

.auth-kindo-wordmark {
    filter: brightness(1.1);
}

.auth-logo-divider {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.auth-logo h1 {
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.auth-card h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #f0eef5;
}

.auth-card .form-group label {
    color: rgba(255, 255, 255, 0.7);
}

.auth-card .form-group input {
    background: rgba(13, 15, 31, 0.5);
    border-color: rgba(103, 97, 250, 0.2);
    color: #f0eef5;
}

.auth-card .form-group input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.auth-card .form-group input:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(72, 38, 253, 0.3);
    background: rgba(13, 15, 31, 0.6);
}

.auth-card .btn-primary {
    background: var(--brand-primary);
    font-weight: 600;
    padding: 12px 20px;
    font-size: 15px;
    letter-spacing: 0.01em;
}

.auth-card .btn-primary:hover {
    background: var(--brand-primary-hover);
    box-shadow: 0 4px 12px rgba(72, 38, 253, 0.4);
}

.auth-link {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

.auth-link a {
    color: var(--brand-primary);
    font-weight: 500;
}

.auth-link a:hover {
    color: #8d76ff;
}

.auth-footer {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(103, 97, 250, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
}

.auth-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.auth-footer-link:hover {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

/* Auth page flash messages on dark background */
.auth-container .flash-container {
    width: 100%;
    max-width: 440px;
}

.auth-container .flash {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-container .flash-success {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.25);
}

.auth-container .flash-danger {
    background: rgba(232, 98, 10, 0.15);
    border-color: rgba(232, 98, 10, 0.25);
}

/* ── Forms ── */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-family: var(--font);
    background: var(--surface);
    color: var(--text);
    transition: border-color 0.15s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(72, 38, 253, 0.1);
}

.form-group input::placeholder {
    color: var(--text-light);
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--brand-primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--brand-primary-hover);
    color: #fff;
    text-decoration: none;
}

.btn-full {
    width: 100%;
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--surface-hover);
}

/* ── Help Drawer ── */
.help-drawer {
    position: fixed;
    top: 0;
    right: -380px;
    width: 360px;
    height: 100vh;
    background: var(--surface);
    border-left: 1px solid var(--border);
    z-index: 200;
    display: flex;
    flex-direction: column;
    transition: right 0.25s ease;
    box-shadow: var(--shadow-lg);
}

.help-drawer.open {
    right: 0;
}

.help-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.help-drawer-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.help-drawer-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px 8px;
}

.help-drawer-close:hover { color: var(--text); }

.help-drawer-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    font-size: 14px;
    line-height: 1.7;
}

.help-drawer-body h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
}

.help-drawer-body ul {
    padding-left: 18px;
    margin: 8px 0;
}

.help-drawer-body li {
    margin-bottom: 6px;
}

.help-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 150;
}

.help-overlay.open {
    display: block;
}

/* ── Error Page ── */
.error-page {
    text-align: center;
    padding: 80px 20px;
}

.error-code {
    font-size: 72px;
    font-weight: 800;
    color: var(--brand-primary);
    line-height: 1;
    margin-bottom: 16px;
}

.error-page h2 {
    font-size: 24px;
    margin-bottom: 12px;
}

.error-page p {
    color: var(--text-muted);
    margin-bottom: 28px;
    font-size: 15px;
}

/* ── Getting Started ── */
.getting-started .intro-text {
    margin-bottom: 24px;
    font-size: 15px;
    color: var(--text-muted);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.step-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.15s ease;
}

.step-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
}

.step-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}

.step-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 12px;
}

.step-status {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.step-status.upcoming {
    background: var(--brand-accent-light);
    color: var(--brand-accent);
}

.step-status.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--brand-success);
}

/* ── Mobile ── */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .page-content {
        padding: 16px;
    }

    .top-bar {
        padding: 0 16px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .auth-card {
        padding: 28px 24px;
    }

    .auth-logo {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .auth-logo-divider {
        width: 60px;
        height: 1px;
    }

    .help-drawer {
        width: 100%;
        right: -100%;
    }
}

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

/* ── Sprint 2: Admin Settings & Project Catalog ── */

/* ── Settings Layout ── */
.settings-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.settings-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.settings-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.settings-card-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.form-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.form-hint {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    gap: 6px;
}

/* ── Connection Status Badges ── */
.connection-status {
    display: flex;
    align-items: center;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.status-running {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.status-badge.status-stopped {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.status-badge.status-disconnected {
    background: rgba(232, 98, 10, 0.1);
    color: #E8620A;
}

.status-badge.status-pending, .status-badge.status-building {
    background: rgba(245, 158, 11, 0.1);
    color: #D97706;
}

.status-badge.status-unknown {
    background: rgba(107, 114, 128, 0.1);
    color: #9ca3af;
}

.status-badge.status-pinned {
    background: rgba(72, 38, 253, 0.1);
    color: #4826fd;
    gap: 4px;
}

/* ── Project Checklist ── */
.project-checklist {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px;
}

.project-check-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.1s ease;
}

.project-check-item:hover {
    background: var(--surface-hover);
}

.project-check-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: var(--brand-primary);
}

.project-check-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.project-check-name {
    font-size: 14px;
    font-weight: 500;
}

.project-check-folder {
    font-size: 11px;
    color: var(--brand-primary);
    font-weight: 500;
}

.project-check-desc {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Project Catalog ── */
.catalog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 8px;
}

.catalog-summary {
    font-size: 15px;
    color: var(--text-muted);
}

.catalog-section {
    margin-bottom: 28px;
}

.catalog-folder-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.project-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.project-card-name {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.project-card-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    flex: 1;
    margin-bottom: 12px;
}

.project-card-desc-empty {
    font-style: italic;
    color: var(--text-light);
}

.project-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.project-card-id {
    font-size: 11px;
    color: var(--text-light);
    font-family: monospace;
}

/* ── Empty State ── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state svg {
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

/* ── Info Box Warning ── */
.info-box-warning {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.2);
}

/* ── Sidebar Section Label ── */
.sidebar-section-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.35);
    padding: 16px 14px 6px;
    list-style: none;
}

/* ── Sprint 3: Project Detail & Activity ── */

/* ── Project Detail Page ── */
.project-detail {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.detail-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.detail-header {
    margin-bottom: 16px;
}

.detail-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.detail-title-row h2 {
    font-size: 22px;
    font-weight: 700;
}

.detail-folder {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--brand-primary);
    font-weight: 500;
}

.detail-description {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
}

.detail-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.detail-meta-item {
    font-size: 13px;
    color: var(--text-muted);
}

.detail-meta-item code {
    font-size: 12px;
    background: var(--bg);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.detail-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.detail-info-banner {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
}

.detail-info-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.detail-info-danger {
    background: rgba(232, 98, 10, 0.1);
    color: #E8620A;
    border: 1px solid rgba(232, 98, 10, 0.2);
}

/* ── Activity Log ── */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.activity-list-compact .activity-item {
    padding: 10px 16px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.activity-icon-start {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.activity-icon-stop {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.activity-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.activity-text {
    font-size: 13px;
    color: var(--text);
}

.activity-time {
    font-size: 11px;
    color: var(--text-light);
}

.activity-detail {
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
}

.empty-text {
    font-size: 14px;
    color: var(--text-muted);
    font-style: italic;
}

/* ── Project card link styling ── */
.project-card-name a {
    color: var(--text);
    text-decoration: none;
}

.project-card-name a:hover {
    color: var(--brand-primary);
    text-decoration: underline;
}

/* ── Sprint 4: Share Links ── */

/* ── Share Dialog ── */
.share-info {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.share-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ttl-presets {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ttl-btn {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.15s ease;
}

.ttl-btn:hover {
    border-color: var(--brand-primary);
    background: var(--surface-hover);
}

.ttl-btn-active {
    background: var(--brand-primary);
    color: #fff;
    border-color: var(--brand-primary);
}

.ttl-custom {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ttl-custom label {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.ttl-custom input {
    width: 80px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-family: var(--font);
    background: var(--surface);
    color: var(--text);
}

.ttl-max-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.ttl-max-warning {
    color: var(--brand-danger);
    font-weight: 600;
}

.ttl-near-warning {
    color: var(--brand-accent);
    font-weight: 500;
}

.share-form-actions {
    display: flex;
    gap: 8px;
}

/* ── Share Result ── */
.share-result {
    margin-top: 16px;
    padding: 16px;
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: var(--radius);
}

.share-url-box {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.share-url-box input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    font-family: monospace;
    background: var(--surface);
    color: var(--text);
}

.share-expires {
    font-size: 12px;
    color: var(--text-muted);
}

/* ── Share Links List ── */
.share-links-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.share-link-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    flex-wrap: wrap;
}

.share-link-item.share-expired,
.share-link-item.share-revoked {
    opacity: 0.6;
}

.share-link-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.share-link-ttl {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.share-link-by {
    font-size: 12px;
    color: var(--text-light);
}

.share-link-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.share-link-url-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}

.share-link-url {
    font-size: 11px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
    cursor: text;
    user-select: all;
    -webkit-user-select: all;
}

.share-copy-btn {
    flex-shrink: 0;
    padding: 3px 6px !important;
    font-size: 11px !important;
    border-radius: 4px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.share-copy-btn:hover {
    opacity: 1;
}

.share-copy-done {
    color: #22c55e !important;
    border-color: #22c55e !important;
    opacity: 1;
}

.share-link-expires {
    font-size: 11px;
    color: var(--text-light);
}

.share-revoke-btn {
    flex-shrink: 0;
}

.detail-card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.detail-card-header-row h3 {
    margin-bottom: 0;
}

/* ── Activity icon for share action ── */
.activity-icon-share {
    background: rgba(72, 38, 253, 0.1);
    color: #4826fd;
}

.activity-icon-revoke_share {
    background: rgba(232, 98, 10, 0.1);
    color: #E8620A;
}

/* ── Sprint 5: Admin Panel ── */

/* ── Admin Tables ── */
.admin-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.admin-table th {
    background: var(--bg);
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.admin-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

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

.admin-table tr:hover td {
    background: var(--surface-hover);
}

.admin-table .row-disabled td {
    opacity: 0.5;
}

.nowrap { white-space: nowrap; }

.details-cell {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.actions-cell {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
}

/* ── Role Badges ── */
.role-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.role-admin {
    background: rgba(72, 38, 253, 0.1);
    color: #4826fd;
}

.role-user {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

/* ── Action Badges ── */
.action-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
}

.action-start { background: rgba(16, 185, 129, 0.1); color: #059669; }
.action-stop { background: rgba(107, 114, 128, 0.1); color: #6b7280; }
.action-share { background: rgba(72, 38, 253, 0.1); color: #4826fd; }
.action-revoke_share { background: rgba(232, 98, 10, 0.1); color: #E8620A; }

/* ── Inline Forms ── */
.inline-form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.inline-form .form-group {
    margin-bottom: 0;
}

.inline-edit-form {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.role-select {
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--surface);
    color: var(--text);
    font-family: var(--font);
}

/* ── Extra Button Sizes ── */
.btn-xs {
    padding: 4px 8px;
    font-size: 11px;
}

.btn-danger {
    background: var(--brand-danger);
    color: #fff;
    border: none;
}

.btn-danger:hover {
    background: #c85008;
    color: #fff;
    text-decoration: none;
}

/* ── Sprint 6: Polish, Notifications & Responsive ── */

/* ── Notification Banners ── */
.expiry-warnings {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notification-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    animation: slideDown 0.2s ease;
}

.notification-critical {
    background: rgba(232, 98, 10, 0.08);
    border: 1px solid rgba(232, 98, 10, 0.2);
    color: #E8620A;
}

.notification-warning {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #D97706;
}

.notification-icon {
    flex-shrink: 0;
    margin-top: 1px;
}

.notification-content {
    flex: 1;
    line-height: 1.5;
}

.notification-meta {
    display: block;
    font-size: 11px;
    opacity: 0.8;
    margin-top: 2px;
}

.session-timeout-banner {
    position: sticky;
    top: 0;
    z-index: 60;
}

/* ── Keyboard Shortcuts ── */
.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
}

kbd {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    font-family: var(--font);
    font-weight: 600;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    box-shadow: 0 1px 0 var(--border);
    min-width: 24px;
    text-align: center;
}

/* ── API Reference ── */
.api-ref-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.api-ref-table-wrap code {
    font-size: 12px;
    background: var(--bg);
    padding: 2px 6px;
    border-radius: 3px;
}

/* ── Getting Started Polish ── */
.getting-started .intro-text h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

/* ── Responsive refinements ── */
@media (max-width: 768px) {
    .shortcuts-grid {
        grid-template-columns: 1fr;
    }

    .notification-banner {
        font-size: 12px;
        padding: 10px 12px;
    }

    .ttl-presets {
        flex-wrap: wrap;
    }

    .ttl-custom {
        flex-direction: column;
        align-items: flex-start;
    }

    .share-url-box {
        flex-direction: column;
    }

    .inline-form {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-table {
        font-size: 12px;
    }

    .admin-table th, .admin-table td {
        padding: 8px 10px;
    }

    .actions-cell {
        flex-direction: column;
        gap: 4px;
    }

    .detail-actions {
        flex-direction: column;
    }

    .detail-actions .btn {
        width: 100%;
    }
}

/* ── Sprint 7: Groups & Scoped Visibility ── */

.group-card {
    margin-bottom: 16px;
}

.group-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 12px;
}

.group-card-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
}

.group-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.member-check-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.member-check-item:hover {
    background: var(--surface-hover);
}

.member-check-item input[type="checkbox"] {
    accent-color: var(--brand-primary);
}

/* ── Scoped Access Tags ── */
.project-access-item {
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 4px;
    margin-bottom: 4px;
}

.project-access-item:last-child {
    border-bottom: none;
}

.project-scope-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.scope-label {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 500;
}

.scope-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 8px;
}

.scope-user {
    background: rgba(72, 38, 253, 0.08);
    color: var(--brand-primary);
}

.scope-group {
    background: rgba(245, 166, 35, 0.08);
    color: var(--brand-accent);
}

/* ── Sprint 11: API Keys ── */
.api-key-form .form-row {
    display: flex; gap: 12px; align-items: flex-start;
}
.api-keys-list {
    display: flex; flex-direction: column; gap: 8px; margin-top: 12px;
}
.api-key-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px; border-radius: 8px;
    background: var(--bg-secondary, #f9f9f9); border: 1px solid var(--border-color, #e0e0e0);
}
.api-key-revoked {
    opacity: 0.6;
}
.api-key-info {
    display: flex; flex-direction: column; gap: 2px;
}
.api-key-label {
    font-weight: 600; font-size: 14px;
}
.api-key-prefix {
    font-family: monospace; font-size: 12px; color: var(--text-muted, #888);
    background: var(--bg-tertiary, #f0f0f0); padding: 2px 6px; border-radius: 4px;
    display: inline-block; margin-top: 2px;
}
.api-key-meta {
    font-size: 11px; color: var(--text-muted, #888);
}
.api-key-actions {
    display: flex; align-items: center; gap: 8px;
}
.integration-instructions summary {
    color: var(--brand-primary, #4826fd);
}

/* ── Sprint 11: Media Files ── */
.media-layout {
    display: flex; flex-direction: column; gap: 20px;
}
.media-files-list {
    display: flex; flex-direction: column; gap: 8px;
}
.media-file-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; border-radius: 8px;
    background: var(--bg-secondary, #f9f9f9); border: 1px solid var(--border-color, #e0e0e0);
}
.media-file-icon {
    width: 40px; height: 40px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.media-type-document { background: rgba(72, 38, 253, 0.1); color: #4826fd; }
.media-type-image { background: rgba(245, 166, 35, 0.1); color: #F5A623; }
.media-type-video { background: rgba(232, 98, 10, 0.1); color: #E8620A; }
.media-type-other { background: rgba(61, 60, 68, 0.1); color: #3d3c44; }
.media-file-info {
    flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.media-file-name {
    font-weight: 600; font-size: 14px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.media-file-desc {
    font-size: 13px; color: var(--text-muted, #888);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.media-file-meta {
    font-size: 11px; color: var(--text-muted, #888);
}
.media-file-actions {
    display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.media-files-compact .media-file-item {
    padding: 8px 12px;
}
.media-files-compact .media-file-icon {
    width: 32px; height: 32px;
}
.btn-danger-text { color: var(--brand-danger, #E8620A) !important; }
.btn-danger-text:hover { background: rgba(232, 98, 10, 0.1) !important; }

/* ── Sprint 11: Source Badge ── */
.source-badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 600; padding: 2px 8px;
    border-radius: 10px; text-transform: uppercase; letter-spacing: 0.5px;
}
.source-studio {
    background: rgba(72, 38, 253, 0.1); color: #4826fd;
}

/* ── API Key Reveal (copy-to-clipboard) ── */
.api-key-reveal {
    background: var(--brand-bg, #c1a6f6);
    border: 2px solid var(--brand-primary, #4826fd);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

[data-theme="dark"] .api-key-reveal {
    background: rgba(72, 38, 253, 0.15);
    border-color: var(--brand-primary, #4826fd);
}

.api-key-reveal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    color: var(--brand-text, #24137f);
}

.api-key-reveal-header svg {
    color: var(--brand-primary, #4826fd);
    flex-shrink: 0;
}

.api-key-reveal-warning {
    font-size: 13px;
    color: var(--brand-danger, #E8620A);
    font-weight: 500;
    margin: 0 0 12px 0;
}

.api-key-reveal-value {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-secondary, #f8f8f8);
    border: 1px solid var(--brand-border, #D9D9D6);
    border-radius: 6px;
    padding: 10px 12px;
}

[data-theme="dark"] .api-key-reveal-value {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

.api-key-reveal-value code {
    flex: 1;
    font-family: "SF Mono", "Fira Code", "Fira Mono", Menlo, Consolas, monospace;
    font-size: 13px;
    word-break: break-all;
    color: var(--brand-text, #24137f);
    user-select: all;
    -webkit-user-select: all;
    background: none;
    padding: 0;
}

[data-theme="dark"] .api-key-reveal-value code {
    color: #e0e0e0;
}

.copy-key-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    white-space: nowrap;
    min-width: 80px;
    justify-content: center;
}

.copy-key-btn .copy-label {
    font-size: 13px;
}


/* ── Share Modal ── */
.share-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
}

.share-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    width: 480px;
    max-width: 92vw;
    max-height: 90vh;
    overflow-y: auto;
}

.share-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
}

.share-modal-header h3 {
    margin: 0;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.share-modal-header h3 svg {
    color: var(--primary);
    flex-shrink: 0;
}

.share-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.share-modal-close:hover {
    background: var(--border);
    color: var(--text);
}

.share-modal-body {
    padding: 1.25rem 1.5rem 1.5rem;
}

.share-field {
    margin-bottom: 1.25rem;
}

.share-field > label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.4rem;
}

.share-input {
    width: 100%;
    padding: 0.55rem 0.75rem;
    font-size: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    outline: none;
    box-sizing: border-box;
}

.share-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(72, 38, 253, 0.15);
}

.share-input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.share-field-hint {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

.share-modal-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.share-modal-actions .btn {
    flex: 1;
    justify-content: center;
}

.share-success-banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: 8px;
    color: #22c55e;
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 1rem;
}

.share-result-name {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-style: italic;
}

.share-link-name {
    font-weight: 600;
    color: var(--text);
    font-size: 0.78rem;
}


/* ── Share TTL Progress Bar ── */
.share-ttl-bar-wrap {
    padding: 4px 0;
}

.share-ttl-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.share-ttl-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease, background 0.6s ease;
    min-width: 2px;
}

.share-ttl-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3px;
}

.share-ttl-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text);
}

.share-ttl-total {
    font-size: 10px;
    color: var(--text-muted);
}

.share-link-item.share-expired .share-ttl-fill,
.share-link-item.share-revoked .share-ttl-fill {
    width: 0% !important;
    background: var(--text-muted) !important;
}

.share-link-item.share-expired .share-ttl-label,
.share-link-item.share-revoked .share-ttl-label {
    color: var(--text-muted);
}



/* ── Project Docs Page ── */
.docs-header {
    margin-bottom: 1.5rem;
}

.docs-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.docs-breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.docs-breadcrumb a:hover {
    text-decoration: underline;
}

.docs-breadcrumb svg {
    color: var(--text-muted);
    opacity: 0.5;
    flex-shrink: 0;
}

.docs-page-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.docs-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.docs-description p {
    margin: 0;
}

/* Two-column grid: content left, sidebar right */
.docs-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.5rem;
    align-items: start;
}

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

.docs-main {
    min-width: 0;
}

.docs-sidebar {
    min-width: 0;
}

.docs-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.docs-card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border);
}

.docs-card-title svg {
    color: var(--primary);
}

/* Markdown body inside cards */
.markdown-body p {
    margin: 0 0 0.75rem 0;
    line-height: 1.7;
    font-size: 0.92rem;
}

.markdown-body ul, .markdown-body ol {
    margin: 0 0 0.75rem 0;
    padding-left: 1.75rem;
}

.markdown-body li {
    margin-bottom: 0.3rem;
    line-height: 1.6;
    font-size: 0.92rem;
}

.markdown-body code {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    padding: 0.15em 0.4em;
    font-size: 0.86em;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.markdown-body pre {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem;
    overflow-x: auto;
    margin: 0 0 0.75rem 0;
}

.markdown-body pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.82rem;
    line-height: 1.5;
}

.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 0.75rem 0;
}

.markdown-body th, .markdown-body td {
    border: 1px solid var(--border);
    padding: 0.45rem 0.65rem;
    text-align: left;
    font-size: 0.85rem;
}

.markdown-body th {
    background: rgba(255, 255, 255, 0.04);
    font-weight: 600;
}

.markdown-body strong {
    font-weight: 600;
}

.markdown-body h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 1.25rem 0 0.5rem 0;
}

/* Agent cards in sidebar */
.agent-model-badge {
    background: rgba(72, 38, 253, 0.15);
    color: var(--primary);
    border: 1px solid rgba(72, 38, 253, 0.25);
    border-radius: 12px;
    padding: 2px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.agent-description {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0 0 0.5rem 0;
}

.agent-details {
    margin-top: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.agent-details + .agent-details {
    margin-top: 0.4rem;
}

.agent-details summary {
    padding: 0.4rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
    user-select: none;
}

.agent-details summary:hover {
    background: rgba(255, 255, 255, 0.06);
}

.agent-instructions pre {
    margin: 0;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    font-size: 0.78rem;
    line-height: 1.45;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.agent-instructions code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.agent-inputs {
    padding: 0.5rem;
}

.agent-input-item {
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.agent-input-item:last-child {
    border-bottom: none;
}

.agent-input-item code {
    background: rgba(255, 255, 255, 0.06);
    padding: 0.1em 0.3em;
    border-radius: 3px;
    font-size: 0.82rem;
    font-weight: 600;
}

.agent-input-type {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-left: 0.4rem;
}

.agent-input-req {
    font-size: 0.68rem;
    color: #E8620A;
    font-weight: 600;
    margin-left: 0.4rem;
}

.agent-input-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0.2rem 0 0 0;
    line-height: 1.4;
}

/* Config list in sidebar cards */
.config-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.config-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.config-label {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.config-row code {
    background: rgba(255, 255, 255, 0.06);
    padding: 0.1em 0.3em;
    border-radius: 3px;
    font-size: 0.82rem;
}


/* ══════════════════════════════════════════════════════════════
   Project Catalog — Toolbar, View Toggle, Search, Table View
   ══════════════════════════════════════════════════════════════ */

/* ── Catalog Toolbar ── */
.catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.catalog-toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.catalog-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ── View Toggle ── */
.view-toggle {
    display: inline-flex;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.view-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 34px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

.view-toggle-btn:hover {
    color: var(--text);
    background: var(--surface-hover);
}

.view-toggle-btn.active {
    background: var(--brand-primary);
    color: #fff;
}

/* ── Catalog Search ── */
.catalog-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 12px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    min-width: 200px;
}

.catalog-search:focus-within {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 2px rgba(72, 38, 253, 0.15);
}

.catalog-search svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.catalog-search input {
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 13px;
    padding: 8px 0;
    outline: none;
    width: 100%;
    min-width: 120px;
    font-family: var(--font);
}

.catalog-search input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.catalog-search-clear {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    border-radius: 4px;
}

.catalog-search-clear:hover {
    color: var(--text);
    background: var(--surface-hover);
}

/* ── No Results ── */
.catalog-no-results {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.catalog-no-results h3 {
    margin: 12px 0 4px;
    font-size: 16px;
    color: var(--text);
}

.catalog-no-results p {
    font-size: 13px;
}

/* ── Project Card Meta Row (shares + folder tag) ── */
.project-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.project-card-shares {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--brand-info);
    font-weight: 500;
}

.project-card-shares svg {
    color: var(--brand-info);
}

.project-card-folder-tag {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--brand-primary-light);
    color: var(--brand-primary);
    font-weight: 500;
    white-space: nowrap;
}

/* ── Table View ── */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.catalog-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    font-size: 13px;
}

.catalog-table thead {
    background: var(--surface-hover);
}

.catalog-table th {
    padding: 10px 14px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    user-select: none;
    position: relative;
}

.catalog-table th.sortable {
    cursor: pointer;
    transition: color 0.15s ease;
}

.catalog-table th.sortable:hover {
    color: var(--text);
}

.catalog-table th .sort-icon {
    display: inline-block;
    margin-left: 4px;
    opacity: 0.3;
    transition: opacity 0.15s ease, transform 0.15s ease;
    vertical-align: middle;
}

.catalog-table th.sort-asc .sort-icon {
    opacity: 1;
    transform: rotate(180deg);
}

.catalog-table th.sort-desc .sort-icon {
    opacity: 1;
    transform: rotate(0deg);
}

.catalog-table th.sortable:hover .sort-icon {
    opacity: 0.6;
}

.catalog-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

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

.catalog-table tbody tr:hover {
    background: var(--surface-hover);
}

.catalog-table .td-name a {
    font-weight: 500;
    color: var(--text);
}

.catalog-table .td-name a:hover {
    color: var(--brand-primary);
    text-decoration: underline;
}

.catalog-table .td-folder {
    color: var(--text-muted);
}

.catalog-table .td-desc {
    color: var(--text-muted);
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.catalog-table .td-shares .text-muted {
    color: var(--text-light);
}

.catalog-table .th-actions {
    text-align: right;
    width: 100px;
}

.catalog-table .td-actions {
    text-align: right;
}

/* Share count badge in table */
.share-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    background: rgba(59, 130, 246, 0.12);
    color: var(--brand-info);
    font-size: 12px;
    font-weight: 600;
}

/* ── Column Filter Button ── */
.col-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    margin-left: 4px;
    vertical-align: middle;
    transition: all 0.15s ease;
}

.col-filter-btn:hover {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}

.col-filter-btn.filter-active {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #fff;
}

/* ── Column Filter Dropdown ── */
.col-filter-dropdown {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 500;
    min-width: 140px;
    padding: 6px;
}

.col-filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    transition: background 0.1s ease;
    white-space: nowrap;
}

.col-filter-option:hover {
    background: var(--surface-hover);
}

.col-filter-option input[type="radio"] {
    accent-color: var(--brand-primary);
    margin: 0;
}

/* ── Responsive adjustments ── */
@media (max-width: 768px) {
    .catalog-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .catalog-toolbar-right {
        justify-content: space-between;
    }

    .catalog-search {
        flex: 1;
        min-width: 0;
    }

    .catalog-table .td-desc {
        display: none;
    }
}

/* ── Sprint 15: Media Thumbnail Grid ── */

.media-thumb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.media-thumb-grid-compact {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.media-thumb-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.15s ease;
    box-shadow: var(--shadow-sm);
}

.media-thumb-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--brand-primary);
}

/* ── Thumbnail preview area ── */
.media-thumb-preview {
    width: 100%;
    height: 160px;
    overflow: hidden;
    position: relative;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-thumb-grid-compact .media-thumb-preview {
    height: 130px;
}

.media-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Video thumbnail ── */
.media-thumb-video-wrap {
    width: 100%;
    height: 100%;
    position: relative;
}

.media-thumb-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.media-thumb-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    transition: background 0.15s ease;
}

.media-thumb-card:hover .media-thumb-play-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.media-thumb-play-overlay svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* ── Icon-based thumbnails (documents, PDFs, etc.) ── */
.media-thumb-icon-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 100%;
}

.media-thumb-icon-large.media-type-document {
    background: rgba(72, 38, 253, 0.06);
    color: #4826fd;
}

.media-thumb-icon-large.media-type-webpage {
    background: rgba(59, 130, 246, 0.06);
    color: #3B82F6;
}

.media-thumb-icon-large.media-type-presentation {
    background: rgba(245, 166, 35, 0.06);
    color: #F5A623;
}

.media-thumb-icon-large.media-type-spreadsheet {
    background: rgba(16, 185, 129, 0.06);
    color: #10B981;
}

.media-thumb-icon-large.media-type-archive {
    background: rgba(107, 114, 128, 0.06);
    color: #6b7280;
}

.media-thumb-icon-large.media-type-text {
    background: rgba(107, 114, 128, 0.06);
    color: #6b7280;
}

.media-thumb-icon-large.media-type-other {
    background: rgba(61, 60, 68, 0.06);
    color: #3d3c44;
}

.media-thumb-icon-large.media-type-image {
    background: rgba(245, 166, 35, 0.06);
    color: #F5A623;
}

.media-thumb-icon-large.media-type-video {
    background: rgba(232, 98, 10, 0.06);
    color: #E8620A;
}

[data-theme="dark"] .media-thumb-icon-large.media-type-document { background: rgba(72, 38, 253, 0.1); }
[data-theme="dark"] .media-thumb-icon-large.media-type-webpage { background: rgba(59, 130, 246, 0.1); }
[data-theme="dark"] .media-thumb-icon-large.media-type-presentation { background: rgba(245, 166, 35, 0.1); }
[data-theme="dark"] .media-thumb-icon-large.media-type-spreadsheet { background: rgba(16, 185, 129, 0.1); }
[data-theme="dark"] .media-thumb-icon-large.media-type-archive { background: rgba(107, 114, 128, 0.1); }
[data-theme="dark"] .media-thumb-icon-large.media-type-text { background: rgba(107, 114, 128, 0.1); }
[data-theme="dark"] .media-thumb-icon-large.media-type-other { background: rgba(61, 60, 68, 0.15); }
[data-theme="dark"] .media-thumb-icon-large.media-type-image { background: rgba(245, 166, 35, 0.1); }
[data-theme="dark"] .media-thumb-icon-large.media-type-video { background: rgba(232, 98, 10, 0.1); }

.media-thumb-type-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

/* ── File info below thumbnail ── */
.media-thumb-info {
    padding: 10px 12px 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.media-thumb-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}

.media-thumb-desc {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-thumb-meta {
    font-size: 11px;
    color: var(--text-light);
}

/* ── Actions row at bottom of card ── */
.media-thumb-actions {
    padding: 6px 12px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.media-thumb-actions .btn-sm {
    padding: 4px 10px;
    font-size: 11px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .media-thumb-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
    }

    .media-thumb-grid-compact {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 8px;
    }

    .media-thumb-preview {
        height: 120px;
    }

    .media-thumb-grid-compact .media-thumb-preview {
        height: 100px;
    }
}

@media (max-width: 480px) {
    .media-thumb-grid,
    .media-thumb-grid-compact {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .media-thumb-preview {
        height: 100px;
    }

    .media-thumb-grid-compact .media-thumb-preview {
        height: 80px;
    }
}


/* ── Sprint 16: Accessibility — status badge labels & flex ── */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.status-badge-label {
    line-height: 1;
}

/* Slide-in / drawer motion respects reduced-motion (Sprint 16) */
@media (prefers-reduced-motion: reduce) {
    .help-drawer,
    .sidebar,
    .flash,
    .notification-banner,
    .stat-card,
    .action-card,
    .step-card,
    .project-card,
    .media-thumb-card,
    .share-ttl-fill,
    .toast-item,
    .confirm-modal {
        transition: none !important;
        animation: none !important;
    }
}

/* ── Sprint 17: Start-Project Experience ── */
/* Build progress + log panel styles live in components/build-progress.css */
/* and components/build-log-panel.css (included via base.html). */
.detail-card .build-progress,
.detail-card .build-log-panel { margin-bottom: 16px; }

/* ── Sprint 18: Branded Share Surface ── */
/* Branded /shared frame + error pages: components/shared-frame.css, share-errors.css */
/* Share preview + QR: components/qr-code.css (included via base.html). */

/* ── Sprint 19: Empty / Loading / Error State System ── */
/* Skeleton loaders, empty-state, relative timestamps live in */
/* components/skeleton-loader.css, empty-state.css, relative-time.css. */

/* ── Sprint 20: Navigation, Onboarding & Polish ── */
.detail-description-wrap { margin-bottom: 16px; }
.detail-description[data-empty="true"] { color: var(--text-light); font-style: italic; }
.desc-editor { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; max-width: 640px; }
.desc-editor textarea { width: 100%; resize: vertical; font-family: var(--font); }
.desc-editor-actions { display: flex; gap: 8px; }
.project-card-published { font-size: 11px; color: var(--text-light); }
#editDescBtn { margin-top: 4px; }
/* Component CSS for sidebar-collapse/mobile-drawer/breadcrumbs/onboarding/password/new-badge */
/* live in their own files under components/, included via base.html. */
/* Design tokens: tokens/spacing.css + tokens/typography.css. */

/* ── Seeded Accounts — Share Modal (Sprint 18) ── */
.seed-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    justify-content: center;
    border-style: dashed;
}
.seed-accounts-section {
    border: 1px solid var(--brand-border, #D9D9D6);
    border-radius: 8px;
    padding: 16px;
    margin-top: 4px;
    background: var(--brand-surface, #F5F5F5);
}
[data-theme="dark"] .seed-accounts-section {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}
.seed-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.seed-section-header h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
}
.seed-count {
    font-size: 0.8rem;
    color: var(--brand-text-muted, #6B8FA8);
}
.seed-section-hint {
    font-size: 0.8rem;
    color: var(--brand-text-muted, #6B8FA8);
    margin: 0 0 12px 0;
}
.seed-add-form {
    margin-bottom: 12px;
}
.seed-form-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}
.seed-form-field {
    flex: 1;
}
.seed-form-field-role {
    flex: 0 0 100px;
}
.seed-form-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 4px;
}
.seed-form-field .form-hint {
    font-weight: 400;
    color: var(--brand-text-muted, #6B8FA8);
}
.seed-add-btn {
    flex-shrink: 0;
    height: 36px;
}
.seed-error {
    margin-top: 6px;
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(232, 98, 10, 0.1);
    color: var(--brand-danger, #E8620A);
    font-size: 0.8rem;
    font-weight: 500;
}
.seed-bulk-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 0.85rem;
}
.seed-bulk-count {
    width: 60px !important;
    text-align: center;
}
.seed-accounts-list {
    max-height: 200px;
    overflow-y: auto;
}
.seed-empty-hint {
    text-align: center;
    color: var(--brand-text-muted, #6B8FA8);
    font-size: 0.85rem;
    padding: 12px 0;
    margin: 0;
}
.seed-account-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    border-radius: 6px;
    margin-bottom: 4px;
    background: rgba(99, 32, 232, 0.04);
    border: 1px solid rgba(99, 32, 232, 0.08);
}
[data-theme="dark"] .seed-account-row {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}
.seed-account-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.seed-account-user {
    font-weight: 600;
    font-size: 0.85rem;
}
.seed-account-role {
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.seed-role-admin {
    background: rgba(232, 98, 10, 0.12);
    color: #E8620A;
}
.seed-role-user {
    background: rgba(99, 32, 232, 0.1);
    color: #6320e8;
}
.seed-role-viewer {
    background: rgba(107, 143, 168, 0.15);
    color: #6B8FA8;
}
.seed-account-pw code {
    font-size: 0.8rem;
    cursor: pointer;
}
.seed-pw-hidden {
    cursor: pointer;
    user-select: none;
    letter-spacing: 2px;
}
.seed-pw-visible {
    cursor: pointer;
    font-family: monospace;
    letter-spacing: 0;
    color: var(--brand-primary, #6320e8);
}
.seed-remove-btn {
    flex-shrink: 0;
    padding: 4px !important;
    line-height: 1;
}
/* Seeded Accounts in Result Panel */
.seed-result-header {
    margin-top: 12px;
    margin-bottom: 8px;
}
.seed-result-list {
    border: 1px solid var(--brand-border, #D9D9D6);
    border-radius: 8px;
    overflow: hidden;
}
.seed-result-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--brand-border, #D9D9D6);
    font-size: 0.85rem;
}
.seed-result-row:last-child {
    border-bottom: none;
}
.seed-result-user {
    font-weight: 600;
    min-width: 80px;
}
.seed-result-pw {
    font-family: monospace;
    font-size: 0.8rem;
    background: rgba(99, 32, 232, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
}
.seed-auto-badge {
    font-size: 0.65rem;
    padding: 1px 4px;
    border-radius: 3px;
    background: rgba(107, 143, 168, 0.15);
    color: var(--brand-text-muted, #6B8FA8);
    text-transform: uppercase;
    font-weight: 600;
}
.seed-result-warning {
    font-size: 0.8rem;
    color: var(--brand-danger, #E8620A);
    margin: 8px 0 0;
    font-weight: 500;
}
/* Share link accounts badge in list */
.share-link-accounts-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.75rem;
    color: var(--brand-text-muted, #6B8FA8);
    background: rgba(99, 32, 232, 0.06);
    padding: 1px 6px;
    border-radius: 4px;
}
/* Admin Password Card on Extension Detail */
.admin-pw-card {
    background: var(--brand-surface, #F5F5F5);
    border: 1px solid var(--brand-border, #D9D9D6);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 12px;
}
[data-theme="dark"] .admin-pw-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}
.admin-pw-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--brand-primary, #6320e8);
}
.admin-pw-body {
    font-size: 0.85rem;
}
.admin-pw-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.admin-pw-label {
    font-weight: 500;
    color: var(--brand-text-muted, #6B8FA8);
    min-width: 80px;
}
.admin-pw-value {
    font-family: monospace;
    font-size: 0.85rem;
}
.admin-pw-hint {
    font-size: 0.75rem;
    color: var(--brand-text-muted, #6B8FA8);
    margin: 6px 0 0;
}
/* Admin Credentials Card on Admin Dashboard */
.admin-creds-card {
    border-left: 3px solid var(--brand-primary, #6320e8);
}
.admin-creds-hint {
    font-size: 0.8rem;
    color: var(--brand-text-muted, #6B8FA8);
    margin: 0 0 10px;
}
.admin-creds-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 0.85rem;
}
.admin-creds-label {
    font-weight: 500;
    color: var(--brand-text-muted, #6B8FA8);
    min-width: 80px;
}
.admin-creds-value {
    font-family: monospace;
    font-size: 0.85rem;
}
/* Responsive: seeded accounts form */
@media (max-width: 768px) {
    .seed-form-row {
        flex-wrap: wrap;
    }
    .seed-form-field {
        flex: 1 1 100%;
    }
    .seed-form-field-role {
        flex: 1 1 100%;
    }
    .seed-add-btn {
        width: 100%;
    }
    .seed-account-info {
        flex-wrap: wrap;
    }
    .seed-result-row {
        flex-wrap: wrap;
    }
}

/* ── Seeded Account Management Modal (Sprint 19) ── */
.manage-accounts-modal {
    max-width: 640px;
}
.manage-accounts-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.manage-toolbar-actions {
    display: flex;
    gap: 8px;
}
.manage-csv-hint {
    font-size: 0.78rem;
    color: var(--brand-text-muted, #6B8FA8);
    margin: 0 0 12px;
}
.manage-accounts-notice {
    background: rgba(99, 32, 232, 0.08);
    border: 1px solid rgba(99, 32, 232, 0.2);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size: 0.82rem;
    line-height: 1.5;
    word-break: break-all;
}
[data-theme="dark"] .manage-accounts-notice {
    background: rgba(127, 103, 254, 0.12);
    border-color: rgba(127, 103, 254, 0.3);
}
.manage-accounts-notice code {
    font-family: monospace;
    background: rgba(99, 32, 232, 0.1);
    padding: 1px 6px;
    border-radius: 4px;
}
.manage-add-form {
    border: 1px solid var(--brand-border, #D9D9D6);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 14px;
    background: var(--brand-surface, #F5F5F5);
}
[data-theme="dark"] .manage-add-form {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}
.manage-accounts-list {
    max-height: 320px;
    overflow-y: auto;
}
.manage-accounts-table {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.manage-account-row {
    border: 1px solid var(--brand-border, #D9D9D6);
    border-radius: 8px;
    padding: 8px 12px;
    background: var(--brand-bg-elevated, #fff);
}
[data-theme="dark"] .manage-account-row {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.08);
}
.manage-account-view {
    display: flex;
    align-items: center;
    gap: 10px;
}
.manage-account-view .seed-account-user {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.manage-account-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.manage-del-btn:hover {
    color: var(--brand-danger, #E8620A);
    border-color: var(--brand-danger, #E8620A);
}
.manage-account-edit {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--brand-border, #D9D9D6);
}
.manage-account-edit .mg-edit-user {
    flex: 1 1 130px;
}
.manage-account-edit .mg-edit-pw {
    flex: 1 1 180px;
}
.manage-account-edit .mg-edit-role {
    flex: 0 0 90px;
}
.manage-account-edit .seed-error {
    flex: 1 1 100%;
}
/* Share link row action group */
.share-link-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.share-manage-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
@media (max-width: 640px) {
    .manage-accounts-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .manage-account-view {
        flex-wrap: wrap;
    }
}

/* ── Seeding Audit Log (Sprint 20) ── */
.audit-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
}
.audit-filter-label {
    font-size: 0.85rem;
    color: var(--brand-text-muted, #6B8FA8);
}
.audit-filter-select {
    padding: 5px 8px;
    border-radius: 6px;
    border: 1px solid var(--brand-border, #D9D9D6);
    background: var(--brand-bg-elevated, #fff);
    color: var(--brand-text, #0d0b15);
    font-size: 0.85rem;
}
[data-theme="dark"] .audit-filter-select {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    color: #e8e6f0;
}
.audit-intro {
    font-size: 0.85rem;
    color: var(--brand-text-muted, #6B8FA8);
    margin: 0 0 14px;
    max-width: 720px;
    line-height: 1.5;
}
/* Audit action badges reuse .action-* base + add seeding tints */
.action-seed_account_add { background: rgba(34, 197, 94, 0.14); color: #16a34a; }
.action-seed_account_edit { background: rgba(99, 32, 232, 0.12); color: #6320e8; }
.action-seed_account_delete { background: rgba(232, 98, 10, 0.14); color: #E8620A; }
.action-seed_account_regen { background: rgba(245, 166, 35, 0.16); color: #d98b00; }
[data-theme="dark"] .action-seed_account_add { color: #4ade80; }
[data-theme="dark"] .action-seed_account_edit { color: #a78bfa; }
[data-theme="dark"] .action-seed_account_delete { color: #fb923c; }
[data-theme="dark"] .action-seed_account_regen { color: #fbbf24; }
@media (max-width: 640px) {
    .audit-toolbar {
        flex-wrap: wrap;
    }
}

/* ── Seeded Account Activation Status (Sprint 21) ── */
.seed-status-badge {
    font-size: 0.68rem;
    padding: 1px 7px;
    border-radius: 10px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.seed-status-pending {
    background: rgba(107, 143, 168, 0.16);
    color: #6B8FA8;
}
.seed-status-active {
    background: rgba(34, 197, 94, 0.16);
    color: #16a34a;
}
.seed-status-expired {
    background: rgba(232, 98, 10, 0.14);
    color: #E8620A;
}
[data-theme="dark"] .seed-status-active { color: #4ade80; }
[data-theme="dark"] .seed-status-expired { color: #fb923c; }
[data-theme="dark"] .seed-status-pending { color: #94b3c9; }

/* Audit badges for new retrieve/activate actions */
.action-seed_account_retrieve { background: rgba(99, 32, 232, 0.10); color: #6320e8; }
.action-seed_account_activate { background: rgba(34, 197, 94, 0.14); color: #16a34a; }
[data-theme="dark"] .action-seed_account_retrieve { color: #a78bfa; }
[data-theme="dark"] .action-seed_account_activate { color: #4ade80; }

/* ── Per-Share Analytics Dashboard (Sprint 23) ── */
.share-analytics-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--brand-text-muted, #6B8FA8);
}
.access-stat-active { color: #16a34a; }
[data-theme="dark"] .access-stat-active { color: #4ade80; }

/* CSS bar-chart timeline */
.analytics-timeline {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 140px;
    padding: 8px 4px 0;
    overflow-x: auto;
}
.analytics-tl-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    flex: 1 1 0;
    min-width: 22px;
    height: 100%;
}
.analytics-tl-bar {
    width: 60%;
    min-height: 2px;
    border-radius: 4px 4px 0 0;
    background: linear-gradient(180deg, var(--brand-primary, #6320e8), #7F67FE);
    transition: opacity 0.15s;
}
.analytics-tl-col:hover .analytics-tl-bar { opacity: 0.8; }
.analytics-tl-label {
    margin-top: 6px;
    font-size: 0.62rem;
    color: var(--brand-text-muted, #6B8FA8);
    white-space: nowrap;
    transform: rotate(-45deg);
    transform-origin: center;
}
.share-analytics-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
@media (max-width: 640px) {
    .analytics-tl-label { font-size: 0.55rem; }
    .analytics-timeline { height: 110px; }
}
