/* ============================================================
   JurisAI — Professional Legal Research UI
   Color Palette: Navy (#1a2744), Gold (#c9a84c), Slate, White
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --navy: #1a2744;
    --navy-light: #243352;
    --navy-dark: #111b30;
    --gold: #c9a84c;
    --gold-light: #dfc06e;
    --gold-dark: #a88a3a;
    --slate: #64748b;
    --slate-light: #94a3b8;
    --slate-lighter: #cbd5e1;
    --bg: #f8f9fb;
    --bg-card: #ffffff;
    --text: #1e293b;
    --text-light: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --success: #059669;
    --danger: #dc2626;
    --warning: #d97706;
    --info: #2563eb;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --transition: all 0.2s ease;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    line-height: 1.3;
}

a { color: var(--gold-dark); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold); }

/* ============================================================
   AUTH PAGES (Login / Register)
   ============================================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    background: var(--navy-dark);
}

.auth-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 3rem 3rem 2rem;
    color: white;
    position: relative;
    overflow: hidden;
    background: url('/images/jurisAI.jpg') center center / cover no-repeat;
}

.auth-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        160deg,
        rgba(17, 27, 48, 0.55) 0%,
        rgba(26, 39, 68, 0.40) 40%,
        rgba(26, 39, 68, 0.20) 100%
    );
    z-index: 0;
}

.auth-left::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(to top, rgba(17, 27, 48, 0.50), transparent);
    z-index: 0;
}

.auth-brand {
    text-align: center;
    z-index: 1;
    margin-bottom: 0.5rem;
}

.auth-brand h1 {
    font-size: 3.5rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
    letter-spacing: 3px;
    text-shadow: 0 2px 20px rgba(201, 168, 76, 0.3);
}

.auth-brand h1 .brand-ai,
.sidebar-brand h1 .brand-ai {
    color: var(--gold) !important;
}

.auth-brand .tagline {
    font-size: 2rem;
    color: var(--gold);
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(201, 168, 76, 0.5), 0 2px 10px rgba(201, 168, 76, 0.3);
}

.auth-brand .tagline-sub {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
    margin-bottom: 2.5rem;
    letter-spacing: 0.5px;
}

.auth-features {
    list-style: none;
    z-index: 1;
    max-width: 700px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
}

.auth-features li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.88rem;
    line-height: 1.5;
}

.auth-features li .icon {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: rgba(201, 168, 76, 0.2);
    border: 1px solid rgba(201, 168, 76, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--gold-light);
    font-size: 1.1rem;
}

.auth-right {
    width: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: white;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 1;
}

.auth-form-container {
    width: 100%;
    max-width: 380px;
}

.auth-form-container h2 {
    font-size: 1.75rem;
    color: var(--navy);
    margin-bottom: 0.25rem;
}

.auth-form-container .subtitle {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text);
    background: white;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group .error-text {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 0.3rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

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

.btn-primary {
    background: var(--gold);
    color: var(--navy-dark);
}
.btn-primary:hover:not(:disabled) {
    background: var(--gold-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-navy {
    background: var(--navy);
    color: white;
}
.btn-navy:hover:not(:disabled) {
    background: var(--navy-light);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text);
}
.btn-outline:hover:not(:disabled) {
    border-color: var(--gold);
    color: var(--gold-dark);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-sm { padding: 0.45rem 1rem; font-size: 0.85rem; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ============================================================
   APP LAYOUT (Sidebar + Main)
   ============================================================ */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--navy);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-brand {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-brand h1 {
    font-size: 1.5rem;
    color: #ffffff;
    letter-spacing: 1px;
    text-shadow: 0 2px 20px rgba(201, 168, 76, 0.3);
}

.sidebar-brand span {
    font-size: 0.75rem;
    color: var(--slate-light);
    font-weight: 300;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.sidebar-nav .nav-section {
    padding: 0.5rem 1.25rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--slate);
    font-weight: 600;
    margin-top: 0.75rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.65rem 1.25rem;
    color: var(--slate-lighter);
    font-size: 0.9rem;
    font-weight: 400;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
    background: rgba(255,255,255,0.05);
    color: white;
}

.sidebar-nav a.active {
    background: rgba(201, 168, 76, 0.1);
    color: var(--gold);
    border-left-color: var(--gold);
    font-weight: 500;
}

.sidebar-nav a .nav-icon {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

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

.sidebar-user .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--navy-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.sidebar-user .user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user .user-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user .user-plan {
    font-size: 0.7rem;
    color: var(--slate-light);
}

.main-content {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
}

.page-header {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.page-header h2 {
    font-size: 1.35rem;
    color: var(--navy);
}

.page-header .breadcrumb {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.page-body {
    padding: 2rem;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

.card-header h3 {
    font-size: 1.05rem;
    color: var(--navy);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--bg);
}

/* ============================================================
   STAT CARDS (Dashboard)
   ============================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    box-shadow: var(--shadow);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stat-card .stat-icon.gold { background: rgba(201,168,76,0.12); color: var(--gold-dark); }
.stat-card .stat-icon.navy { background: rgba(26,39,68,0.08); color: var(--navy); }
.stat-card .stat-icon.green { background: rgba(5,150,105,0.1); color: var(--success); }
.stat-card .stat-icon.blue { background: rgba(37,99,235,0.1); color: var(--info); }

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* ============================================================
   RESEARCH RESULTS
   ============================================================ */
.research-input-card {
    border-left: 4px solid var(--gold);
}

.result-section {
    margin-bottom: 1.5rem;
}

.result-section h3 {
    font-size: 1.1rem;
    color: var(--navy);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.case-result {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    transition: var(--transition);
}

.case-result:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-md);
}

.case-result .case-title {
    font-weight: 600;
    color: var(--navy);
    font-size: 0.95rem;
}

.case-result .case-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.case-result .case-summary {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.5rem;
    line-height: 1.5;
}

.relevance-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.relevance-high { background: rgba(5,150,105,0.1); color: var(--success); }
.relevance-medium { background: rgba(217,119,6,0.1); color: var(--warning); }
.relevance-low { background: rgba(100,116,139,0.1); color: var(--slate); }

.argument-card {
    border-left: 3px solid var(--gold);
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    background: rgba(201,168,76,0.03);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.argument-card.counter {
    border-left-color: var(--danger);
    background: rgba(220,38,38,0.02);
}

.argument-card h4 {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 0.4rem;
}

.argument-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* ============================================================
   SEARCH
   ============================================================ */
.search-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.search-bar input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}

.search-filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.search-filters select {
    padding: 0.5rem 0.75rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-family: inherit;
    background: white;
}

/* ============================================================
   TABLES
   ============================================================ */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
}

table td {
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

table tr:hover td {
    background: rgba(201,168,76,0.03);
}

/* ============================================================
   BADGES & TAGS
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-gold { background: rgba(201,168,76,0.15); color: var(--gold-dark); }
.badge-green { background: rgba(5,150,105,0.1); color: var(--success); }
.badge-red { background: rgba(220,38,38,0.1); color: var(--danger); }
.badge-blue { background: rgba(37,99,235,0.1); color: var(--info); }
.badge-gray { background: rgba(100,116,139,0.1); color: var(--slate); }

/* ============================================================
   ALERTS & TOASTS
   ============================================================ */
.alert {
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert-success { background: rgba(5,150,105,0.08); border: 1px solid rgba(5,150,105,0.2); color: var(--success); }
.alert-danger { background: rgba(220,38,38,0.06); border: 1px solid rgba(220,38,38,0.15); color: var(--danger); }
.alert-warning { background: rgba(217,119,6,0.08); border: 1px solid rgba(217,119,6,0.2); color: var(--warning); }
.alert-info { background: rgba(37,99,235,0.06); border: 1px solid rgba(37,99,235,0.15); color: var(--info); }

.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius);
    background: var(--navy);
    color: white;
    font-size: 0.9rem;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    max-width: 400px;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ============================================================
   LOADING / SPINNER
   ============================================================ */
.spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid var(--border);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}

.spinner-lg { width: 40px; height: 40px; border-width: 3px; }

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

.loading-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-muted);
    gap: 1rem;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.9rem;
    max-width: 400px;
    margin: 0 auto 1.5rem;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: var(--transition);
}

.modal-backdrop.active .modal {
    transform: translateY(0);
}

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

.modal-header h3 { font-size: 1.1rem; color: var(--navy); }

.modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
}

.modal-body { padding: 1.5rem; }
.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* Mobile hamburger toggle */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 200;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: var(--radius);
    background: var(--navy);
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: var(--transition);
}
.mobile-menu-btn:hover {
    background: var(--navy-light);
}
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.sidebar-overlay.visible {
    display: block;
    opacity: 1;
}
.sidebar-close-btn {
    display: none;
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.sidebar-close-btn:hover {
    background: rgba(255,255,255,0.2);
}

@media (max-width: 1024px) {
    .mobile-menu-btn { display: flex; }
    .sidebar-close-btn { display: flex; }
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .page-header { padding-left: 3.2rem; }
    .auth-left { display: none; }
    .auth-right {
        width: 100%;
        background: linear-gradient(160deg, rgba(17,27,48,0.92), rgba(26,39,68,0.85)),
                    url('/images/jurisAI.jpg') center center / cover no-repeat;
    }
    .auth-right .auth-form-container {
        background: rgba(255, 255, 255, 0.97);
        padding: 2rem;
        border-radius: 16px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    }
    .auth-right .auth-form-container h2 { color: var(--navy); }
    .auth-right .auth-form-container .subtitle { color: var(--slate); }
}

@media (max-width: 640px) {
    .form-row { grid-template-columns: 1fr; }
    .page-body { padding: 1rem; }
    .search-bar { flex-direction: column; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   DISCLAIMER BANNER
   ============================================================ */
.disclaimer-banner {
    background: linear-gradient(135deg, #fef3cd 0%, #fff8e1 100%);
    border: 1px solid #f0d462;
    border-left: 5px solid var(--gold);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.disclaimer-banner .disclaimer-icon {
    position: absolute;
    top: 1rem;
    left: 1.25rem;
    font-size: 1.5rem;
    opacity: 0.7;
}

.disclaimer-banner .disclaimer-content {
    padding-left: 2.25rem;
}

.disclaimer-banner .disclaimer-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.4rem;
}

.disclaimer-banner .disclaimer-text {
    font-size: 0.82rem;
    line-height: 1.65;
    color: #5a4e1e;
}

.disclaimer-banner .disclaimer-text strong {
    color: var(--navy);
}

/* ============================================================
   CONFIDENCE / RELEVANCE PROGRESS BARS
   ============================================================ */
.confidence-bar-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 0.5rem;
}

.confidence-bar {
    flex: 1;
    max-width: 180px;
    height: 8px;
    background: #e8ecf1;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.confidence-bar .confidence-fill {
    height: 100%;
    border-radius: 20px;
    transition: width 0.6s ease;
}

.confidence-fill.high { background: linear-gradient(90deg, #059669, #34d399); }
.confidence-fill.medium { background: linear-gradient(90deg, #d97706, #fbbf24); }
.confidence-fill.low { background: linear-gradient(90deg, #94a3b8, #cbd5e1); }

.confidence-label {
    font-size: 0.8rem;
    font-weight: 700;
    min-width: 42px;
}

.confidence-label.high { color: var(--success); }
.confidence-label.medium { color: var(--warning); }
.confidence-label.low { color: var(--slate); }

.confidence-tag {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.confidence-tag.high { background: rgba(5,150,105,0.1); color: var(--success); }
.confidence-tag.medium { background: rgba(217,119,6,0.1); color: var(--warning); }
.confidence-tag.low { background: rgba(100,116,139,0.1); color: var(--slate); }

/* ============================================================
   SC E-LIBRARY VERIFICATION LINKS
   ============================================================ */
.gr-link {
    color: var(--info);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dashed var(--info);
    transition: var(--transition);
    white-space: nowrap;
}

.gr-link:hover {
    color: var(--navy);
    border-bottom-color: var(--navy);
    border-bottom-style: solid;
}

.gr-link .verify-icon {
    font-size: 0.75rem;
    margin-left: 2px;
    opacity: 0.7;
}

.verify-note {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--info);
    margin-left: 6px;
    opacity: 0.8;
}

/* ============================================================
   UTILITY
   ============================================================ */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-gold { color: var(--gold); }
.text-navy { color: var(--navy); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.gap-1 { gap: 0.5rem; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* ============================================================
   PRODUCT TOUR / ONBOARDING
   ============================================================ */
.tour-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    animation: fadeIn 0.2s ease-out;
}

.tour-tooltip {
    position: fixed;
    z-index: 9999;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
    color: #fff;
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 0 3px var(--gold);
    max-width: 320px;
    min-width: 280px;
    animation: tourPop 0.3s ease-out;
}

.tour-tooltip::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border: 10px solid transparent;
    border-bottom-color: var(--navy);
    border-top: none;
}

.tour-tooltip.tour-above::before {
    top: auto;
    bottom: -10px;
    border-bottom: none;
    border-top-color: var(--navy-dark);
}

.tour-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tour-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
}

.tour-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.tour-progress {
    font-size: 0.8rem;
    color: var(--gold);
    font-weight: 600;
}

.tour-buttons {
    display: flex;
    gap: 0.5rem;
}

.tour-skip {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.7);
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.tour-skip:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.tour-next {
    background: var(--gold);
    border: none;
    color: var(--navy-dark);
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.tour-next:hover {
    background: var(--gold-light);
    transform: translateY(-1px);
}

.tour-highlight {
    position: relative;
    z-index: 9999 !important;
    box-shadow: 0 0 0 4px var(--gold), 0 0 20px rgba(201, 168, 76, 0.5) !important;
    border-radius: 8px;
    animation: tourPulse 2s infinite;
}

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

@keyframes tourPulse {
    0%, 100% { box-shadow: 0 0 0 4px var(--gold), 0 0 20px rgba(201, 168, 76, 0.5); }
    50% { box-shadow: 0 0 0 6px var(--gold), 0 0 30px rgba(201, 168, 76, 0.7); }
}

/* ── Quick Command Panel ────────────────────────────────────────── */
#quickCommandPanel {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 420px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 120px);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0,0,0,0.2), 0 0 0 1px rgba(0,0,0,0.05);
    z-index: 10001;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: commandSlideUp 0.25s ease;
}

#quickCommandPanel.open { display: flex; }

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

.qc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    background: var(--navy);
    color: white;
}

.qc-header h4 {
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qc-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.15s;
    line-height: 1;
}

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

.qc-body {
    padding: 1rem;
    max-height: 450px;
    overflow-y: auto;
    flex: 1;
}

.qc-response {
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--text);
}

.qc-response:empty::before {
    content: 'Ask me anything about Philippine law...';
    color: var(--text-muted);
    font-style: italic;
}

.qc-response .loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
}

.qc-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.qc-footer textarea {
    flex: 1;
    padding: 0.6rem 0.9rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: inherit;
    resize: none;
    transition: border-color 0.15s;
    min-height: 50px;
}

.qc-footer textarea:focus {
    outline: none;
    border-color: var(--gold);
}

.qc-guidance {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.qc-actions {
    margin-top: 0.75rem;
}

.qc-action-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--gold);
    color: var(--navy-dark);
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.15s;
}

.qc-action-btn:hover {
    background: var(--gold-light);
    transform: translateY(-1px);
}

.qc-secondary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.qc-secondary-link {
    padding: 0.35rem 0.75rem;
    background: rgba(26, 39, 68, 0.06);
    color: var(--navy);
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.8rem;
    transition: all 0.15s;
}

.qc-secondary-link:hover {
    background: var(--navy);
    color: white;
}

.qc-footer button {
    padding: 0.6rem 1rem;
    background: var(--gold);
    color: var(--navy-dark);
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.qc-footer button:hover { background: var(--gold-light); }
.qc-footer button:disabled { opacity: 0.5; cursor: not-allowed; }

.qc-shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.qc-shortcut {
    padding: 0.3rem 0.7rem;
    background: rgba(201, 168, 76, 0.1);
    border: 1px solid rgba(201, 168, 76, 0.3);
    border-radius: 20px;
    font-size: 0.78rem;
    color: var(--navy);
    cursor: pointer;
    transition: all 0.15s;
}

.qc-shortcut:hover {
    background: var(--gold);
    color: white;
    border-color: var(--gold);
}
