/* ==========================================================================
   BANPUNOI AI TEACHER ASSISTANT - Modern CSS Design System
   School: โรงเรียนบ้านพุน้อย
   ========================================================================== */

:root {
  /* Color Palette - Light Theme */
  --bg-primary: #f1f5f9;
  --bg-secondary: #ffffff;
  --bg-sidebar: #0f172a;
  --bg-sidebar-active: #1e293b;
  --bg-card: #ffffff;
  --bg-card-header: #f8fafc;
  --bg-hover: #f8fafc;
  
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-inverse: #ffffff;
  --border-color: #e2e8f0;
  
  /* Brand & Accent Colors */
  --primary: #1d4ed8;       /* Royal Blue */
  --primary-hover: #1e40af;
  --primary-light: #dbeafe;
  
  --secondary: #059669;     /* Emerald Green */
  --secondary-light: #d1fae5;
  
  --amber: #d97706;         /* Warm Gold/Amber */
  --amber-light: #fef3c7;
  
  --purple: #7c3aed;        /* Violet/Purple */
  --purple-light: #ede9fe;
  
  --indigo: #4f46e5;
  --indigo-light: #e0e7ff;
  
  --rose: #e11d48;
  --rose-light: #ffe4e6;
  
  --cyan: #0891b2;
  --cyan-light: #cffafe;
  
  --teal: #0d9488;
  --teal-light: #ccfbf1;
  
  --orange: #ea580c;
  --orange-light: #ffedd5;

  /* Geometry & Effects */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font-heading: 'Prompt', -apple-system, sans-serif;
  --font-body: 'Prompt', -apple-system, sans-serif;
  --font-doc: 'Sarabun', 'TH Sarabun PSK', sans-serif;
}

/* Dark Theme Variables */
body.dark-theme {
  --bg-primary: #090d16;
  --bg-secondary: #131b2e;
  --bg-sidebar: #090d16;
  --bg-sidebar-active: #172036;
  --bg-card: #131b2e;
  --bg-card-header: #1a243d;
  --bg-hover: #1e2a47;
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --border-color: #24304f;
  
  --primary-light: rgba(29, 78, 216, 0.25);
  --secondary-light: rgba(5, 150, 105, 0.25);
  --amber-light: rgba(217, 119, 6, 0.25);
  --purple-light: rgba(124, 58, 237, 0.25);
  --indigo-light: rgba(79, 70, 229, 0.25);
  --rose-light: rgba(225, 29, 72, 0.25);
  --cyan-light: rgba(8, 145, 178, 0.25);
  --teal-light: rgba(13, 148, 136, 0.25);
  --orange-light: rgba(234, 88, 12, 0.25);
}

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

html, body {
  height: 100%;
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Layout App Container */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
  width: 280px;
  background-color: var(--bg-sidebar);
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: transform 0.3s ease;
  box-shadow: 4px 0 15px rgba(0,0,0,0.15);
}

.sidebar-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.logo-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.4);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.school-name {
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
  color: #ffffff;
}

.platform-title {
  font-size: 0.75rem;
  color: var(--amber);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.mobile-close-btn {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
}

.user-profile-card {
  margin: 1rem 1.25rem 0.5rem;
  padding: 0.85rem 1rem;
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border: 1px solid rgba(255,255,255,0.08);
}

.avatar {
  width: 38px;
  height: 38px;
  background: var(--amber);
  color: #0f172a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: bold;
}

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

.user-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: #ffffff;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.user-role {
  font-size: 0.75rem;
}

/* Sidebar Navigation */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1rem;
}

.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
}

.nav-section-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #64748b;
  margin: 1rem 0.75rem 0.35rem;
  font-weight: 700;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 0.9rem;
  color: #94a3b8;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 0.2rem;
  transition: var(--transition);
}

.nav-item:hover {
  color: #ffffff;
  background-color: var(--bg-sidebar-active);
  transform: translateX(3px);
}

.nav-item.active {
  color: #ffffff;
  background: linear-gradient(90deg, var(--primary), #2563eb);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

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

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

.ai-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: #94a3b8;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.status-dot.online {
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
}

/* Main Content Area */
.main-wrapper {
  flex: 1;
  margin-left: 280px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}

/* Topbar Header */
.topbar {
  height: 70px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hamburger-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-main);
  cursor: pointer;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.bc-school {
  color: var(--primary);
  font-weight: 600;
}

.bc-divider {
  color: var(--text-light);
}

.bc-current {
  color: var(--text-main);
  font-weight: 700;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.curriculum-badge {
  background: var(--amber-light);
  color: var(--amber);
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.theme-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  background-color: var(--border-color);
  transform: rotate(15deg);
}

/* Page Views Body */
.content-body {
  padding: 2rem;
  flex: 1;
}

.view-page {
  display: none;
  animation: fadeIn 0.3s ease;
}

.view-page.active {
  display: block;
}

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

.page-header {
  margin-bottom: 1.75rem;
}

.page-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

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

/* Welcome Banner */
.welcome-banner {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #6d28d9 100%);
  color: white;
  padding: 2.25rem;
  border-radius: var(--radius-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  box-shadow: 0 10px 25px rgba(30, 64, 175, 0.25);
  position: relative;
  overflow: hidden;
}

.banner-content h2 {
  font-size: 1rem;
  opacity: 0.9;
  font-weight: 500;
}

.banner-content h1 {
  font-size: 1.85rem;
  font-weight: 700;
  margin: 0.2rem 0 0.5rem;
}

.banner-content p {
  font-size: 0.95rem;
  opacity: 0.9;
  max-width: 600px;
  margin-bottom: 1.25rem;
}

.banner-actions {
  display: flex;
  gap: 0.75rem;
}

.banner-graphic {
  font-size: 7rem;
  opacity: 0.18;
  position: absolute;
  right: 2rem;
  bottom: -1rem;
  pointer-events: none;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 1.1rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.stat-card.border-blue { border-left: 4px solid var(--primary); }
.stat-card.border-green { border-left: 4px solid var(--secondary); }
.stat-card.border-amber { border-left: 4px solid var(--amber); }
.stat-card.border-purple { border-left: 4px solid var(--purple); }

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

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

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
}

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

/* Tools Grid */
.section-header {
  margin-bottom: 1rem;
}

.section-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

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

.tool-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.tool-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 0.85rem;
}

.tool-card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;

}

.tool-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  flex: 1;
}

.tool-btn {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Common Layout Grids */
.grid-2col {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 1.5rem;
}

@media (max-width: 1100px) {
  .grid-2col {
    grid-template-columns: 1fr;
  }
}

.grid-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

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

/* Cards & Forms */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

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

.card-header h3 {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-card form {
  padding: 1.35rem;
}

.form-group {
  margin-bottom: 1.1rem;
}

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

.form-control {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--bg-secondary);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

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

.checkbox-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  background: var(--bg-primary);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.checkbox-group label {
  font-weight: normal;
  font-size: 0.85rem;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}

/* Buttons */
.btn {
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  font-family: var(--font-body);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: var(--transition);
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary { background-color: var(--primary); color: white; }
.btn-primary:hover { background-color: var(--primary-hover); box-shadow: 0 4px 12px rgba(29, 78, 216, 0.3); }

.btn-purple { background-color: var(--purple); color: white; }
.btn-purple:hover { background-color: #6d28d9; box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3); }

.btn-amber { background-color: var(--amber); color: white; }
.btn-amber:hover { background-color: #b45309; }

.btn-rose { background-color: var(--rose); color: white; }
.btn-rose:hover { background-color: #be123c; }

.btn-cyan { background-color: var(--cyan); color: white; }
.btn-cyan:hover { background-color: #0e7490; }

.btn-emerald { background-color: var(--secondary); color: white; }
.btn-emerald:hover { background-color: #047857; }

.btn-orange { background-color: var(--orange); color: white; }
.btn-orange:hover { background-color: #c2410c; }

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

.btn-light { background-color: white; color: var(--primary); }
.btn-light:hover { background-color: #f8fafc; }

.btn-outline-light { background: transparent; border: 1px solid rgba(255,255,255,0.4); color: white; }
.btn-outline-light:hover { background: rgba(255,255,255,0.1); }

.btn-outline { background: transparent; border: 1px solid var(--border-color); color: var(--text-main); }
.btn-outline:hover { background-color: var(--bg-hover); }

.btn-block { width: 100%; }
.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.8rem; }

/* Document Preview Box */
.document-preview-box {
  padding: 1.5rem;
  min-height: 450px;
  max-height: 750px;
  overflow-y: auto;
  background-color: var(--bg-card);
}

.empty-state {
  height: 100%;
  min-height: 350px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted);
}

.empty-state h4 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--text-main);
}

.empty-state p {
  font-size: 0.88rem;
  max-width: 320px;
}

/* Document Formatting Standard */
.doc-output {
  font-family: var(--font-doc);
  font-size: 15pt;
  line-height: 1.6;
  color: #000000;
  background-color: #ffffff;
  padding: 2rem;
  border-radius: var(--radius-sm);
  border: 1px solid #cbd5e1;
  box-shadow: var(--shadow-sm);
}

.doc-output h1 { font-size: 20pt; text-align: center; margin-bottom: 1rem; color: #0f172a; font-weight: 700; }
.doc-output h2 { font-size: 17pt; color: #1e3a8a; margin-top: 1.25rem; margin-bottom: 0.5rem; border-bottom: 1px solid #e2e8f0; padding-bottom: 0.2rem; }
.doc-output h3 { font-size: 15pt; color: #1e293b; margin-top: 1rem; margin-bottom: 0.4rem; }
.doc-output p { margin-bottom: 0.8rem; text-indent: 2.5rem; }
.doc-output ul, .doc-output ol { margin-left: 2rem; margin-bottom: 1rem; }
.doc-output table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 14pt; }
.doc-output th, .doc-output td { border: 1px solid #334155; padding: 6px 10px; text-align: left; }
.doc-output th { background-color: #f1f5f9; font-weight: bold; }

/* Official Thai Government Document Styling */
.official-doc-container .doc-output {
  font-family: 'Sarabun', sans-serif;
  font-size: 16pt;
  line-height: 1.5;
  color: #000;
}

.garuda-header {
  text-align: center;
  margin-bottom: 1.5rem;
}
.garuda-img {
  width: 90px;
  height: auto;
  margin-bottom: 0.5rem;
}

/* Upload Dropzone */
.upload-dropzone {
  border: 2px dashed var(--primary);
  border-radius: var(--radius-md);
  padding: 3rem 1.5rem;
  text-align: center;
  background-color: var(--primary-light);
  cursor: pointer;
  transition: var(--transition);
}

.upload-dropzone:hover {
  background-color: var(--bg-hover);
  border-color: var(--primary-hover);
}

/* Processing Spinner */
.processing-box {
  padding: 2rem;
  text-align: center;
}

.spinner {
  width: 45px;
  height: 45px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

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

.hidden { display: none !important; }

/* AI Chat Window */
.chat-container-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: 650px;
}

@media (max-width: 850px) {
  .chat-container-card {
    grid-template-columns: 1fr;
  }
  .chat-sidebar-presets { display: none; }
}

.chat-sidebar-presets {
  background-color: var(--bg-card-header);
  border-right: 1px solid var(--border-color);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.preset-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;

}

.preset-btn {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  text-align: left;
  font-size: 0.82rem;
  font-family: var(--font-body);
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
}

.preset-btn:hover {
  background-color: var(--primary-light);
  border-color: var(--primary);
}

.chat-main-area {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-messages {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.message {
  display: flex;
  gap: 0.85rem;
  max-width: 85%;
}

.message-ai { align-self: flex-start; }
.message-user { align-self: flex-end; flex-direction: row-reverse; }

.msg-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--secondary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.message-user .msg-avatar {
  background: var(--primary);
}

.msg-bubble {
  background-color: var(--bg-card-header);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.1rem;
}

.message-user .msg-bubble {
  background-color: var(--primary);
  color: white;
  border: none;
}

.msg-sender {
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  opacity: 0.8;
}

.msg-text {
  font-size: 0.92rem;
  line-height: 1.5;
}

.chat-input-box {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-card);
}

.chat-form {
  display: flex;
  gap: 0.75rem;
}

/* Executive Stats List */
.executive-stats-list {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.exec-stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem;
  background-color: var(--bg-card-header);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.exec-label {
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.exec-val {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--primary);
}

.exec-qa-box {
  padding: 1.25rem;
}

/* Helper Utilities Colors */
.bg-blue-light { background-color: var(--primary-light); }
.text-blue { color: var(--primary); }

.bg-green-light { background-color: var(--secondary-light); }
.text-green { color: var(--secondary); }

.bg-amber-light { background-color: var(--amber-light); }
.text-amber { color: var(--amber); }

.bg-purple-light { background-color: var(--purple-light); }
.text-purple { color: var(--purple); }

.bg-indigo-light { background-color: var(--indigo-light); }
.text-indigo { color: var(--indigo); }

.bg-rose-light { background-color: var(--rose-light); }
.text-rose { color: var(--rose); }

.bg-cyan-light { background-color: var(--cyan-light); }
.text-cyan { color: var(--cyan); }

.bg-teal-light { background-color: var(--teal-light); }
.text-teal { color: var(--teal); }

.bg-orange-light { background-color: var(--orange-light); }
.text-orange { color: var(--orange); }

.bg-pink-light { background-color: rgba(236, 72, 153, 0.15); }
.text-pink { color: #ec4899; }
.btn-pink { background-color: #ec4899; color: white; }
.btn-pink:hover { background-color: #db2777; box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3); }

.prompt-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.prompt-chip {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}

.prompt-chip:hover {
  background-color: rgba(236, 72, 153, 0.12);
  border-color: #ec4899;
  color: #ec4899;
}

.badge {
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }

.chart-container {
  position: relative;
  height: 260px;
  padding: 1rem;
}

.analytics-top-bar {
  padding: 1.1rem 1.5rem;
}

.analytics-controls {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.analytics-recommend-box {
  padding: 1.25rem;
  min-height: 260px;
  font-size: 0.92rem;
  line-height: 1.6;
}

.table-responsive {
  overflow-x: auto;
}

.styled-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.styled-table th {
  background-color: var(--bg-card-header);
  color: var(--text-main);
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 2px solid var(--border-color);
  font-weight: 700;
}

.styled-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.styled-table tr:hover {
  background-color: var(--bg-hover);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: #0f172a;
  color: white;
  padding: 0.9rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 1000;
  animation: slideUp 0.3s ease;
}

.toast-icon { color: #10b981; font-size: 1.2rem; }

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

/* Developer Credit & App Footer */
.developer-credit {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(255,255,255,0.12);
  font-size: 0.73rem;
  color: #94a3b8;
  line-height: 1.4;
}

.developer-credit .dev-title {
  color: var(--amber);
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.developer-credit .dev-name {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.82rem;
}

.developer-credit .dev-role {
  color: #94a3b8;
  font-size: 0.7rem;
}

.app-footer {
  margin-top: 2.5rem;
  padding: 1.25rem;
  text-align: center;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.app-footer strong {
  color: var(--primary);
}

/* Responsive Mobile Navigation */
@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .main-wrapper {
    margin-left: 0;
  }
  .hamburger-btn {
    display: block;
  }
  .mobile-close-btn {
    display: block;
  }
}

/* Print Styles */
@media print {
  .sidebar, .topbar, .page-header, .form-card, .export-actions, .theme-toggle-btn, .hamburger-btn {
    display: none !important;
  }
  .main-wrapper {
    margin-left: 0 !important;
  }
  .content-body {
    padding: 0 !important;
  }
  .result-card, .document-preview-box {
    border: none !important;
    box-shadow: none !important;
    max-height: none !important;
    overflow: visible !important;
  }
  .doc-output {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
}
