/* ============================================
   Nakayama AI and File Search Engine
   Main Stylesheet
   Primary Color: #c3102e
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
    --primary: #c3102e;
    --primary-dark: #a00d25;
    --primary-light: #e8435c;
    --primary-bg: rgba(195, 16, 46, 0.05);
    --primary-bg-hover: rgba(195, 16, 46, 0.1);

    --text-dark: #1a1a1a;
    --text-medium: #555;
    --text-light: #888;
    --text-white: #ffffff;

    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-gray: #f0f0f0;
    --bg-dark: #2d2d2d;

    --border-light: #e0e0e0;
    --border-medium: #ccc;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.15);

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 24px;
    --radius-full: 50%;

    --transition: all 0.2s ease;
    --font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;

    --navbar-height: 56px;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--text-dark);
    background: var(--bg-light);
    line-height: 1.5;
    overflow: hidden;
    height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

input, textarea, select, button {
    font-family: inherit;
    font-size: inherit;
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    overflow: auto;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 40px 36px;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    font-size: 48px;
    color: var(--primary);
}

.login-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
    line-height: 1.3;
}

.login-tagline {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 400;
}

/* Alert */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background: #fff2f2;
    color: #d32f2f;
    border: 1px solid #ffcdd2;
}

/* Form */
.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.login-form label i {
    color: var(--primary);
    width: 16px;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-light);
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(195, 16, 46, 0.1);
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 44px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    transition: var(--transition);
}

.toggle-password:hover {
    color: var(--primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: var(--text-white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(195, 16, 46, 0.3);
}

.btn-login {
    width: 100%;
    padding: 14px;
    font-size: 1.05rem;
    border-radius: var(--radius-md);
    margin-top: 8px;
}

/* Login Footer */
.login-footer {
    text-align: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.login-footer p {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Login Mode Toggle */
.login-mode-toggle {
    display: flex;
    background: var(--bg-gray);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: 24px;
    gap: 4px;
}

.mode-btn {
    flex: 1;
    padding: 10px 12px;
    border: none;
    background: transparent;
    color: var(--text-medium);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.mode-btn:hover {
    color: var(--primary);
}

.mode-btn.active {
    background: var(--primary);
    color: var(--text-white);
    box-shadow: var(--shadow-sm);
}

.mode-btn.active:hover {
    background: var(--primary-dark);
    color: var(--text-white);
}

/* ============================================
   TOP NAVIGATION BAR
   ============================================ */
.top-navbar {
    height: var(--navbar-height);
    background: var(--bg-white);
    border-bottom: 2px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: var(--shadow-sm);
    z-index: 100;
    position: relative;
}

.navbar-left {
    display: flex;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    font-size: 1.6rem;
    color: var(--primary);
}

.brand-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

.navbar-center {
    display: flex;
    align-items: center;
}

.navbar-tagline {
    font-size: 0.85rem;
    color: var(--text-light);
    font-style: italic;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-medium);
    font-size: 0.9rem;
}

.user-info i {
    font-size: 1.2rem;
    color: var(--primary);
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--primary);
    color: var(--text-white);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.btn-logout:hover {
    background: var(--primary-dark);
    text-decoration: none;
    color: var(--text-white);
}

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */
.dashboard-body {
    overflow: hidden;
}

.dashboard-container {
    display: flex;
    height: calc(100vh - var(--navbar-height));
    overflow: hidden;
}

/* Panels */
.panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-white);
}

.panel-left {
    width: 50%;
    min-width: 320px;
    border-right: 1px solid var(--border-light);
}

.panel-right {
    width: 50%;
    min-width: 320px;
    position: relative;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-light);
    flex-shrink: 0;
}

.panel-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-title i {
    font-size: 1.1rem;
}

.panel-actions {
    display: flex;
    gap: 6px;
}

.btn-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-light);
    background: var(--bg-white);
    color: var(--text-medium);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
}

.btn-icon:hover {
    background: var(--primary-bg);
    color: var(--primary);
    border-color: var(--primary);
}

/* Panel Divider */
.panel-divider {
    width: 6px;
    background: var(--border-light);
    cursor: col-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
    z-index: 10;
}

.panel-divider:hover,
.panel-divider.dragging {
    background: var(--primary);
}

.divider-handle {
    color: var(--text-light);
    font-size: 0.7rem;
}

.panel-divider:hover .divider-handle,
.panel-divider.dragging .divider-handle {
    color: var(--text-white);
}

/* ============================================
   AI CHAT PANEL (LEFT)
   ============================================ */

/* Chat Messages Area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    scroll-behavior: smooth;
}

.chat-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-medium);
}

.welcome-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 16px;
    opacity: 0.8;
}

.chat-welcome h3 {
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.chat-welcome p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 24px;
}

.suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.chip {
    padding: 8px 16px;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    color: var(--text-medium);
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.chip:hover {
    background: var(--primary-bg);
    border-color: var(--primary);
    color: var(--primary);
}

/* Message Bubbles */
.chat-message {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.chat-message.user .message-avatar {
    background: var(--primary);
    color: var(--text-white);
}

.chat-message.assistant .message-avatar {
    background: var(--bg-dark);
    color: var(--text-white);
}

.message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    line-height: 1.6;
    word-wrap: break-word;
}

.chat-message.user .message-content {
    background: var(--primary);
    color: var(--text-white);
    border-bottom-right-radius: var(--radius-sm);
}

.chat-message.assistant .message-content {
    background: var(--bg-light);
    color: var(--text-dark);
    border-bottom-left-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.message-content p {
    margin-bottom: 8px;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-content pre {
    background: #1e1e1e;
    color: #d4d4d4;
    border-radius: var(--radius-md);
    padding: 12px;
    overflow-x: auto;
    margin: 8px 0;
    font-size: 0.85rem;
}

.message-content code {
    font-family: 'Consolas', 'Courier New', monospace;
}

.message-content code:not(pre code) {
    background: rgba(0, 0, 0, 0.06);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.88em;
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 4px;
}

.chat-message.user .message-time {
    text-align: right;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 0;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--text-light);
    border-radius: var(--radius-full);
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-8px); opacity: 1; }
}

/* Chat Input Area */
.chat-input-area {
    padding: 16px 20px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-white);
    flex-shrink: 0;
}

.chat-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    background: var(--bg-light);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 8px 12px;
    transition: var(--transition);
}

.chat-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(195, 16, 46, 0.1);
    background: var(--bg-white);
}

#chatInput {
    flex: 1;
    border: none;
    background: transparent;
    resize: none;
    outline: none;
    font-size: 0.95rem;
    line-height: 1.5;
    max-height: 120px;
    min-height: 24px;
    padding: 4px 0;
}

.btn-send {
    width: 38px;
    height: 38px;
    border: none;
    background: var(--primary);
    color: var(--text-white);
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
    font-size: 0.9rem;
}

.btn-send:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.btn-send:disabled {
    background: var(--border-medium);
    cursor: not-allowed;
    transform: none;
}

.chat-input-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
}

.char-counter {
    font-size: 0.75rem;
    color: var(--text-light);
}

    .cinzel-decorative-black {
      font-family: "Cinzel Decorative", serif;
      font-weight: 900;
      font-style: normal;
    }
    
    .panel-right {
      position: relative !important;
    }
    
    .results-pagination {
      position: absolute !important;
      bottom: 0 !important;
      left: 50% !important;
      transform: translateX(-50%) !important;
      background: white !important;
      border-top: 1px solid #ddd !important;
      padding: 10px 20px !important;
      box-shadow: 0 -2px 10px rgba(0,0,0,0.1) !important;
      z-index: 100 !important;
      border-radius: 8px 8px 0 0 !important;
      width: auto !important;
    }
    
    .facet-list a {
      display: flex !important;
      justify-content: space-between !important;
      align-items: center !important;
      text-decoration: none !important;
      padding: 4px 8px !important;
      border-radius: 4px !important;
      color: #bf2030 !important;
    }
    
    .facet-list a:hover {
      background-color: #f0f0f0 !important;
    }
    
    .facet-count {
      background-color: #e0e0e0 !important;
      color: #333 !important;
      padding: 2px 6px !important;
      border-radius: 10px !important;
      font-size: 0.8em !important;
      margin-left: auto !important;
    }
    
    .search-sidebar {
      position: absolute !important;
      top: 50% !important;
      right: 10px !important;
      transform: translateY(-50%) !important;
      background: white !important;
      border: 1px solid #ddd !important;
      padding: 15px !important;
      box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
      z-index: 200 !important;
      border-radius: 8px !important;
      width: 250px !important;
      max-height: 400px !important;
      overflow-y: auto !important;
    }
    
    .sidebar-header {
      display: flex !important;
      justify-content: space-between !important;
      align-items: center !important;
      margin-bottom: 10px !important;
      padding-bottom: 8px !important;
      border-bottom: 1px solid #eee !important;
    }
    
    .sidebar-title {
      font-weight: bold !important;
      color: #333 !important;
      margin: 0 !important;
    }
    
    .btn-close-sidebar {
      background: none !important;
      border: none !important;
      font-size: 16px !important;
      cursor: pointer !important;
      color: #666 !important;
      padding: 2px !important;
    }
    
    .btn-close-sidebar:hover {
      color: #c3102e !important;
    }
    
    #searchSettingsBtn.active {
      background-color: #c3102e !important;
      color: white !important;
    }
    
    .results-summary {
      flex-direction: column !important;
      gap: 10px !important;
    }
    
    .results-main-info {
      display: flex !important;
      justify-content: space-between !important;
      align-items: center !important;
    }
    
    .filter-status {
      padding: 8px 12px !important;
      background-color: #f8f9fa !important;
      border: 1px solid #dee2e6 !important;
      border-radius: 6px !important;
      margin-top: 5px !important;
    }
    
    .active-filter {
      display: flex !important;
      align-items: center !important;
      gap: 8px !important;
      font-size: 14px !important;
      color: #495057 !important;
    }
    
    .filter-text {
      margin-right: auto !important;
    }
    
    .btn-clear-filter {
      background-color: #dc3545 !important;
      color: white !important;
      border: none !important;
      padding: 4px 8px !important;
      border-radius: 4px !important;
      font-size: 12px !important;
      cursor: pointer !important;
      display: flex !important;
      align-items: center !important;
      gap: 4px !important;
    }
    
    .btn-clear-filter:hover {
      background-color: #c82333 !important;
    }
    
    .facet-list a.active-filter {
      background-color: #c3102e !important;
      color: white !important;
    }
    
    .facet-list a.active-filter .facet-count {
      background-color: rgba(255,255,255,0.2) !important;
      color: white !important;
    }
    
    .filter-control {
      padding: 8px 0 !important;
    }
    
    .filter-select {
      width: 100% !important;
      padding: 6px 10px !important;
      border: 1px solid #ddd !important;
      border-radius: 4px !important;
      font-size: 14px !important;
      background-color: white !important;
    }
/* ============================================
   SEARCH ENGINE PANEL (RIGHT)
   ============================================ */

/* Search Area */
.search-area {
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 20px;
    padding-bottom: 2px;
    flex-shrink: 0;
}

.search-logo-section {
    text-align: center;
    padding: 40px 0 30px;
    transition: all 0.3s ease;
}

.search-logo-section.compact {
    padding: 10px 0;
}

.search-logo {
    display: inline-block;
}

.logo-text {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -1px;
    display: block;
}

.search-logo-section.compact .logo-text {
    font-size: 1.6rem;
}

.logo-char {
    display: inline-block;
    transition: var(--transition);
}

.logo-char:hover {
    transform: translateY(-3px);
}

.logo-subtitle {
    display: block;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 4px;
    font-weight: 400;
}

.search-logo-section.compact .logo-subtitle {
    display: none;
}

/* Search Box */
.search-box-container {
    max-width: 600px;
    margin: 0 auto;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-white);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 5px 18px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.search-box:hover {
    box-shadow: var(--shadow-md);
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(195, 16, 46, 0.1);
}

.search-icon {
    color: var(--text-light);
    font-size: 1rem;
    margin-right: 12px;
}

#searchInput {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    background: transparent;
    color: var(--text-dark);
}

#searchInput::placeholder {
    color: var(--text-light);
}

.btn-clear-search {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px 8px;
    transition: var(--transition);
}

.btn-clear-search:hover {
    color: var(--primary);
}

.search-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

.btn-search {
    position: relative;
    right: -12px;
    padding: 10px 24px;
    background: var(--primary);
    color: var(--text-white);
    border: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-search:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(195, 16, 46, 0.3);
}

/* Search Filters */
.search-filters {
    max-width: 600px;
    margin: 12px auto 0;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 8px 0;
    border-top: 1px solid var(--border-light);
}

.filter-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-medium);
}

.filter-select {
    padding: 4px 8px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-medium);
    background: var(--bg-white);
    cursor: pointer;
    outline: none;
}

.filter-select:focus {
    border-color: var(--primary);
}

/* Search Results Area */
.search-results-area {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px 20px;
}

.results-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: var(--text-medium);
}

.results-info {
    font-weight: 600;
}

.results-time {
    color: var(--text-light);
}

/* Result Item */
.result-item {
    margin-bottom: 2px;
    padding-bottom: 5px;
    border-bottom: 1px solid #f0f0f0;
    animation: fadeIn 0.3s ease;
}

.result-item:last-child {
    border-bottom: none;
}

.result-title {
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.result-title a {
    /* color: #1a0dab; */
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.result-title a:hover {
    text-decoration: none;
    cursor: pointer;
}

.result-url {
    font-size: 0.82rem;
    color: #006621;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    word-break: break-all;
}

.result-url i {
    font-size: 0.7rem;
    opacity: 0.7;
}

.result-snippet {
    font-size: 1.1rem;
    color: var(--text-medium);
    line-height: 1.6;
}

.result-snippet em,
.result-snippet b {
    color: var(--text-dark);
    font-weight: 600;
    font-style: normal;
}

.result-meta {
    margin-top: 6px;
    font-size: 0.78rem;
    color: var(--text-light);
    display: flex;
    gap: 16px;
}

.result-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.no-results i {
    font-size: 3rem;
    color: var(--border-medium);
    margin-bottom: 16px;
    display: block;
}

.no-results h3 {
    font-size: 1.2rem;
    color: var(--text-medium);
    margin-bottom: 8px;
}

/* Pagination */
.results-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 0;
    margin-top: 10px;
    border-top: 1px solid var(--border-light);
}

.btn-page {
    padding: 8px 16px;
    border: 1px solid var(--border-light);
    background: var(--bg-white);
    color: var(--primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-page:hover:not(:disabled) {
    background: var(--primary-bg);
    border-color: var(--primary);
}

.btn-page:disabled {
    color: var(--text-light);
    cursor: not-allowed;
    opacity: 0.5;
}

.page-numbers {
    display: flex;
    gap: 4px;
}

.page-num {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    background: transparent;
    color: var(--primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
}

.page-num:hover {
    background: var(--primary-bg);
}

.page-num.active {
    background: var(--primary);
    color: var(--text-white);
    cursor: default;
}

/* Search Sidebar (Facets) */
.search-sidebar {
    position: absolute;
    right: 0;
    top: 50px;
    width: 220px;
    padding: 12px 16px;
    background: var(--bg-white);
    border-left: 1px solid var(--border-light);
    height: calc(100% - 50px);
    overflow-y: auto;
}

.facet-group {
    margin-bottom: 20px;
}

.facet-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--border-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.facet-list {
    list-style: none;
}

.facet-list li {
    margin-bottom: 4px;
}

.facet-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 0.85rem;
    color: var(--primary);
    text-decoration: none;
}

.facet-list a:hover {
    text-decoration: underline;
}

.facet-count {
    background: var(--primary);
    color: var(--text-white);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: var(--radius-xl);
    font-weight: 600;
    min-width: 22px;
    text-align: center;
}

/* ============================================
   LOADING / SPINNER
   ============================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-light);
    border-top-color: var(--primary);
    border-radius: var(--radius-full);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Inline spinner (for chat) */
.spinner-inline {
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-light);
    border-top-color: var(--primary);
    border-radius: var(--radius-full);
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

/* ============================================
   SCROLLBAR STYLES
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

.cinzel-decorative-black {
    font-family: "Cinzel Decorative", serif;
    font-weight: 400;
    font-style: normal;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .dashboard-container {
        flex-direction: column;
    }

    .panel-left,
    .panel-right {
        width: 100%;
        min-width: auto;
        height: 50%;
    }

    .panel-divider {
        width: 100%;
        height: 6px;
        cursor: row-resize;
    }

    .divider-handle {
        transform: rotate(90deg);
    }

    .navbar-center {
        display: none;
    }

    .brand-name {
        font-size: 0.9rem;
    }

    .search-sidebar {
        display: none;
    }

    .logo-text {
        font-size: 2rem;
    }
}

@media (max-width: 600px) {
    .navbar-right .username {
        display: none;
    }

    .suggestion-chips {
        flex-direction: column;
        align-items: center;
    }
}
