/* ══════════════════════════════════════════════════════════════════
   SHARED STYLES - LABCHAT & URQUIZ F1 SUITE
   Aesthetic: Deep Slate Glassmorphism with Dynamic Blur & Orbs
   Fonts: Outfit (Headings & UI) + JetBrains Mono (Code)
   ══════════════════════════════════════════════════════════════════ */

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

:root, html[data-theme="dark"] {
  --bg: #0b0c10;
  --surface: rgba(22, 24, 32, 0.72);
  --surface-alt: rgba(30, 34, 46, 0.65);
  --surface-hover: rgba(38, 43, 58, 0.75);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 255, 255, 0.18);
  --glass-border-active: rgba(255, 255, 255, 0.28);
  --accent: #6b7280;
  --accent-glow: #9ca3af;
  --accent-hover: #4b5563;
  --accent-subtle: rgba(107, 114, 128, 0.15);
  --green-1: #2ecc71;
  --green-glow: rgba(46, 204, 113, 0.3);
  --red: #e74c3c;
  --red-glow: rgba(231, 76, 60, 0.3);
  --purple-fast: #d1d5db;
  --purple-glow: rgba(209, 213, 219, 0.35);
  --text-primary: rgba(255, 255, 255, 0.94);
  --text-secondary: rgba(255, 255, 255, 0.62);
  --text-muted: rgba(255, 255, 255, 0.36);
  --input-bg: rgba(15, 17, 24, 0.6);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
  --scrollbar: rgba(255, 255, 255, 0.12);
  --badge-bg: #6b7280;
  --badge-text: #ffffff;
  --admin-badge-bg: #9ca3af;
  --admin-badge-text: #0b0c10;
  --orb-1: rgba(107, 114, 128, 0.15);
  --orb-2: rgba(156, 163, 175, 0.12);
  --orb-3: rgba(209, 213, 219, 0.1);
  --f1-gold: #d1d5db;
  --f1-silver: #9ca3af;
  --f1-bronze: #6b7280;
}

html[data-theme="light"] {
  --bg: #f4f5f9;
  --surface: rgba(255, 255, 255, 0.85);
  --surface-alt: rgba(244, 246, 251, 0.92);
  --surface-hover: rgba(235, 239, 248, 0.95);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-border-hover: rgba(0, 0, 0, 0.16);
  --glass-border-active: rgba(0, 0, 0, 0.26);
  --accent: #6b7280;
  --accent-glow: #4b5563;
  --accent-hover: #9ca3af;
  --accent-subtle: rgba(107, 114, 128, 0.12);
  --green-1: #27ae60;
  --green-glow: rgba(39, 174, 96, 0.25);
  --red: #d63031;
  --red-glow: rgba(214, 48, 49, 0.25);
  --purple-fast: #4b5563;
  --purple-glow: rgba(75, 85, 99, 0.25);
  --text-primary: rgba(15, 23, 42, 0.92);
  --text-secondary: rgba(51, 65, 85, 0.72);
  --text-muted: rgba(100, 116, 139, 0.52);
  --input-bg: rgba(255, 255, 255, 0.9);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.14);
  --scrollbar: rgba(0, 0, 0, 0.12);
  --badge-bg: #6b7280;
  --badge-text: #ffffff;
  --admin-badge-bg: #374151;
  --admin-badge-text: #ffffff;
  --orb-1: rgba(107, 114, 128, 0.1);
  --orb-2: rgba(156, 163, 175, 0.08);
  --orb-3: rgba(209, 213, 219, 0.07);
  --f1-gold: #9ca3af;
  --f1-silver: #6b7280;
  --f1-bronze: #4b5563;
}

/* ═══════════════════════════════════════════════════
   RESET & FOUNDATIONS
   ═══════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Blurred Ambient Background Orbs */
body::before, body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(120px);
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

body::before {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, var(--orb-1) 0%, transparent 70%);
  top: -150px;
  left: -150px;
  animation: orbDrift1 26s ease-in-out infinite alternate;
}

body::after {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--orb-2) 0%, transparent 70%);
  bottom: -150px;
  right: -150px;
  animation: orbDrift2 30s ease-in-out infinite alternate;
}

@keyframes orbDrift1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(120px, 80px) scale(1.1); }
  100% { transform: translate(40px, 140px) scale(0.95); }
}

@keyframes orbDrift2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-100px, -70px) scale(1.08); }
  100% { transform: translate(60px, -110px) scale(0.92); }
}

/* Glass Utility */
.glass {
  background: var(--surface);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--scrollbar);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ═══════════════════════════════════════════════════
   APP CONTAINER ARCHITECTURE (100dvh)
   ═══════════════════════════════════════════════════ */
#app-layout {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════
   LEFT NAVIGATION PANE / SIDEBAR
   ═══════════════════════════════════════════════════ */
#sidebar {
  width: 260px;
  height: 100dvh;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s;
}

.sidebar-header {
  padding: 20px 18px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--glass-border);
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-glow));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  box-shadow: 0 4px 14px var(--accent-subtle);
  flex-shrink: 0;
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.brand-suite {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-glow);
}

.sidebar-close-mobile {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
}

.sidebar-nav {
  padding: 16px 12px;
  flex: 1 1 auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-section-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 8px 12px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
  border: 1px solid transparent;
}

.nav-item:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  border-color: var(--glass-border);
}

.nav-item.active {
  background: var(--accent-subtle);
  color: var(--accent-glow);
  font-weight: 600;
  border-color: rgba(94, 106, 210, 0.3);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 25%;
  bottom: 25%;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--accent-glow);
}

.nav-icon {
  font-size: 1.15rem;
  width: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-badge-pill {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  background: var(--surface-alt);
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
}

.nav-item.active .nav-badge-pill {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

/* User Card in Sidebar */
.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface-alt);
}

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

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent-glow);
}

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

.user-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-display-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.role-badge {
  font-size: 0.58rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--badge-bg);
  color: var(--badge-text);
}

.role-badge.admin {
  background: linear-gradient(135deg, #e11d48, #be123c);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(225, 29, 72, 0.4);
}

.sidebar-controls-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.theme-toggle-btn:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  border-color: var(--glass-border-hover);
}

.sidebar-tagline {
  font-size: 0.62rem;
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
  line-height: 1.35;
}

/* Overlay for Mobile Sidebar */
#sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99;
}
#sidebar-overlay.open {
  display: block;
}

/* ═══════════════════════════════════════════════════
   MAIN WRAPPER & HEADER (DECLUTTERED)
   ═══════════════════════════════════════════════════ */
#main-wrapper {
  flex: 1 1 auto;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  position: relative;
}

#header {
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 50;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-sidebar-toggle {
  display: none;
  background: none;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 6px 10px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-sidebar-toggle:hover {
  background: var(--surface-hover);
}

.header-page-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-page-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

/* Live Status Dot */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 600;
  background: var(--surface-alt);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: all 0.3s ease;
}
.status-pill[data-status="connected"] {
  color: var(--green-1);
  border-color: rgba(46, 204, 113, 0.25);
}
.status-pill[data-status="connected"] .status-dot {
  background: var(--green-1);
  box-shadow: 0 0 8px var(--green-glow);
}
.status-pill[data-status="reconnecting"] {
  color: var(--f1-gold);
}
.status-pill[data-status="reconnecting"] .status-dot {
  background: var(--f1-gold);
  animation: pulseDot 1.2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.7); }
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hdr-btn {
  padding: 7px 12px;
  border-radius: 8px;
  background: var(--surface-alt);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.hdr-btn:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  border-color: var(--glass-border-hover);
}
.hdr-btn.panic {
  background: rgba(231, 76, 60, 0.12);
  border-color: rgba(231, 76, 60, 0.3);
  color: #ff6b6b;
  font-weight: 700;
}
.hdr-btn.panic:hover {
  background: rgba(231, 76, 60, 0.25);
  color: #ffffff;
}

.hdr-btn-menu {
  width: 34px;
  height: 34px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border-radius: 8px;
}

/* ═══════════════════════════════════════════════════
   RIGHT 3-DOT (⋮) SETTINGS DRAWER
   ═══════════════════════════════════════════════════ */
#drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 490;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
#drawer-overlay.open {
  display: block;
}

#side-drawer {
  position: fixed;
  top: 0;
  right: -370px;
  bottom: 0;
  width: 350px;
  max-width: 88vw;
  z-index: 500;
  background: var(--surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-left: 1px solid var(--glass-border);
  box-shadow: -8px 0 36px rgba(0, 0, 0, 0.4);
  transition: right 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 24px 20px;
}
#side-drawer.open {
  right: 0;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--glass-border);
}
.drawer-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}
.drawer-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.25rem;
  cursor: pointer;
  transition: color 0.2s;
}
.drawer-close:hover {
  color: var(--text-primary);
}

.drawer-section {
  margin-bottom: 24px;
}
.drawer-section h3 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.drawer-btn-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.drawer-btn {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--surface-alt);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}
.drawer-btn:hover {
  background: var(--surface-hover);
  border-color: var(--glass-border-hover);
}
.drawer-btn.danger {
  background: rgba(231, 76, 60, 0.12);
  border-color: rgba(231, 76, 60, 0.25);
  color: #ff6b6b;
}
.drawer-btn.danger:hover {
  background: rgba(231, 76, 60, 0.22);
}

.form-group {
  margin-bottom: 14px;
  text-align: left;
}
.form-group label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 11px 14px;
  background: var(--input-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-subtle);
}
.form-group input::placeholder, .form-group textarea::placeholder {
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════
   LOGIN MODAL OVERLAY
   ═══════════════════════════════════════════════════ */
#login-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}

#login-card {
  width: 420px;
  max-width: 92vw;
  padding: 34px 28px 24px;
  border-radius: 24px;
  text-align: center;
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-brand-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-glow));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #ffffff;
  box-shadow: 0 8px 24px var(--accent-subtle);
}

#login-card h1 {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  color: var(--text-primary);
}

#login-card .subtitle {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.login-attribution {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-bottom: 22px;
  font-style: italic;
  line-height: 1.35;
}

#login-error {
  color: var(--red);
  font-size: 0.78rem;
  min-height: 20px;
  margin-bottom: 8px;
  font-weight: 500;
}

#login-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
  box-shadow: 0 6px 20px var(--accent-subtle);
}
#login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--accent-glow);
}
#login-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

#quick-close-btn {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  background: var(--surface-alt);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
#quick-close-btn:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════
   CONFIRM & COMMON MODALS
   ═══════════════════════════════════════════════════ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal-overlay.open {
  display: flex;
}

.modal-card {
  width: 400px;
  max-width: 92vw;
  padding: 26px 24px 22px;
  border-radius: 18px;
  text-align: center;
  animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.modal-card p {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}
.modal-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.modal-btns button {
  padding: 10px 20px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--glass-border);
  transition: all 0.2s;
}
.mbtn-cancel {
  background: var(--surface-alt);
  color: var(--text-secondary);
}
.mbtn-cancel:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}
.mbtn-danger {
  background: var(--red);
  color: #fff;
  border-color: transparent !important;
}
.mbtn-danger:hover {
  opacity: 0.9;
}
.mbtn-primary {
  background: var(--accent);
  color: #fff;
  border-color: transparent !important;
}
.mbtn-primary:hover {
  background: var(--accent-hover);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE DESIGN (<= 768px)
   ═══════════════════════════════════════════════════ */
@media (max-width: 768px) {
  #sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    bottom: 0;
    width: 270px;
    max-width: 82vw;
    z-index: 1000;
  }
  #sidebar.open {
    transform: translateX(280px);
  }
  .sidebar-close-mobile {
    display: block;
  }
  .btn-sidebar-toggle {
    display: inline-flex;
  }
  input, textarea, select {
    font-size: 16px !important; /* Prevents auto-zoom on mobile */
  }
}
