/* ==============================================================================
   Take-Off Voice Studio - User Audio Explorer Style System
   Light Theme (Default) & Dark Theme Toggle
   Apple Champagne Gold, Slate & Frosted Glassmorphism
   ============================================================================== */

:root, [data-theme="light"] {
    --bg-base: #F8FAFC;
    --bg-gradient-mesh: radial-gradient(circle at 12% 16%, rgba(212, 175, 122, 0.18) 0%, transparent 42%),
                        radial-gradient(circle at 88% 84%, rgba(56, 189, 248, 0.12) 0%, transparent 45%),
                        radial-gradient(circle at 50% 50%, #F8FAFC 0%, #F1F5F9 100%);

    --bg-surface: rgba(255, 255, 255, 0.88);
    --bg-surface-hover: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-card-subtle: #F8FAFC;
    --bg-input: #F1F5F9;

    --border-glass: rgba(226, 232, 240, 0.9);
    --border-glass-hover: rgba(184, 142, 86, 0.45);
    --border-active: #B88E56;

    --gold-light: #FBF7EE;
    --gold-primary: #B88E56;
    --gold-deep: #8C6228;
    --gold-glow: rgba(184, 142, 86, 0.22);

    --text-main: #0F172A;
    --text-muted: #475569;
    --text-dim: #94A3B8;

    --accent-emerald: #059669;
    --accent-amber: #D97706;
    --accent-rose: #E11D48;
    --accent-blue: #0284C7;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-pill: 9999px;

    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --shadow-window: 0 10px 30px -10px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(226, 232, 240, 0.85);
    --shadow-card: 0 2px 8px rgba(15, 23, 42, 0.04), 0 0 0 1px rgba(226, 232, 240, 0.8);
    --shadow-card-hover: 0 6px 18px rgba(184, 142, 86, 0.14), 0 0 0 1.5px rgba(184, 142, 86, 0.35);

    --header-bg: rgba(255, 255, 255, 0.88);
    --header-border: rgba(226, 232, 240, 0.9);
    --card-header-bg: #F8FAFC;
    --audio-list-bg: #F8FAFC;
    --content-text: #1E293B;
    --player-bg: #FFFFFF;
    --player-track-bg: #E2E8F0;
    --badge-bg: #F1F5F9;
    --badge-text: #475569;
    --empty-bg: #FEF3C7;
    --scrollbar-thumb: #CBD5E1;
    --scrollbar-thumb-hover: #94A3B8;
}

[data-theme="dark"] {
    --bg-base: #0F1117;
    --bg-gradient-mesh: radial-gradient(circle at 15% 20%, rgba(212, 175, 122, 0.12) 0%, transparent 40%),
                        radial-gradient(circle at 85% 80%, rgba(56, 189, 248, 0.08) 0%, transparent 45%),
                        radial-gradient(circle at 50% 50%, rgba(15, 17, 23, 1) 0%, rgba(10, 11, 15, 1) 100%);

    --bg-surface: rgba(26, 29, 38, 0.75);
    --bg-surface-hover: rgba(35, 40, 52, 0.85);
    --bg-card: rgba(22, 25, 34, 0.82);
    --bg-card-subtle: rgba(30, 34, 46, 0.6);
    --bg-input: rgba(15, 17, 23, 0.6);

    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-hover: rgba(212, 175, 122, 0.35);
    --border-active: #D4AF7A;

    --gold-light: #F4EADA;
    --gold-primary: #D4AF7A;
    --gold-deep: #B88E56;
    --gold-glow: rgba(212, 175, 122, 0.25);

    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --text-dim: #64748B;

    --accent-emerald: #10B981;
    --accent-amber: #F59E0B;
    --accent-rose: #F43F5E;
    --accent-blue: #38BDF8;

    --shadow-window: 0 20px 40px -15px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--border-glass);
    --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-card-hover: 0 6px 18px rgba(212, 175, 122, 0.2);

    --header-bg: rgba(15, 17, 23, 0.85);
    --header-border: var(--border-glass);
    --card-header-bg: rgba(255, 255, 255, 0.02);
    --audio-list-bg: rgba(10, 12, 16, 0.4);
    --content-text: #E2E8F0;
    --player-bg: rgba(15, 17, 23, 0.85);
    --player-track-bg: rgba(255, 255, 255, 0.15);
    --badge-bg: rgba(255, 255, 255, 0.05);
    --badge-text: var(--text-muted);
    --empty-bg: rgba(212, 175, 122, 0.1);
    --scrollbar-thumb: #334155;
    --scrollbar-thumb-hover: #475569;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-base);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.5;
    transition: background-color 0.25s ease, color 0.25s ease;
}

/* Background mesh glow */
.app-background {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: var(--bg-gradient-mesh);
    pointer-events: none;
    transition: background 0.3s ease;
}

/* Custom modern scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

/* ==============================================================================
   HEADER NAVIGATION
   ============================================================================== */

.hub-header {
    height: 72px;
    border-bottom: 1px solid var(--header-border);
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.25s ease, border-color 0.25s ease;
}

.header-inner {
    max-width: 1700px;
    margin: 0 auto;
    height: 100%;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-badge-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-primary) 55%, var(--gold-deep) 100%);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px var(--gold-glow);
}

.brand-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-main);
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--gold-primary);
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Header User Search Bar */
.header-user-search-wrap {
    display: flex;
    align-items: center;
    max-width: 400px;
    width: 100%;
}

.header-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 7px 14px;
    border-radius: var(--radius-pill);
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-card);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-search-box:focus-within {
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px var(--gold-glow), var(--shadow-card);
    background: var(--bg-surface-hover);
}

.header-search-box .search-icon-svg {
    color: var(--gold-primary);
    flex-shrink: 0;
}

.header-search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main);
    font-size: 0.88rem;
    font-family: var(--font-sans);
    font-weight: 500;
    width: 100%;
}

.header-search-box input::placeholder {
    color: var(--text-dim);
    font-weight: 400;
}

.search-clear-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    transition: all 0.15s ease;
}

.search-clear-btn:hover {
    background: var(--gold-light);
    color: var(--text-main);
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-deep) 100%);
    color: #FFFFFF;
    border: none;
    outline: none;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px var(--gold-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px var(--gold-glow);
    filter: brightness(1.06);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-btn {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-glass);
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.nav-btn:hover {
    color: var(--gold-primary);
    border-color: var(--border-glass-hover);
    background: var(--bg-surface-hover);
    box-shadow: var(--shadow-card);
}

.theme-toggle-btn {
    user-select: none;
}

/* ==============================================================================
   MAIN TWO-COLUMN LAYOUT
   ============================================================================== */

.hub-layout {
    max-width: 1700px;
    margin: 0 auto;
    padding: 24px;
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 24px;
    height: calc(100vh - 72px);
}

/* ==============================================================================
   LEFT SIDEBAR: USERS & AUDIO LINKS
   ============================================================================== */

.sidebar-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-window);
    transition: all 0.2s ease;
    height: 100%;
    max-height: 100%;
    min-height: 0;
}

.sidebar-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sidebar-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.title-with-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.title-with-pill h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    margin: 0;
}

.count-pill {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--gold-deep);
    background: rgba(184, 142, 86, 0.12);
    border: 1px solid rgba(184, 142, 86, 0.28);
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.icon-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    color: var(--gold-primary);
    border-color: var(--gold-primary);
    background: rgba(184, 142, 86, 0.1);
}

.btn-refresh-unified {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-refresh-unified:hover {
    color: var(--gold-primary);
    border-color: var(--gold-primary);
    background: rgba(184, 142, 86, 0.12);
    box-shadow: 0 2px 8px var(--gold-glow);
}

.btn-refresh-unified:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.refresh-icon.spinning,
.btn-refresh-unified.spinning .refresh-icon {
    animation: spinRefresh 0.8s linear infinite;
}

@keyframes spinRefresh {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    color: var(--text-dim);
    transition: all 0.2s ease;
}

.search-box:focus-within {
    border-color: var(--gold-primary);
    background: var(--bg-surface-hover);
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main);
    font-size: 0.85rem;
    width: 100%;
    font-family: var(--font-sans);
}

.search-box input::placeholder {
    color: var(--text-dim);
}

.users-scroll-area {
    flex: 1 1 0%;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 16px 80px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) transparent;
    scroll-behavior: smooth;
}

.users-scroll-area::-webkit-scrollbar {
    width: 6px;
}

.users-scroll-area::-webkit-scrollbar-track {
    background: transparent;
}

.users-scroll-area::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-thumb);
    border-radius: 9999px;
}

.users-scroll-area::-webkit-scrollbar-thumb:hover {
    background-color: var(--scrollbar-thumb-hover);
}

/* User Card Group (Accordion item) */
.user-group-card {
    flex-shrink: 0;
    min-height: min-content;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-card);
}

.user-group-card.open {
    border-color: var(--border-glass-hover);
    box-shadow: var(--shadow-card-hover);
}

.user-card-header {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}

.user-card-header:hover {
    background: var(--bg-card-subtle);
}

.user-identity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(212, 175, 122, 0.25) 0%, rgba(184, 142, 86, 0.35) 100%);
    border: 1.5px solid var(--gold-primary);
    color: var(--gold-deep);
    font-weight: 800;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-name-label {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-main);
}

.user-meta-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.accordion-chevron {
    color: var(--text-dim);
    transition: transform 0.2s ease;
}

.user-group-card.open .accordion-chevron {
    transform: rotate(180deg);
}

/* Audios List under User */
.user-audios-list {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid var(--border-glass);
    background: var(--audio-list-bg);
}

.user-group-card:not(.open) .user-audios-list {
    display: none !important;
}

/* Audio Recording Item Card */
.audio-item-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.18s ease;
    cursor: pointer;
}

.audio-item-card:hover {
    border-color: var(--border-glass-hover);
    background: var(--bg-surface-hover);
    box-shadow: var(--shadow-card);
}

.audio-item-card.active {
    border-color: var(--gold-primary);
    background: rgba(184, 142, 86, 0.1);
    box-shadow: 0 0 0 1px var(--gold-primary), 0 4px 12px var(--gold-glow);
}

.audio-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.audio-name-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    word-break: break-all;
    line-height: 1.3;
}

.audio-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 3px;
}

.audio-upload-time {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-weight: 500;
}

.audio-upload-time svg {
    color: var(--gold-primary);
    flex-shrink: 0;
}

.badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.64rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    line-height: 1.2;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.badge-tag .badge-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
}

.badge-tag.status-completed {
    color: var(--accent-emerald);
    background: rgba(5, 150, 105, 0.09);
    border-color: rgba(5, 150, 105, 0.22);
    text-transform: capitalize;
}

/* ==============================================================================
   RIGHT MAIN PANEL: FULL DETAILS DISPLAY
   ============================================================================== */

.details-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-window);
    position: relative;
    transition: all 0.2s ease;
}

/* Empty Placeholder State */
.empty-display {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.empty-icon-box {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--empty-bg);
    border: 1.5px dashed var(--gold-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-primary);
    margin-bottom: 20px;
}

.empty-display h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.empty-display p {
    font-size: 0.92rem;
    max-width: 480px;
    line-height: 1.6;
    margin-bottom: 24px;
    color: var(--text-muted);
}

.empty-tip {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    padding: 10px 18px;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    color: var(--gold-deep);
    box-shadow: var(--shadow-card);
}


.empty-display.hidden {
    display: none !important;
}


/* Active Audio Content (Voice Intelligence Studio - Matches Photo 1) */
.active-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.active-content.hidden {
    display: none !important;
}

.hidden {
    display: none !important;
}

/* Studio Header Bar */
.studio-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-bottom: 2px;
}

.studio-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gold-deep);
}

.studio-header-title svg {
    color: var(--gold-primary);
    flex-shrink: 0;
}

.studio-header-title h2 {
    font-size: 1.18rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
    letter-spacing: -0.01em;
}

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

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.16s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.action-btn:hover {
    background: var(--bg-surface-hover);
    color: var(--gold-deep);
    border-color: var(--gold-primary);
    box-shadow: 0 2px 8px var(--gold-glow);
}

.action-btn.playing {
    background: rgba(5, 150, 105, 0.12);
    color: var(--accent-emerald);
    border-color: var(--accent-emerald);
}

/* 4 Metrics Bar Row (Matches Photo 1) */
.metrics-bar {
    flex-shrink: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

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

.metric-item {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    box-shadow: var(--shadow-card);
}

.metric-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--gold-deep);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.metric-val {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    font-family: var(--font-sans);
}

/* Segmented Tabs Bar (Apple Sonoma Style - Matches Photo 1) */
.result-tabs-bar {
    flex-shrink: 0;
    display: inline-flex;
    background: rgba(220, 205, 185, 0.35);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 3px;
    gap: 3px;
    align-self: flex-start;
    max-width: 100%;
    overflow-x: auto;
}

.result-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.16s ease;
    white-space: nowrap;
}

.result-tab:hover {
    color: var(--text-main);
}

.result-tab.active {
    background: #FFFFFF;
    color: var(--gold-deep);
    box-shadow: 0 1px 4px rgba(35, 26, 18, 0.12);
    font-weight: 700;
}

[data-theme="dark"] .result-tab.active {
    background: #1E293B;
    color: #F8FAFC;
}

.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 800;
    background: var(--gold-deep);
    color: #FFFFFF;
    margin-left: 2px;
}

/* Transcript Content Container & Tab Panes */
.transcript-content-container {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tab-pane {
    display: none;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.tab-pane.active {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Tasks Tab Workload Ribbon & Task Cards (Matches Photo 1) */
.tasks-workload-ribbon {
    flex-shrink: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 7px 14px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-card);
}

.workload-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.78rem;
}

.workload-icon {
    font-size: 0.95rem;
}

.workload-title {
    font-weight: 700;
    color: var(--gold-deep);
}

.workload-chips-container {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.workload-member-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(245, 235, 220, 0.85);
    border: 1px solid rgba(184, 142, 86, 0.3);
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.72rem;
}

[data-theme="dark"] .workload-member-pill {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(212, 175, 122, 0.25);
    color: #F8FAFC;
}

.workload-member-pill .pill-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--gold-primary);
    color: #FFFFFF;
    font-size: 0.6rem;
    font-weight: 800;
}

.tasks-list-container {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 4px;
}

.tasks-list-container::-webkit-scrollbar {
    width: 5px;
}

.tasks-list-container::-webkit-scrollbar-thumb {
    background: rgba(184, 142, 86, 0.35);
    border-radius: 999px;
}

.empty-tasks-box {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-dim);
    font-size: 0.85rem;
    background: var(--bg-card);
    border: 1px dashed var(--border-glass);
    border-radius: var(--radius-sm);
}

.task-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-left: 4px solid var(--gold-primary);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.16s ease;
}

.task-card:hover {
    border-color: var(--border-glass-hover);
    box-shadow: var(--shadow-card-hover);
}

.task-card.priority-high {
    border-left-color: var(--accent-rose);
}

.task-card.priority-medium {
    border-left-color: var(--gold-primary);
}

.task-card.priority-low {
    border-left-color: var(--accent-emerald);
}

.task-card.completed {
    opacity: 0.65;
    background: var(--bg-card-subtle);
}

.task-card.completed .task-title {
    text-decoration: line-through;
}

.task-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.task-left-info {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 1;
}

.task-checkbox {
    width: 17px;
    height: 17px;
    cursor: pointer;
    accent-color: var(--gold-deep);
}

.task-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-main);
}

.task-priority-pill {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: 0.04em;
}

.task-priority-pill.high {
    background: #FFE4E6;
    color: #E11D48;
    border: 1px solid rgba(225, 29, 72, 0.25);
}

.task-priority-pill.medium {
    background: #FEF3C7;
    color: #D97706;
    border: 1px solid rgba(217, 119, 6, 0.25);
}

.task-priority-pill.low {
    background: #D1FAE5;
    color: #059669;
    border: 1px solid rgba(5, 150, 105, 0.25);
}

.task-desc {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.task-footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 6px;
    border-top: 1px solid var(--border-glass);
}

.task-assignment-group {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
}

.assignee-label {
    color: var(--text-muted);
    font-weight: 600;
}

.assignee-select {
    background: var(--bg-input);
    border: 1px solid var(--border-glass);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    outline: none;
}

.assignee-select:focus {
    border-color: var(--gold-primary);
}

.task-deadline-pill {
    font-size: 0.72rem;
    font-family: var(--font-mono);
    color: var(--gold-deep);
    background: rgba(184, 142, 86, 0.1);
    border: 1px solid rgba(184, 142, 86, 0.25);
    padding: 2px 7px;
    border-radius: 4px;
}

/* Executive Summary, Hinglish & Verbatim Transcript Cards */
.summary-text-card, .hinglish-text-card, .transcript-text-card {
    flex: 1 1 auto;
    min-height: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    overflow-y: auto;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.summary-text-card::-webkit-scrollbar,
.hinglish-text-card::-webkit-scrollbar,
.transcript-text-card::-webkit-scrollbar {
    width: 5px;
}

.summary-text-card::-webkit-scrollbar-thumb,
.hinglish-text-card::-webkit-scrollbar-thumb,
.transcript-text-card::-webkit-scrollbar-thumb {
    background: rgba(184, 142, 86, 0.35);
    border-radius: 999px;
}

.section-card-banner, .transcript-header-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-glass);
    flex-shrink: 0;
}

.card-banner-title, .transcript-source-tag {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--gold-deep);
}

.hinglish-header-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(2, 132, 199, 0.05);
    border-radius: 6px;
    padding: 8px 12px;
    border: 1px solid rgba(2, 132, 199, 0.2);
    flex-shrink: 0;
}

.hinglish-flag {
    font-size: 1.25rem;
}

.hinglish-header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.hinglish-header-text strong {
    font-size: 0.85rem;
    color: var(--text-main);
}

.hinglish-header-text span {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.inner-copy-btn {
    background: var(--bg-input);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.16s ease;
    white-space: nowrap;
}

.inner-copy-btn:hover {
    background: var(--bg-surface-hover);
    color: var(--gold-primary);
    border-color: var(--gold-primary);
}

.summary-output-body, .hinglish-body-text, .transcript-text {
    font-size: 0.94rem;
    line-height: 1.7;
    color: var(--content-text);
    white-space: pre-wrap;
    word-break: break-word;
    flex: 1 1 auto;
    margin: 0;
}

.summary-output-body h3, .summary-output-body h2 {
    color: var(--gold-deep);
    margin-top: 14px;
    margin-bottom: 6px;
    font-size: 1.05rem;
}

.summary-output-body h3:first-child {
    margin-top: 0;
}

.summary-output-body ul {
    margin-left: 20px;
    margin-bottom: 10px;
}

.summary-output-body li {
    margin-bottom: 4px;
}

/* Fullscreen Mode for Details Panel */
.hub-layout.details-fullscreen {
    grid-template-columns: 1fr !important;
}

.hub-layout.details-fullscreen .sidebar-panel {
    display: none !important;
}

/* ==============================================================================
   TOAST & SPINNER
   ============================================================================== */

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0F172A;
    color: #FFFFFF;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    z-index: 1000;
    transition: opacity 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    color: var(--text-dim);
    font-size: 0.85rem;
}

.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(184, 142, 86, 0.2);
    border-top-color: var(--gold-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 1080px) {
    .hub-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
    .sidebar-panel {
        max-height: 480px;
    }
}
