/* ===========================================
 * JarganWeb Design System
 * Modern glass morphism aesthetic
 * Sharp black & white with strategic color pops
 * No emojis - purely typographic
 * =========================================== */

/* ═══════════════════════════════════════════
   LAYOUT COMPONENTS
   ═══════════════════════════════════════════ */

/* Glass morphism panels - primary container */
.glass-panel {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(32px) saturate(160%);
    -webkit-backdrop-filter: blur(32px) saturate(160%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-lg, 12px);
    padding: var(--space-6, 24px);
    box-shadow: 0 8px 64px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.glass-panel-lg {
    padding: var(--space-8, 32px);
    border-radius: var(--radius-xl, 16px);
}

.glass-panel-sm {
    padding: var(--space-4, 16px);
    border-radius: var(--radius-md, 8px);
}

/* Glass cards - lighter, more subtle */
.glass-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: var(--radius-md, 8px);
    padding: var(--space-4, 16px);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
    transition: all var(--transition-fast, 0.15s);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.22);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Compact card for lists and grids */
.compact-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: var(--radius-md, 8px);
    padding: var(--space-3, 12px) var(--space-4, 16px);
    transition: all var(--transition-fast, 0.15s);
}

.compact-card:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.2);
}

/* Login/auth panel style */
.auth-panel {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(32px) saturate(160%);
    -webkit-backdrop-filter: blur(32px) saturate(160%);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 24px;
    padding: 2rem 2.25rem 2.25rem;
    box-shadow: 0 8px 64px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* ═══════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════ */

.title-xl {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: #000;
    margin: 0;
    line-height: 1.2;
}

.title-lg {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #000;
    margin: 0;
    line-height: 1.25;
}

.title-md {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #000;
    margin: 0;
    line-height: 1.3;
}

.title-sm {
    font-size: 1rem;
    font-weight: 600;
    color: #000;
    margin: 0;
    line-height: 1.4;
}

.subtitle {
    font-size: 0.875rem;
    color: rgba(0, 0, 0, 0.55);
    line-height: 1.5;
    margin: 0;
}

.subtitle-sm {
    font-size: 0.75rem;
    color: rgba(0, 0, 0, 0.5);
    line-height: 1.4;
}

.label-text {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(0, 0, 0, 0.6);
}

.label-text-sm {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(0, 0, 0, 0.5);
}

/* ═══════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════ */

/* Modern primary button - pure black */
.btn-modern {
    background: #000;
    color: #fff;
    border: 1px solid #000;
    border-radius: var(--radius-md, 8px);
    padding: 0.65rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast, 0.15s);
    letter-spacing: 0.02em;
    text-decoration: none;
    display: inline-block;
}

.btn-modern:hover {
    background: #222;
    border-color: #222;
    color: #fff;
    transform: translateY(-1px);
    text-decoration: none;
}

.btn-modern:active {
    transform: translateY(0);
}

.btn-modern:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Modern button sizes */
.btn-modern-sm {
    padding: 0.45rem 1rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

.btn-modern-lg {
    padding: 0.85rem 2rem;
    font-size: 1rem;
}

/* Success button - green pop */
.btn-modern-success {
    background: var(--color-status-success, #198754);
    border-color: var(--color-status-success, #198754);
    color: #fff;
}

.btn-modern-success:hover {
    background: #146c43;
    border-color: #146c43;
    color: #fff;
}

/* Danger button - red pop */
.btn-modern-danger {
    background: var(--color-status-error, #dc2626);
    border-color: var(--color-status-error, #dc2626);
    color: #fff;
}

.btn-modern-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #fff;
}

/* Outline button - ghost style */
.btn-modern-outline {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: rgba(0, 0, 0, 0.75);
}

.btn-modern-outline:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.35);
    color: #000;
}

/* Subtle button - minimal */
.btn-subtle {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: rgba(0, 0, 0, 0.7);
    border-radius: 6px;
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast, 0.15s);
}

.btn-subtle:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.25);
    color: #000;
}

.btn-subtle.active {
    background: #000;
    border-color: #000;
    color: #fff;
    font-weight: 600;
}

/* ═══════════════════════════════════════════
   FORM CONTROLS
   ═══════════════════════════════════════════ */

.input-modern {
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-md, 8px);
    padding: 0.7rem 1rem;
    color: #1a1a1a;
    font-size: 0.95rem;
    transition: all var(--transition-fast, 0.15s);
}

.input-modern:focus {
    outline: none;
    background: #fff;
    border-color: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.input-modern::placeholder {
    color: rgba(0, 0, 0, 0.3);
}

.input-modern:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: rgba(0, 0, 0, 0.03);
}

/* Select dropdown */
.select-modern {
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-md, 8px);
    padding: 0.7rem 1rem;
    color: #1a1a1a;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-fast, 0.15s);
}

.select-modern:focus {
    outline: none;
    background: #fff;
    border-color: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

/* Form group */
.form-group-modern {
    margin-bottom: 1.25rem;
}

.form-group-modern label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(0, 0, 0, 0.6);
    margin-bottom: 0.4rem;
}

/* ═══════════════════════════════════════════
   BADGES & LABELS
   ═══════════════════════════════════════════ */

/* Success badge - green pop */
.badge-success {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: rgba(25, 135, 84, 0.12);
    border: 1px solid rgba(25, 135, 84, 0.3);
    border-radius: 6px;
    color: #0d5c1f;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Warning badge - yellow/orange pop */
.badge-warning {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: rgba(255, 193, 7, 0.12);
    border: 1px solid rgba(255, 193, 7, 0.35);
    border-radius: 6px;
    color: #856404;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Error badge - red pop */
.badge-error {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: rgba(220, 38, 38, 0.12);
    border: 1px solid rgba(220, 38, 38, 0.35);
    border-radius: 6px;
    color: #991b1b;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Purple badge - accent pop */
.badge-purple {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: rgba(111, 66, 193, 0.1);
    border: 1px solid rgba(111, 66, 193, 0.3);
    border-radius: 6px;
    color: #4c1d95;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Neutral badge - subtle gray */
.badge-neutral {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    color: rgba(0, 0, 0, 0.7);
    font-size: 0.8rem;
    font-weight: 600;
}

/* Small badge variant */
.badge-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    border-radius: 4px;
}

/* ═══════════════════════════════════════════
   STATS & METRICS
   ═══════════════════════════════════════════ */

.stat-row {
    display: flex;
    justify-content: space-around;
    gap: var(--space-4, 16px);
    margin-bottom: var(--space-4, 16px);
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    color: #000;
}

.stat-value-lg {
    font-size: 2.25rem;
    font-weight: 800;
}

.stat-value-sm {
    font-size: 1.25rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(0, 0, 0, 0.45);
    margin-top: 0.25rem;
}

/* Compact stat for smaller spaces */
.stat-compact {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.stat-compact .stat-value {
    font-size: 1.25rem;
}

.stat-compact .stat-label {
    font-size: 0.75rem;
}

/* ═══════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════ */

.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-modern thead th {
    background: rgba(0, 0, 0, 0.03);
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(0, 0, 0, 0.6);
    text-align: left;
}

.table-modern tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.8);
    font-size: 0.9rem;
}

.table-modern tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

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

/* Compact table variant */
.table-modern-compact thead th {
    padding: 0.5rem 0.75rem;
    font-size: 0.7rem;
}

.table-modern-compact tbody td {
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
}

/* ═══════════════════════════════════════════
   NAVIGATION & TABS
   ═══════════════════════════════════════════ */

.tab-nav {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: var(--space-5, 20px);
}

.tab-item {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.6);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast, 0.15s);
    text-decoration: none;
}

.tab-item:hover {
    color: #000;
    text-decoration: none;
}

.tab-item.active {
    color: #000;
    font-weight: 600;
    border-bottom-color: #000;
}

/* ═══════════════════════════════════════════
   ALERTS & MESSAGES
   ═══════════════════════════════════════════ */

.alert-modern {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md, 8px);
    margin-bottom: var(--space-4, 16px);
    font-size: 0.9rem;
    line-height: 1.5;
}

.alert-success {
    background: rgba(25, 135, 84, 0.1);
    border: 1px solid rgba(25, 135, 84, 0.3);
    color: #0d5c1f;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.35);
    color: #856404;
}

.alert-error {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.35);
    color: #991b1b;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #1e40af;
}

/* ═══════════════════════════════════════════
   GRID LAYOUTS
   ═══════════════════════════════════════════ */

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4, 16px);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4, 16px);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4, 16px);
}

.grid-6 {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--space-2, 8px);
}

/* Responsive grids */
@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .grid-6 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ═══════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════ */

/* Spacing utilities */
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: var(--space-1, 4px) !important; }
.mt-2 { margin-top: var(--space-2, 8px) !important; }
.mt-3 { margin-top: var(--space-3, 12px) !important; }
.mt-4 { margin-top: var(--space-4, 16px) !important; }
.mt-5 { margin-top: var(--space-5, 20px) !important; }
.mt-6 { margin-top: var(--space-6, 24px) !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: var(--space-1, 4px) !important; }
.mb-2 { margin-bottom: var(--space-2, 8px) !important; }
.mb-3 { margin-bottom: var(--space-3, 12px) !important; }
.mb-4 { margin-bottom: var(--space-4, 16px) !important; }
.mb-5 { margin-bottom: var(--space-5, 20px) !important; }
.mb-6 { margin-bottom: var(--space-6, 24px) !important; }

/* Text utilities */
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

.text-black { color: #000 !important; }
.text-white { color: #fff !important; }
.text-muted { color: rgba(0, 0, 0, 0.55) !important; }
.text-subtle { color: rgba(0, 0, 0, 0.4) !important; }

.font-normal { font-weight: 400 !important; }
.font-medium { font-weight: 500 !important; }
.font-semibold { font-weight: 600 !important; }
.font-bold { font-weight: 700 !important; }

/* Display utilities */
.flex { display: flex !important; }
.flex-col { flex-direction: column !important; }
.items-center { align-items: center !important; }
.justify-center { justify-content: center !important; }
.justify-between { justify-content: space-between !important; }
.gap-2 { gap: var(--space-2, 8px) !important; }
.gap-3 { gap: var(--space-3, 12px) !important; }
.gap-4 { gap: var(--space-4, 16px) !important; }

/* Interaction utilities */
.pointer { cursor: pointer !important; }
.no-select {
    user-select: none !important;
    -webkit-user-select: none !important;
}

/* ═══════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════ */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

/* ═══════════════════════════════════════════
   RESPONSIVE UTILITIES
   ═══════════════════════════════════════════ */

/* Hide on mobile */
@media (max-width: 767px) {
    .hide-mobile {
        display: none !important;
    }
}

/* Hide on desktop */
@media (min-width: 768px) {
    .hide-desktop {
        display: none !important;
    }
}

/* ── Mobile nav: prevent page-level horizontal overflow ── */
@media (max-width: 767px) {
    .jargan-nav {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }
    .jargan-nav-items {
        flex-shrink: 0;
    }
}

/* ═══════════════════════════════════════════
   OVERRIDES FOR BOOTSTRAP COMPATIBILITY
   ═══════════════════════════════════════════ */

/* Make Bootstrap buttons work with modern styles */
.btn.btn-modern {
    padding: 0.65rem 1.5rem;
    font-size: 0.9rem;
}

/* Make Bootstrap form controls work with modern styles */
.form-control.input-modern {
    height: auto;
}

.form-select.select-modern {
    background-position: right 0.75rem center;
}

/* ═══════════════════════════════════════════
   MODERN NAVBAR
   Glass morphism navigation with grouped dropdowns
   ═══════════════════════════════════════════ */

.jargan-nav {
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    height: 52px;
    background: var(--navbar-bg, #212529);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    /* BU-102: pin the main menu so it stays visible when long pages scroll. */
    position: sticky;
    top: 0;
    z-index: 1000;
}

.jargan-nav-brand {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    color: var(--navbar-brand, #fff) !important;
    text-decoration: none !important;
    margin-right: 1.75rem;
    flex-shrink: 0;
}

.jargan-nav-items {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    flex: 1;
}

.jargan-nav-link {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.65rem;
    color: var(--navbar-text, rgba(255, 255, 255, 0.8)) !important;
    text-decoration: none !important;
    font-size: 0.82rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.15s ease;
    white-space: nowrap;
    cursor: pointer;
    background: transparent;
    border: none;
    line-height: 1;
}

.jargan-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
    text-decoration: none !important;
}

.jargan-nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: #fff !important;
}

.jargan-nav-link svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

/* Nav Dropdown */
.jargan-nav-dropdown {
    position: relative;
}

.jargan-nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 210px;
    padding: 0.4rem;
    background: var(--navbar-bg, #212529);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: all 0.15s ease;
    z-index: 1001;
}

.jargan-nav-dropdown:hover .jargan-nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.jargan-nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.7rem;
    color: var(--navbar-text, rgba(255, 255, 255, 0.8)) !important;
    text-decoration: none !important;
    font-size: 0.82rem;
    border-radius: 6px;
    transition: all 0.12s ease;
}

.jargan-nav-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
}

.jargan-nav-dropdown-item svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    opacity: 0.65;
}

.jargan-nav-separator {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 0.3rem 0.5rem;
}

/* Dev Tier Override widget — admin dropdown, localhost only */
.dev-tier-widget {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem 0.6rem;
    cursor: default;
}

.dev-tier-widget:hover {
    background: transparent;
}

.dev-tier-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
}

.dev-tier-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
    padding: 0.1rem 0.45rem;
    border-radius: 3px;
    letter-spacing: 0.02em;
    line-height: 1.4;
}

.dev-tier-select {
    width: 100%;
    font-size: 0.72rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: #fff;
    padding: 0.2rem 0.4rem;
    cursor: pointer;
    outline: none;
    appearance: auto;
}

.dev-tier-select:hover {
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 255, 255, 0.25);
}

.dev-tier-select option {
    background: #1a1a2e;
    color: #fff;
}

.jargan-nav-right {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    margin-left: auto;
}

.icon-chevron {
    width: 12px !important;
    height: 12px !important;
    opacity: 0.5;
    margin-left: -2px;
    transition: transform 0.15s ease;
}

.jargan-nav-dropdown:hover .icon-chevron {
    transform: rotate(180deg);
}

/* Logout button in nav */
.jargan-nav-link.nav-logout {
    opacity: 0.75;
}
.jargan-nav-link.nav-logout:hover {
    opacity: 1;
}

/* Locked nav item — tier-gated features */
.jargan-nav-link.nav-locked {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}

.icon-lock {
    width: 11px !important;
    height: 11px !important;
    margin-left: 2px;
    opacity: 0.7;
    vertical-align: middle;
}

/* Tier simulation banner — visible on localhost when simulating a non-Developer tier */
.tier-sim-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.45rem 1.25rem;
    background: rgba(0, 0, 0, 0.9);
    border-left: 3px solid #DD5100;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.01em;
}

.tier-sim-icon {
    font-size: 0.9rem;
    flex-shrink: 0;
}

.tier-sim-limits {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.72rem;
}

.tier-sim-reset {
    margin-left: auto;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.7rem;
    padding: 0.15rem 0.6rem;
    cursor: pointer;
    transition: all 0.15s;
}

.tier-sim-reset:hover {
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

/* ═══════════════════════════════════════════
   TIER GATE
   Upgrade prompt for tier-locked features
   ═══════════════════════════════════════════ */

.tier-gate {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 2rem;
    margin: 1rem 0;
    border: 1px dashed rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.04) 100%);
}

.tier-gate-icon {
    color: rgba(0, 0, 0, 0.2);
    margin-bottom: 1rem;
}

.tier-gate-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 0.5rem;
}

.tier-gate-desc {
    color: #6b7280;
    font-size: 0.9rem;
    max-width: 420px;
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

.tier-gate-cta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tier-gate-badge {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
    padding: 0.2rem 0.7rem;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

.tier-gate-price {
    font-size: 0.82rem;
    color: #9ca3af;
    font-weight: 500;
}

/* Full-page gate — blocks entire admin backend for Free tier */
.tier-fullgate {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
}

.tier-fullgate-inner {
    text-align: center;
    max-width: 480px;
}

.tier-fullgate-inner h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 1.25rem 0 0.5rem;
}

.tier-fullgate-inner p {
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.tier-fullgate-sub {
    font-size: 0.85rem !important;
    color: #9ca3af !important;
}

.tier-fullgate-tiers {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.tier-fullgate-inner svg {
    color: rgba(0, 0, 0, 0.15);
}

/* Quota usage banner — inline on list pages */
.tier-quota-banner {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.85rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.82rem;
    color: #475569;
    margin-top: 0.5rem;
}

.tier-quota-tier {
    color: #94a3b8;
    font-size: 0.75rem;
    margin-left: 0.4rem;
}

.tier-quota-bar {
    width: 80px;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-left: auto;
}

.tier-quota-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* ═══════════════════════════════════════════
   FILTER BAR
   Pill/chip filter controls
   ═══════════════════════════════════════════ */

.filter-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.search-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 999px;
    padding: 0.4rem 0.75rem;
    flex: 1;
    max-width: 280px;
    transition: all 0.15s ease;
}

.search-pill:focus-within {
    border-color: rgba(0, 0, 0, 0.25);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.04);
}

.search-pill input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.83rem;
    width: 100%;
    color: inherit;
}

.search-pill input::placeholder {
    color: rgba(0, 0, 0, 0.35);
}

.search-pill svg {
    width: 15px;
    height: 15px;
    opacity: 0.35;
    flex-shrink: 0;
}

.search-clear {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    opacity: 0.35;
    flex-shrink: 0;
}
.search-clear:hover {
    opacity: 0.7;
}
.search-clear svg {
    width: 14px;
    height: 14px;
}

.filter-pill {
    appearance: none;
    -webkit-appearance: none;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 999px;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    color: rgba(0, 0, 0, 0.65);
    cursor: pointer;
    transition: all 0.15s ease;
}

.filter-pill:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.18);
}

.filter-pill:focus {
    outline: none;
    border-color: rgba(0, 0, 0, 0.25);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.04);
}

select.filter-pill {
    padding-right: 1.75rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 14px;
}

.filter-reset {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    background: none;
    border: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.15s ease;
    color: rgba(0, 0, 0, 0.4);
}
.filter-reset:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.2);
    color: rgba(0, 0, 0, 0.7);
}
.filter-reset svg {
    width: 14px;
    height: 14px;
}

/* ═══════════════════════════════════════════
   MODERN PAGER
   Compact Previous/Next pinned to bottom
   ═══════════════════════════════════════════ */

.pager-modern {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 0 0;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin-top: 0.75rem;
}

.pager-btn {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.8rem;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.65);
    cursor: pointer;
    transition: all 0.15s ease;
}

.pager-btn:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.2);
    color: #000;
}

.pager-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.pager-btn svg {
    width: 14px;
    height: 14px;
}

.pager-info {
    font-size: 0.78rem;
    color: rgba(0, 0, 0, 0.45);
    font-weight: 500;
}

/* ═══════════════════════════════════════════
   TABLE ACTION ICONS
   Inline icon buttons for view/edit/delete
   ═══════════════════════════════════════════ */

.workspace-name-link {
    color: rgba(0, 0, 0, 0.85);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.12s ease;
}

.workspace-name-link:hover {
    color: var(--color-brand-secondary, #3b82f6);
    text-decoration: underline;
}

.action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    transition: all 0.12s ease;
    text-decoration: none !important;
    color: rgba(0, 0, 0, 0.5);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.action-icon:hover {
    background: rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.8);
}

.action-icon svg {
    width: 16px;
    height: 16px;
}

.action-icon.action-view { color: var(--color-brand-secondary, #3b82f6); }
.action-icon.action-view:hover { background: rgba(59, 130, 246, 0.08); color: #2563eb; }

.action-icon.action-edit { color: #f59e0b; }
.action-icon.action-edit:hover { background: rgba(245, 158, 11, 0.08); color: #d97706; }

.action-icon.action-delete { color: #ef4444; }
.action-icon.action-delete:hover { background: rgba(239, 68, 68, 0.08); color: #dc2626; }

/* ═══════════════════════════════════════════
   LIST PAGE HEADER
   Title + action button alignment
   ═══════════════════════════════════════════ */

.list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.list-header .title-lg {
    margin: 0;
}

.btn-add {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.btn-add svg {
    width: 16px;
    height: 16px;
}

/* ===== Form Container (UI Audit Fix) ===== */
.form-container {
    max-width: 720px;
}

.form-container .form-group {
    margin-bottom: 1rem;
}

.form-container label {
    font-weight: 500;
    margin-bottom: 0.25rem;
    display: block;
}

.form-container .required-note {
    font-size: 0.8rem;
    color: var(--color-text-secondary, #6b7280);
    margin-bottom: 1rem;
}

.form-container .text-danger {
    font-weight: bold;
}

/* ===== Action Bar (UI Audit Fix) ===== */
.action-bar {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border, #e5e7eb);
}

.btn-cancel {
    background: transparent;
    border: 1px solid var(--color-border, #d1d5db);
    color: var(--color-text-secondary, #6b7280);
    padding: 0.375rem 1rem;
    border-radius: var(--radius-md, 6px);
    cursor: pointer;
    font-size: 0.875rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.btn-cancel:hover {
    background: var(--color-bg-subtle, #f3f4f6);
    color: var(--color-text-primary, #374151);
    text-decoration: none;
}

/* ===== Detail View Actions (UI Audit Fix) ===== */
.detail-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* ===== Empty State (UI Audit Fix) ===== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--color-text-secondary, #6b7280);
}

.empty-state h3 {
    color: var(--color-text-primary, #374151);
    margin-bottom: 0.5rem;
}

.empty-state p {
    margin-bottom: 1rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== Pager Enhancement (UI Audit Fix) ===== */
.pager-modern .pager-count {
    font-size: 0.8rem;
    color: var(--color-text-secondary, #6b7280);
    margin-left: 1rem;
}

/* ═══════════════════════════════════════════
   VOICE CHIP SELECTOR
   ═══════════════════════════════════════════ */

.voice-chip-selector {
    position: relative;
    display: inline-block;
    width: 100%;
}

.chip-trigger {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    min-height: 38px;
    width: 100%;
    padding: 4px 8px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s;
    text-align: left;
    font-size: 0.875rem;
}

.chip-trigger:hover:not(:disabled) {
    border-color: rgba(0, 0, 0, 0.3);
}

.chip-trigger:disabled {
    background: #f8f9fa;
    cursor: default;
    opacity: 0.8;
}

.chip-placeholder {
    color: #9ca3af;
}

.chip-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #1d4ed8;
    white-space: nowrap;
}

.chip-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 1050;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    max-height: 260px;
    display: flex;
    flex-direction: column;
}

.chip-dropdown-header {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.chip-dropdown-action {
    background: none;
    border: none;
    font-size: 0.75rem;
    font-weight: 600;
    color: #3b82f6;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
}

.chip-dropdown-action:hover {
    background: rgba(59, 130, 246, 0.1);
}

.chip-dropdown-list {
    overflow-y: auto;
    padding: 4px 0;
}

.chip-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.1s;
}

.chip-dropdown-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.chip-dropdown-item input[type="checkbox"] {
    accent-color: #3b82f6;
}

.chip-dropdown-empty {
    padding: 12px;
    text-align: center;
    color: #9ca3af;
    font-size: 0.8rem;
}

.voice-chip-selector.readonly .chip-tag {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
    color: #374151;
}

/* ═══════════════════════════════════════════
   STAGE PILLS
   ═══════════════════════════════════════════ */

.stage-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.stage-pill {
    padding: 6px 14px;
    border-radius: 20px;
    border: 2px solid transparent;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    background: #f3f4f6;
    color: #6b7280;
}

.stage-pill:disabled {
    cursor: default;
    opacity: 0.7;
}

/* Awareness - blue */
.stage-pill-a { border-color: rgba(59, 130, 246, 0.25); }
.stage-pill-a.sel { background: #3b82f6; color: #fff; border-color: #3b82f6; }
.stage-pill-a:hover:not(:disabled):not(.sel) { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }

/* Consideration - amber */
.stage-pill-c { border-color: rgba(245, 158, 11, 0.25); }
.stage-pill-c.sel { background: #f59e0b; color: #fff; border-color: #f59e0b; }
.stage-pill-c:hover:not(:disabled):not(.sel) { background: rgba(245, 158, 11, 0.1); color: #d97706; }

/* Decision - green */
.stage-pill-d { border-color: rgba(16, 185, 129, 0.25); }
.stage-pill-d.sel { background: #10b981; color: #fff; border-color: #10b981; }
.stage-pill-d:hover:not(:disabled):not(.sel) { background: rgba(16, 185, 129, 0.1); color: #059669; }

/* Retention - purple */
.stage-pill-r { border-color: rgba(139, 92, 246, 0.25); }
.stage-pill-r.sel { background: #8b5cf6; color: #fff; border-color: #8b5cf6; }
.stage-pill-r:hover:not(:disabled):not(.sel) { background: rgba(139, 92, 246, 0.1); color: #7c3aed; }

/* Compact pills */
.stage-pills.compact .stage-pill {
    padding: 2px 8px;
    font-size: 0.7rem;
    border-radius: 10px;
    border-width: 1px;
}

.stage-pills.readonly .stage-pill:not(.sel) {
    display: none;
}

/* ═══════════════════════════════════════════
   MEDIA STATS BAR
   ═══════════════════════════════════════════ */

.media-stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.media-stat-card {
    padding: 16px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.media-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.media-stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
    opacity: 0.7;
}

.stat-assets { background: rgba(52, 211, 153, 0.1); }
.stat-assets .media-stat-value { color: #059669; }
.stat-assets .media-stat-label { color: #065f46; }

.stat-media { background: rgba(129, 140, 248, 0.1); }
.stat-media .media-stat-value { color: #6366f1; }
.stat-media .media-stat-label { color: #3730a3; }

.stat-assigned { background: rgba(251, 191, 36, 0.1); }
.stat-assigned .media-stat-value { color: #d97706; }
.stat-assigned .media-stat-label { color: #92400e; }

.stat-coverage { background: rgba(96, 165, 250, 0.1); }
.stat-coverage .media-stat-value { color: #2563eb; }
.stat-coverage .media-stat-label { color: #1e40af; }

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

/* ═══════════════════════════════════════════
   TYPE BADGES (Asset types - GAS color match)
   ═══════════════════════════════════════════ */

.type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.type-badge-photo { background: rgba(236, 72, 153, 0.12); color: #be185d; }
.type-badge-video { background: rgba(139, 92, 246, 0.12); color: #6d28d9; }
.type-badge-audio { background: rgba(59, 130, 246, 0.12); color: #1d4ed8; }
.type-badge-copy { background: rgba(107, 114, 128, 0.12); color: #374151; }
.type-badge-caption { background: rgba(16, 185, 129, 0.12); color: #047857; }
.type-badge-illustration { background: rgba(245, 158, 11, 0.12); color: #b45309; }

/* ═══════════════════════════════════════════
   BULK OPERATIONS BAR
   ═══════════════════════════════════════════ */

.bulk-ops-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 8px;
    margin-bottom: 12px;
}

.bulk-ops-count {
    font-weight: 700;
    font-size: 0.85rem;
    color: #1d4ed8;
    white-space: nowrap;
}

.bulk-ops-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

/* ═══════════════════════════════════════════
   MEDIA WORKSPACE
   ═══════════════════════════════════════════ */

.media-tab-bar {
    display: flex;
    gap: 0;
    border-bottom: 2px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.media-tab {
    padding: 10px 20px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #6b7280;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s;
}

.media-tab:hover {
    color: #374151;
}

.media-tab.active {
    color: #000;
    border-bottom-color: #000;
}

.media-split-view {
    display: flex;
    gap: 20px;
    min-height: 500px;
}

.media-split-left {
    flex: 1;
    min-width: 0;
}

.media-split-right {
    width: 320px;
    flex-shrink: 0;
}

.create-pane {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    padding: 16px;
    position: sticky;
    top: 20px;
}

.create-pane-title {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

/* Media inventory — horizontal card strip */
.media-inventory {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.media-card {
    position: relative;
    background: #fff;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    padding: 12px 14px;
    width: 220px;
    cursor: pointer;
    transition: all 0.15s;
}

.media-card:hover {
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.media-card.active {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.04);
}

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

.media-card-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: #000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.media-card-badge {
    font-size: 0.65rem;
    font-weight: 600;
    color: #6b7280;
    white-space: nowrap;
}

.media-card-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.media-card-assets {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.media-card-asset-name {
    font-size: 0.7rem;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-card-asset-more {
    font-size: 0.65rem;
    color: #9ca3af;
    font-style: italic;
}

.media-card-remove {
    position: absolute;
    top: 6px;
    right: 8px;
    background: none;
    border: none;
    font-size: 1rem;
    color: #d1d5db;
    cursor: pointer;
    line-height: 1;
    padding: 0 2px;
}

.media-card-remove:hover {
    color: #ef4444;
}

/* Compose pane — selected asset list */
.compose-asset-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 140px;
    overflow-y: auto;
    padding: 6px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.compose-asset-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 4px;
    border-radius: 4px;
}

.compose-asset-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

.compose-asset-remove {
    background: none;
    border: none;
    color: #d1d5db;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    padding: 0;
}

.compose-asset-remove:hover {
    color: #ef4444;
}

.in-use-indicator {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    margin-left: 6px;
    vertical-align: middle;
}

@media (max-width: 768px) {
    .media-split-view {
        flex-direction: column;
    }
    .media-split-right {
        width: 100%;
    }
}

/* ============================================================================
   BU-240 — Shared empty-state design language. Used by Compose / Assets / Media
   pages so a brand-new workspace sees the same on-brand intro banner + the same
   "no data yet" voice + the same Traffic Orange #DD5100 CTA treatment across
   the three workbench-family pages. Hardcoded colors per SPA contrast rules.
============================================================================ */

.jgn-page-intro {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 20px;
    margin: 0 0 18px 0;
    background: linear-gradient(135deg, rgba(221, 81, 0, 0.06) 0%, rgba(221, 81, 0, 0.02) 100%);
    border: 1px solid rgba(221, 81, 0, 0.20);
    border-left: 3px solid #DD5100;
    border-radius: 8px;
    color: #1f2937;
}

.jgn-page-intro__icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #DD5100;
}

.jgn-page-intro__body { flex: 1 1 auto; min-width: 0; }

.jgn-page-intro__title {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
}

.jgn-page-intro__copy {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: #4b5563;
    line-height: 1.45;
}

.jgn-page-intro__copy strong { color: #1f2937; font-weight: 600; }

.jgn-page-intro__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.jgn-page-intro__dismiss {
    background: transparent;
    border: none;
    color: #6b7280;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.15s, background-color 0.15s;
}

.jgn-page-intro__dismiss:hover { color: #1f2937; background: rgba(0,0,0,0.04); }

.jgn-empty-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    color: #fff;
    background: #DD5100;
    border: 1px solid #DD5100;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
}

.jgn-empty-cta:hover {
    background: #b34000;
    border-color: #b34000;
    color: #fff;
    text-decoration: none;
}

.jgn-empty-cta--ghost {
    color: #DD5100;
    background: transparent;
}

.jgn-empty-cta--ghost:hover {
    background: rgba(221, 81, 0, 0.08);
    color: #DD5100;
}

/* On-brand empty state for the standalone Assets / Media pages and for the
   Deliverables panel in Compose. Card-like surface, generous padding, single
   primary CTA in Traffic Orange. */
.jgn-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 24px;
    background: #fff;
    border: 1px dashed rgba(221, 81, 0, 0.35);
    border-radius: 10px;
    text-align: center;
    color: #4b5563;
}

.jgn-empty-state__icon {
    color: #DD5100;
    opacity: 0.85;
}

.jgn-empty-state__title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.jgn-empty-state__copy {
    margin: 0;
    max-width: 480px;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

.jgn-empty-state__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

/* Inline engagement picker used in the Compose Deliverables empty state.
   Replaces the misleading "Pick an engagement chip above" copy with an
   actual <select> the user can interact with right here. */
.jgn-empty-engagement-select {
    margin-top: 4px;
    padding: 8px 32px 8px 12px;
    min-width: 280px;
    max-width: 360px;
    font-size: 13px;
    color: #1f2937;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23DD5100' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 9px 5px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: border-color 0.15s;
}

.jgn-empty-engagement-select:hover { border-color: #DD5100; }
.jgn-empty-engagement-select:focus-visible {
    outline: 2px solid rgba(221, 81, 0, 0.45);
    outline-offset: 2px;
    border-color: #DD5100;
}

/* ============================================================================
   BU-240 — On-brand filter card, matching the Compose Workbench vibe. Used by
   /assets and /media to replace the default Bootstrap `.card.card-body`
   chrome (which read as off-brand against /compose's flatter, more compact
   workbench panels). Hardcoded colors per SPA contrast rules. Cache-bust
   v=20260524bu240c.
============================================================================ */

.jgn-filters-card {
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px 16px;
    margin: 0 0 18px 0;
    box-shadow: none;
}

.jgn-filters-card .form-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 4px;
}

.jgn-filters-card .form-control,
.jgn-filters-card .form-select {
    font-size: 0.85rem;
    color: #1f2937;
    background-color: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.jgn-filters-card .form-control::placeholder { color: #9ca3af; }

.jgn-filters-card .form-control:focus,
.jgn-filters-card .form-select:focus {
    border-color: #DD5100;
    box-shadow: 0 0 0 2px rgba(221, 81, 0, 0.18);
    outline: none;
}

/* Re-style the form-select chevron to Traffic Orange so even the small
   bits match the SP-458 workspace dropdown + the Compose vibe. */
.jgn-filters-card .form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23DD5100' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 9px 5px;
    padding-right: 28px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Stage filter — fixed 4-segment quad, mirroring how MediaCard presents the
   always-four stages (compose-workbench.css:6287 .jgn-media-card__stages).
   Same soft per-stage color palette (cream/pale-blue/pale-green/pale-lavender)
   so a stage chip in the filter and a stage slot on a Media card share a
   visual vocabulary. Inactive = ghost (dashed outline), active = filled
   with the stage's soft color + letter + label.

   Layout: a CSS grid of exactly 4 columns, ALWAYS — no flex-wrap, no
   implied variable count, because stages are always Awareness +
   Consideration + Decision + Retention. */
.jgn-stage-quad {
    /* Each column is minimum 132px (enough to hold "Consideration" at 12px
       font + 16px letter + 5×10 padding without clipping), then shares any
       extra width equally via 1fr so all four cells render at EXACTLY the
       same width. Hardcoded min beats max-content here because max-content
       gives each cell its own natural width — Decision and Retention end up
       visibly narrower than Consideration, which breaks the always-four
       symmetry the layout is meant to express. */
    display: grid;
    grid-template-columns: repeat(4, minmax(132px, 1fr));
    gap: 6px;
    margin: 0;
    padding: 0;
    flex: 1 1 auto;
    min-width: 0;
}

.jgn-stage-quad__segment {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    color: #6b7280;
    background: transparent;
    border: 1px dashed #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.jgn-stage-quad__label {
    white-space: nowrap;
    flex: 1 1 auto;
    text-align: left;
}

.jgn-stage-quad__letter {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9.5px;
    font-weight: 600;
    line-height: 1;
    border-radius: 50%;
    border: 0.5px solid #d1d5db;
    background: #f9fafb;
    color: #6b7280;
}

.jgn-stage-quad__segment:hover {
    border-style: solid;
    border-color: #d1d5db;
    color: #1f2937;
}

/* Active states reuse the exact MediaCard stage palette so a filter chip
   and a MediaCard's stage slot share the same vocabulary. */
.jgn-stage-quad__segment.is-active {
    border-style: solid;
    font-weight: 600;
}

.jgn-stage-quad__segment.stage-awareness.is-active {
    background: #FDF6E9;
    border-color: #FAC775;
    color: #854F0B;
}
.jgn-stage-quad__segment.stage-awareness.is-active .jgn-stage-quad__letter {
    background: #FAC775;
    border-color: #FAC775;
    color: #854F0B;
}

.jgn-stage-quad__segment.stage-consideration.is-active {
    background: #F2F8FD;
    border-color: #B5D4F4;
    color: #0C447C;
}
.jgn-stage-quad__segment.stage-consideration.is-active .jgn-stage-quad__letter {
    background: #B5D4F4;
    border-color: #B5D4F4;
    color: #0C447C;
}

.jgn-stage-quad__segment.stage-decision.is-active {
    background: #F5FAEC;
    border-color: #C0DD97;
    color: #27500A;
}
.jgn-stage-quad__segment.stage-decision.is-active .jgn-stage-quad__letter {
    background: #C0DD97;
    border-color: #C0DD97;
    color: #27500A;
}

.jgn-stage-quad__segment.stage-retention.is-active {
    background: #EEEDFE;
    border-color: #CECBF6;
    color: #3C3489;
}
.jgn-stage-quad__segment.stage-retention.is-active .jgn-stage-quad__letter {
    background: #CECBF6;
    border-color: #CECBF6;
    color: #3C3489;
}

.jgn-stage-quad__segment:focus-visible {
    outline: 2px solid rgba(221, 81, 0, 0.45);
    outline-offset: 2px;
}

/* Legacy `.jgn-stage-chip` + `.jgn-scope-chip` — retained for callers that
   still pass these classes (notably MediaLibraryPage's editor + ProductionStacks).
   Same Compose engagement-tab vibe. */
.jgn-stage-chip,
.jgn-scope-chip {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #ffffff;
    color: #4b5563;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.jgn-stage-chip:hover,
.jgn-scope-chip:hover {
    background: #f3f4f6;
    color: #111827;
    border-color: #d1d5db;
}

.jgn-stage-chip.is-active,
.jgn-scope-chip.is-active {
    background: #fff7f0;
    color: #DD5100;
    border-color: #DD5100;
    font-weight: 600;
}

.jgn-stage-chip:focus-visible,
.jgn-scope-chip:focus-visible {
    outline: 2px solid rgba(221, 81, 0, 0.45);
    outline-offset: 2px;
}

/* Reset-filters button matches the SPA's quiet-but-discoverable pattern,
   not Bootstrap's accidental btn-link blue. */
.jgn-filters-reset {
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 500;
    color: #DD5100;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
}

.jgn-filters-reset:hover {
    background: rgba(221, 81, 0, 0.08);
    border-color: rgba(221, 81, 0, 0.2);
}

/* ============================================================================
   BU-240 (hardcore reformat 2026-05-24) — /assets filter toolbar.

   Replaces the Bootstrap col-md-N grid jumble with a deliberate 3-row layout:
     Row 1: full-width search input  (primary affordance)
     Row 2: dropdown filter triggers (Voice / Status / Scope) + trailing Reset
     Row 3: always-four stage quad   (the toggle-group row)
   Single cohesive toolbar, consistent control heights, no orphan globes,
   no orphan Reset link, no jumpy grid wrap.
============================================================================ */

.jgn-filters-card--asset-toolbar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px;
}

.jgn-filters-card__row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.jgn-filters-card__row--search {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
}

.jgn-filters-card__row--filters {
    flex-wrap: wrap;
}

.jgn-filters-card__row--stages {
    align-items: center;
    gap: 12px;
}

.jgn-filters-card__label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6b7280;
    margin: 0 0 4px 0;
}

.jgn-filters-card__label--inline {
    margin: 0;
    flex: 0 0 auto;
    align-self: center;
}

.jgn-filters-card__input {
    display: block;
    width: 100%;
    height: 36px;
    padding: 6px 12px;
    font-size: 13px;
    color: #1f2937;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.jgn-filters-card__input::placeholder { color: #9ca3af; }

.jgn-filters-card__input:focus {
    outline: none;
    border-color: #DD5100;
    box-shadow: 0 0 0 2px rgba(221, 81, 0, 0.18);
}

.jgn-filters-card__field {
    display: flex;
    flex-direction: column;
    flex: 1 1 200px;
    min-width: 180px;
    max-width: 280px;
}

.jgn-filters-card__field--scope {
    flex: 0 1 auto;
    min-width: 0;
    max-width: none;
}

.jgn-filters-card__trigger,
.jgn-filters-card__select {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 36px;
    padding: 6px 12px;
    font-size: 13px;
    color: #1f2937;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    text-align: left;
}

.jgn-filters-card__select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23DD5100' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 9px 5px;
    padding-right: 28px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.jgn-filters-card__trigger:hover,
.jgn-filters-card__select:hover { border-color: #9ca3af; }

.jgn-filters-card__trigger:focus-visible,
.jgn-filters-card__select:focus-visible,
.jgn-filters-card__select:focus {
    outline: none;
    border-color: #DD5100;
    box-shadow: 0 0 0 2px rgba(221, 81, 0, 0.18);
}

.jgn-filters-card__trigger-label {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jgn-filters-card__trigger-chevron {
    color: #DD5100;
    font-size: 12px;
    margin-left: 8px;
    flex: 0 0 auto;
}

/* ScopeSelector slot — give the embedded component a uniform 36px-tall
   cell so it visually aligns with the Voice trigger + Status select on
   the same row. The component renders its own globe-anchor; the host
   cell just provides the alignment chrome. */
.jgn-filters-card__scope-host {
    display: flex;
    align-items: center;
    min-height: 36px;
    padding: 4px 8px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}

.jgn-filters-card__scope-host:hover { border-color: #9ca3af; }
.jgn-filters-card__scope-host:focus-within {
    border-color: #DD5100;
    box-shadow: 0 0 0 2px rgba(221, 81, 0, 0.18);
}

/* Trailing Reset chip — pill, neutral by default, only renders when at
   least one filter is engaged. Right-aligned in the filters row via
   margin-left:auto. */
.jgn-filters-card__reset-chip {
    margin-left: auto;
    align-self: flex-end;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 500;
    color: #DD5100;
    background: #fff7f0;
    border: 1px solid #DD5100;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.jgn-filters-card__reset-chip:hover {
    background: #DD5100;
    color: #fff;
}

/* ─── Stage quad polish: kill the dashed-ghost look (was reading as
       "broken / disabled"); inactive is now a clean white pill with a
       solid neutral border. Active retains the MediaCard palette. ───── */
.jgn-stage-quad__segment {
    border-style: solid;
    border-color: #e5e7eb;
    background: #ffffff;
    color: #4b5563;
}

.jgn-stage-quad__segment:hover {
    border-color: #9ca3af;
    color: #1f2937;
    background: #fafafa;
}

/* BU-240: inline ✕ clear-scope affordance on the scope-host cell. Renders
   to the right of the ScopeSelector when a scope is engaged. Click is
   stopPropagation'd in markup so it doesn't also open the dropdown. */
.jgn-filters-card__scope-host {
    position: relative;
    gap: 4px;
    justify-content: space-between;
}

.jgn-filters-card__scope-clear {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-right: 2px;
    padding: 0;
    font-size: 12px;
    line-height: 1;
    color: #6b7280;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.jgn-filters-card__scope-clear:hover {
    background: #fff7f0;
    color: #DD5100;
    border-color: #DD5100;
}

.jgn-filters-card__scope-clear:focus-visible {
    outline: 2px solid rgba(221, 81, 0, 0.45);
    outline-offset: 2px;
}
