/* ============================================================
   DR. VERDE — GRUVBOX DARK THEME
   Estilo KDE Konsole / Terminal Linux
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;600;700;800&display=swap');

/* ===== VARIABLES GRUVBOX ===== */
:root {
  --bg-hard:    #1d2021;
  --bg:         #282828;
  --bg-soft:    #32302f;
  --bg1:        #3c3836;
  --bg2:        #504945;
  --bg3:        #665c54;
  --bg4:        #7c6f64;

  --fg:         #ebdbb2;
  --fg2:        #d5c4a1;
  --fg3:        #bdae93;
  --fg4:        #a89984;

  --green:      #b8bb26;
  --green-dim:  #98971a;
  --yellow:     #fabd2f;
  --orange:     #fe8019;
  --red:        #fb4934;
  --purple:     #d3869b;
  --aqua:       #8ec07c;
  --blue:       #83a598;

  --font:       'JetBrains Mono', 'Fira Code', monospace;
  --radius:     4px;
  --radius-lg:  8px;
  --sidebar-w:  260px;
  --topbar-h:   52px;
  --transition: 0.2s ease;
}

/* ===== RESET ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg-hard);
  color: var(--fg);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { 
  background: var(--bg2); 
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--bg3); }

/* ===== SELECCIÓN ===== */
::selection {
  background: var(--green);
  color: var(--bg-hard);
}

/* ===== LOADING SCREEN ===== */
.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-hard);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-terminal {
  width: min(600px, 95vw);
  background: var(--bg);
  border: 1px solid var(--bg2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.terminal-header {
  background: var(--bg1);
  padding: 10px 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--bg2);
}

.terminal-title {
  color: var(--fg4);
  font-size: 0.85rem;
  margin-left: 5px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: pointer;
}
.dot.red    { background: #fb4934; }
.dot.yellow { background: #fabd2f; }
.dot.green  { background: #b8bb26; }

.terminal-body {
  padding: 20px;
  min-height: 200px;
  font-size: 0.85rem;
}

.loading-lines .line {
  color: var(--green);
  margin: 4px 0;
  opacity: 0;
  animation: lineAppear 0.3s ease forwards;
}

@keyframes lineAppear {
  to { opacity: 1; }
}

.cursor-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.prompt { color: var(--green); font-weight: 700; }

.cursor {
  color: var(--green);
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ===== LOGIN SCREEN ===== */
.login-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-hard);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  padding: 20px;
}

.login-terminal {
  width: min(550px, 95vw);
  background: var(--bg);
  border: 1px solid var(--bg2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.ascii-logo {
  color: var(--green);
  font-size: clamp(0.35rem, 1.2vw, 0.7rem);
  line-height: 1.2;
  margin: 20px 0 15px;
  overflow-x: auto;
  text-align: center;
}

.login-subtitle {
  color: var(--aqua);
  margin: 5px 0;
  text-align: center;
}

.login-version {
  color: var(--fg4);
  font-size: 0.8rem;
  text-align: center;
  margin-bottom: 30px;
}

.login-options {
  padding: 0 20px 20px;
}

.btn-login-google {
  width: 100%;
  padding: 12px;
  background: var(--bg1);
  border: 1px solid var(--green);
  border-radius: var(--radius);
  color: var(--green);
  font-family: var(--font);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
  font-weight: 600;
}

.btn-login-google:hover {
  background: var(--green);
  color: var(--bg-hard);
}

.login-divider {
  text-align: center;
  color: var(--fg4);
  margin: 15px 0;
  font-size: 0.85rem;
}

.input-group {
  display: flex;
  align-items: center;
  background: var(--bg-soft);
  border: 1px solid var(--bg2);
  border-radius: var(--radius);
  margin: 8px 0;
  overflow: hidden;
  transition: border var(--transition);
}

.input-group:focus-within {
  border-color: var(--green);
}

.input-prefix {
  color: var(--green);
  padding: 10px 12px;
  white-space: nowrap;
  font-size: 0.85rem;
  border-right: 1px solid var(--bg2);
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--fg);
  font-family: var(--font);
  font-size: 0.9rem;
  padding: 10px 12px;
  outline: none;
}

.terminal-input::placeholder { color: var(--fg4); }

.btn-login-email, .btn-register {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 8px;
}

.btn-login-email {
  background: var(--green);
  border: none;
  color: var(--bg-hard);
  font-weight: 700;
}

.btn-login-email:hover { background: var(--green-dim); }

.btn-register {
  background: transparent;
  border: 1px solid var(--bg2);
  color: var(--fg4);
}

.btn-register:hover {
  border-color: var(--fg4);
  color: var(--fg);
}

.login-footer {
  color: var(--fg4);
  font-size: 0.75rem;
  text-align: center;
  padding: 15px;
  border-top: 1px solid var(--bg1);
}

/* ===== APP LAYOUT ===== */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--topbar-h) 1fr;
  height: 100vh;
  overflow: hidden;
}

/* ===== SIDEBAR ===== */
.sidebar {
  grid-row: 1 / -1;
  background: var(--bg);
  border-right: 1px solid var(--bg2);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform var(--transition);
}

.sidebar-header {
  padding: 12px 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--bg2);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}

.sidebar-title {
  color: var(--green);
  font-weight: 700;
  flex: 1;
  font-size: 0.9rem;
}

.sidebar-close {
  display: none;
  background: none;
  border: none;
  color: var(--fg4);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
}

.user-info {
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--bg1);
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: var(--bg1);
  border: 1px solid var(--green);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-name {
  color: var(--fg);
  font-size: 0.85rem;
  font-weight: 600;
}

.user-status {
  color: var(--green);
  font-size: 0.75rem;
}

.nav-section {
  padding: 10px 0;
  border-bottom: 1px solid var(--bg1);
}

.nav-section-title {
  color: var(--fg4);
  font-size: 0.75rem;
  padding: 5px 15px;
  margin-bottom: 3px;
}

.nav-item {
  width: 100%;
  padding: 8px 15px;
  background: none;
  border: none;
  color: var(--fg3);
  font-family: var(--font);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all var(--transition);
  text-align: left;
  border-left: 2px solid transparent;
}

.nav-item:hover {
  background: var(--bg1);
  color: var(--fg);
  border-left-color: var(--bg3);
}

.nav-item.active {
  background: var(--bg-soft);
  color: var(--green);
  border-left-color: var(--green);
}

.nav-icon { font-size: 1rem; width: 20px; text-align: center; }
.nav-text { flex: 1; }

.nav-badge {
  background: var(--green);
  color: var(--bg-hard);
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 700;
}

.sidebar-footer {
  padding: 15px;
  border-top: 1px solid var(--bg1);
  color: var(--fg4);
  font-size: 0.75rem;
  margin-top: auto;
}

.sidebar-footer p { margin: 2px 0; }

.lang-switcher {
  display: flex;
  gap: 5px;
  margin-top: 10px;
}

.lang-btn {
  padding: 4px 10px;
  background: var(--bg1);
  border: 1px solid var(--bg2);
  border-radius: var(--radius);
  color: var(--fg4);
  font-family: var(--font);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition);
}

.lang-btn.active, .lang-btn:hover {
  background: var(--green);
  color: var(--bg-hard);
  border-color: var(--green);
  font-weight: 700;
}

/* ===== TOPBAR ===== */
.topbar {
  background: var(--bg);
  border-bottom: 1px solid var(--bg2);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 15px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.menu-btn {
  background: none;
  border: none;
  color: var(--fg4);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 5px;
  display: none;
  transition: color var(--transition);
}

.menu-btn:hover { color: var(--green); }

.topbar-path {
  flex: 1;
  font-size: 0.85rem;
  color: var(--fg4);
}

.path-root { color: var(--green); font-weight: 700; }
.path-sep { color: var(--bg3); margin: 0 4px; }
.path-current { color: var(--fg2); }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-btn {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 5px;
  border-radius: var(--radius);
  transition: background var(--transition);
}

.topbar-btn:hover { background: var(--bg1); }

.user-avatar-mini {
  width: 30px;
  height: 30px;
  background: var(--bg1);
  border: 1px solid var(--green);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  overflow: hidden;
}

.user-avatar-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  overflow-y: auto;
  background: var(--bg-hard);
  padding: 25px;
}

/* ===== CARDS ===== */
.card {
  background: var(--bg);
  border: 1px solid var(--bg2);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border var(--transition);
}

.card:hover { border-color: var(--bg3); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--bg1);
}

.card-title {
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title::before {
  content: '>';
  color: var(--fg4);
}

/* ===== GRID SYSTEM ===== */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 15px; }

/* ===== STAT WIDGETS ===== */
.stat-widget {
  background: var(--bg);
  border: 1px solid var(--bg2);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-widget::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--green);
}

.stat-widget:hover {
  border-color: var(--green);
  transform: translateY(-2px);
}

.stat-icon { font-size: 1.8rem; margin-bottom: 8px; display: block; }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--green); display: block; }
.stat-label { font-size: 0.75rem; color: var(--fg4); display: block; margin-top: 3px; }

/* ===== BUTTONS ===== */
.btn {
  padding: 8px 18px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary {
  background: var(--green);
  border: none;
  color: var(--bg-hard);
}
.btn-primary:hover { background: var(--green-dim); }

.btn-secondary {
  background: transparent;
  border: 1px solid var(--bg2);
  color: var(--fg3);
}
.btn-secondary:hover { border-color: var(--fg3); color: var(--fg); }

.btn-danger {
  background: transparent;
  border: 1px solid var(--red);
  color: var(--red);
}
.btn-danger:hover { background: var(--red); color: var(--bg-hard); }

.btn-warning {
  background: transparent;
  border: 1px solid var(--yellow);
  color: var(--yellow);
}
.btn-warning:hover { background: var(--yellow); color: var(--bg-hard); }

/* ===== INPUTS ===== */
.input-field {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--bg2);
  border-radius: var(--radius);
  color: var(--fg);
  font-family: var(--font);
  font-size: 0.9rem;
  padding: 10px 12px;
  outline: none;
  transition: border var(--transition);
}

.input-field:focus { border-color: var(--green); }
.input-field::placeholder { color: var(--fg4); }

.select-field {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--bg2);
  border-radius: var(--radius);
  color: var(--fg);
  font-family: var(--font);
  font-size: 0.9rem;
  padding: 10px 12px;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a89984' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 35px;
}

.select-field:focus { border-color: var(--green); }

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-green  { background: rgba(184,187,38,0.15);  color: var(--green);  }
.badge-yellow { background: rgba(250,189,47,0.15);  color: var(--yellow); }
.badge-red    { background: rgba(251,73,52,0.15);   color: var(--red);    }
.badge-blue   { background: rgba(131,165,152,0.15); color: var(--blue);   }
.badge-purple { background: rgba(211,134,155,0.15); color: var(--purple); }
.badge-aqua   { background: rgba(142,192,124,0.15); color: var(--aqua);   }
.badge-orange { background: rgba(254,128,25,0.15);  color: var(--orange); }

/* ===== PROGRESS BAR ===== */
.progress-bar {
  background: var(--bg1);
  border-radius: 2px;
  height: 6px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--green);
  border-radius: 2px;
  transition: width 0.5s ease;
}

.progress-fill.yellow { background: var(--yellow); }
.progress-fill.red    { background: var(--red);    }
.progress-fill.aqua   { background: var(--aqua);   }

/* ===== TERMINAL TEXT ===== */
.terminal-text {
  background: var(--bg-soft);
  border: 1px solid var(--bg2);
  border-radius: var(--radius);
  padding: 15px;
  font-size: 0.85rem;
}

.terminal-text .t-prompt { color: var(--green); font-weight: 700; }
.terminal-text .t-cmd    { color: var(--yellow); }
.terminal-text .t-output { color: var(--fg3); }
.terminal-text .t-error  { color: var(--red); }
.terminal-text .t-info   { color: var(--aqua); }

/* ===== SECTION HEADER ===== */
.section-header {
  margin-bottom: 25px;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '##';
  color: var(--green);
  font-size: 1rem;
}

.section-subtitle {
  color: var(--fg4);
  font-size: 0.85rem;
  margin-top: 5px;
  padding-left: 28px;
}

.section-divider {
  height: 1px;
  background: var(--bg2);
  margin: 20px 0;
}

/* ===== CHAT FLOTANTE ===== */
.chat-fab {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 52px;
  height: 52px;
  background: var(--green);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(184,187,38,0.3);
  transition: all var(--transition);
  z-index: 900;
}

.chat-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(184,187,38,0.4);
}

.chat-float-window {
  position: fixed;
  bottom: 90px;
  right: 25px;
  width: min(380px, calc(100vw - 50px));
  height: 500px;
  background: var(--bg);
  border: 1px solid var(--bg2);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  z-index: 900;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
  overflow: hidden;
}

.chat-float-header {
  background: var(--bg1);
  padding: 12px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--bg2);
}

.chat-float-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-float-avatar {
  font-size: 1.5rem;
}

.chat-float-name {
  color: var(--green);
  font-weight: 700;
  font-size: 0.9rem;
}

.chat-float-status {
  color: var(--fg4);
  font-size: 0.75rem;
}

.chat-float-actions {
  display: flex;
  gap: 5px;
}

.chat-float-actions button {
  background: none;
  border: none;
  color: var(--fg4);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px 6px;
  border-radius: var(--radius);
  transition: all var(--transition);
  font-family: var(--font);
}

.chat-float-actions button:hover {
  background: var(--bg2);
  color: var(--fg);
}

.chat-float-messages {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-message {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.chat-message.user {
  flex-direction: row-reverse;
}

.chat-avatar {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.chat-bubble {
  background: var(--bg1);
  border: 1px solid var(--bg2);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 0.85rem;
  color: var(--fg2);
  max-width: 80%;
  line-height: 1.5;
}

.chat-message.user .chat-bubble {
  background: rgba(184,187,38,0.1);
  border-color: var(--green);
  color: var(--fg);
}

.chat-float-input {
  padding: 12px;
  border-top: 1px solid var(--bg2);
  display: flex;
  gap: 8px;
}

.chat-float-input input {
  flex: 1;
  background: var(--bg-soft);
  border: 1px solid var(--bg2);
  border-radius: var(--radius);
  color: var(--fg);
  font-family: var(--font);
  font-size: 0.85rem;
  padding: 8px 12px;
  outline: none;
}

.chat-float-input input:focus { border-color: var(--green); }
.chat-float-input input::placeholder { color: var(--fg4); }

.chat-float-input button {
  background: var(--green);
  border: none;
  border-radius: var(--radius);
  color: var(--bg-hard);
  font-family: var(--font);
  font-weight: 700;
  padding: 8px 14px;
  cursor: pointer;
  transition: background var(--transition);
}

.chat-float-input button:hover { background: var(--green-dim); }

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--bg1);
  border: 1px solid var(--bg2);
  border-radius: var(--radius);
  padding: 10px 20px;
  font-size: 0.85rem;
  color: var(--fg);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  pointer-events: auto;
}

.toast.success { border-color: var(--green); color: var(--green); }
.toast.error   { border-color: var(--red);   color: var(--red);   }
.toast.warning { border-color: var(--yellow);color: var(--yellow);}
.toast.info    { border-color: var(--blue);  color: var(--blue);  }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(20px); }
}

/* ===== SCROLL TOP ===== */
.scroll-top {
  position: fixed;
  bottom: 90px;
  right: 25px;
  width: 36px;
  height: 36px;
  background: var(--bg1);
  border: 1px solid var(--bg2);
  border-radius: var(--radius);
  color: var(--fg4);
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
  z-index: 800;
}

.scroll-top:hover {
  border-color: var(--green);
  color: var(--green);
}

/* ===== ACCORDION ===== */
.accordion-item {
  background: var(--bg);
  border: 1px solid var(--bg2);
  border-radius: var(--radius);
  margin: 6px 0;
  overflow: hidden;
}

.accordion-header {
  padding: 12px 15px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--fg3);
  font-size: 0.9rem;
  transition: all var(--transition);
}

.accordion-header:hover {
  background: var(--bg1);
  color: var(--green);
}

.accordion-item.open .accordion-header {
  color: var(--green);
  border-bottom: 1px solid var(--bg2);
}

.accordion-arrow {
  transition: transform 0.3s;
  color: var(--fg4);
}

.accordion-item.open .accordion-arrow {
  transform: rotate(180deg);
  color: var(--green);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  padding: 0 15px;
  font-size: 0.85rem;
  color: var(--fg3);
  line-height: 1.7;
}

.accordion-item.open .accordion-body {
  max-height: 1000px;
  padding: 15px;
}

/* ===== TABLE ===== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th {
  background: var(--bg1);
  color: var(--green);
  padding: 10px 12px;
  text-align: left;
  font-weight: 700;
  border-bottom: 2px solid var(--green);
}

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--bg1);
  color: var(--fg3);
}

.data-table tr:hover td { background: rgba(184,187,38,0.03); }

/* ===== CHECKLIST ===== */
.check-item {
  padding: 10px 12px;
  margin: 5px 0;
  background: var(--bg);
  border: 1px solid var(--bg1);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.85rem;
}

.check-item:hover { border-color: var(--bg3); }

.check-item.done {
  border-color: var(--green);
  background: rgba(184,187,38,0.05);
  text-decoration: line-through;
  color: var(--fg4);
}

.check-box {
  width: 20px;
  height: 20px;
  border: 1px solid var(--bg3);
  border-radius: var(--radius);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  font-size: 0.75rem;
}

.check-item.done .check-box {
  background: var(--green);
  border-color: var(--green);
  color: var(--bg-hard);
}

.check-item.done .check-box::after { content: '✓'; }

/* ===== UTILITY ===== */
.hidden    { display: none !important; }
.flex      { display: flex; }
.flex-col  { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-10   { gap: 10px; }
.gap-15   { gap: 15px; }
.gap-20   { gap: 20px; }
.mt-10    { margin-top: 10px; }
.mt-20    { margin-top: 20px; }
.mt-30    { margin-top: 30px; }
.mb-10    { margin-bottom: 10px; }
.mb-20    { margin-bottom: 20px; }
.text-green  { color: var(--green); }
.text-yellow { color: var(--yellow); }
.text-red    { color: var(--red); }
.text-aqua   { color: var(--aqua); }
.text-muted  { color: var(--fg4); }
.text-sm     { font-size: 0.8rem; }
.text-lg     { font-size: 1.1rem; }
.font-bold   { font-weight: 700; }
.w-full      { width: 100%; }
.text-center { text-align: center; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    z-index: 200;
    transform: translateX(-100%);
    width: var(--sidebar-w);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 5px 0 20px rgba(0,0,0,0.5);
  }

  .sidebar-close { display: block; }
  .menu-btn { display: block; }

  .main-content { padding: 15px; }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

  .chat-float-window {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 60vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
}

/* ===== OVERLAY MOBILE ===== */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 199;
}

.sidebar-overlay.active { display: block; }

/* ===== PRINT ===== */
@media print {
  .sidebar, .topbar, .chat-fab,
  .chat-float-window, .toast-container,
  .scroll-top, .sidebar-overlay { display: none !important; }

  .app { grid-template-columns: 1fr; }
  body { background: white; color: black; }
}