/* Premium Pharmaceutical Light Theme */
:root {
  --bg: #f4f7fb;
  --bg2: #ffffff;
  --bg3: #eef2f6;
  --card: #ffffff;
  --border: #e2e8f0;
  --border2: #cbd5e1;
  
  /* Primary Teal/Blue for Medical Trust */
  --primary: #0ea5e9; 
  --primary-dark: #0284c7;
  --primary-light: #38bdf8;
  
  /* Accent Emerald/Green for Health */
  --accent: #10b981; 
  --accent2: #059669;
  
  /* Status Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  
  /* Text */
  --text: #0f172a;
  --text2: #334155;
  --text3: #64748b;
  
  --radius: 16px;
  --radius2: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* Subtle background watermark */
.watermark {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url('nexyra.ico');
  background-repeat: repeat;
  background-size: 140px 140px;
  background-position: center;
  opacity: 0.035;
}

#app {
  position: relative;
  z-index: 1;
}

/* Auth Page */
.page { display: none; }
.page.active { display: block; }
#login-page.page.active {
  display: flex;
}
.hidden { display: none !important; }

#login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  /* Soft blue gradient background with medical vibe */
  background: radial-gradient(circle at top left, #e0f2fe, #f4f7fb 60%);
  position: relative;
  overflow: hidden;
}

#login-page::before, #login-page::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
}
#login-page::before {
  background: rgba(14, 165, 233, 0.2);
  width: 400px; height: 400px;
  top: -100px; left: -100px;
}
#login-page::after {
  background: rgba(16, 185, 129, 0.15);
  width: 350px; height: 350px;
  bottom: -50px; right: -50px;
}

.login-card {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  padding: 40px;
  border-radius: var(--radius);
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.05);
  text-align: center;
}
.login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}
.logo-icon {
  width: 60px;
  height: 60px;
  margin-bottom: 12px;
}
.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
}
.logo-icon.small {
  width: 32px;
  height: 32px;
}
.logo-text h1 {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  letter-spacing: -0.5px;
}
.logo-text span {
  color: var(--text3);
  font-size: 0.9rem;
}

.login-form-wrap h2 {
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 8px;
}
.login-subtitle {
  color: var(--text3);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text3);
  width: 20px;
  height: 20px;
  pointer-events: none;
}
.input-wrap input {
  padding-left: 44px !important;
}
.toggle-pw {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: var(--text3);
  width: 20px;
  height: 20px;
  cursor: pointer;
  transition: var(--transition);
}
.toggle-pw:hover {
  color: var(--primary);
}
.login-error {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius2);
  font-size: 0.85rem;
  margin-bottom: 16px;
  text-align: left;
}
.login-error svg {
  width: 16px;
  height: 16px;
}
.demo-hints {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: left;
}
.demo-hints p {
  font-size: 0.85rem;
  color: var(--text3);
  margin-bottom: 12px;
}
.hint-badges {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--bg3);
  color: var(--text2);
  transition: var(--transition);
}
.badge:hover {
  background: rgba(14, 165, 233, 0.1);
  color: var(--primary-dark);
}

/* Layout */
#dashboard-page {
  display: flex;
  min-height: 100vh;
}
#dashboard-page.hidden {
  display: none !important;
}
#dashboard-page.page.active {
  display: flex;
}
.sidebar {
  width: 280px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  box-shadow: 2px 0 10px rgba(0,0,0,0.02);
  z-index: 10;
}
.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
  padding: 0 24px;
}
.sidebar-logo .logo-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 0;
}
.sidebar-logo span {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.nav-section {
  padding: 0 24px;
  margin-top: 24px;
  margin-bottom: 8px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text3);
  font-weight: 700;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: var(--text2);
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
  font-size: 0.95rem;
  border-left: 3px solid transparent;
}
.nav-item svg {
  width: 20px;
  height: 20px;
  color: var(--text3);
  transition: var(--transition);
}
.nav-item:hover {
  background: var(--bg3);
  color: var(--primary);
}
.nav-item:hover svg {
  color: var(--primary);
}
.nav-item.active {
  background: rgba(14, 165, 233, 0.08);
  color: var(--primary-dark);
  border-left-color: var(--primary);
  font-weight: 600;
}
.nav-item.active svg {
  color: var(--primary);
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
/* hidden in current index.html which uses topbar */
.topbar {
  height: 70px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 5;
  box-shadow: 0 1px 10px rgba(0,0,0,0.01);
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.topbar-date {
  color: var(--text3);
  font-size: 0.9rem;
  font-weight: 500;
}
.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}
.page-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  width: 24px;
  height: 24px;
}
.user-avatar {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.user-avatar.small { width: 32px; height: 32px; font-size: 1rem; }
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  margin-bottom: 16px;
}
.sidebar-user .user-avatar { width: 44px; height: 44px; font-size: 1.2rem; }
.sidebar-user .user-info { display: flex; flex-direction: column; }
.sidebar-user .user-name { font-weight: 700; color: var(--text); font-size: 1rem; }
.sidebar-user .user-role { font-size: 0.8rem; color: var(--primary); font-weight: 600; }
.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-right: 20px;
}
.sidebar-toggle {
  display: none;
}
.btn-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 24px;
  background: transparent;
  border: none;
  color: var(--text3);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-logout:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.05);
}
.btn-logout svg { width: 20px; height: 20px; }
.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
}

.tour-loc-badge {
  padding: 4px 12px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 20px;
  font-size: 0.85rem;
  color: #059669;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.tour-loc-badge:hover {
  background: rgba(16, 185, 129, 0.22);
  transform: translateY(-1px);
}
.tour-loc-badge--today {
  background: rgba(14, 165, 233, 0.15);
  border-color: rgba(14, 165, 233, 0.35);
  color: var(--primary-dark);
}
.tour-loc-badge--today:hover {
  background: rgba(14, 165, 233, 0.25);
}

.btn-full { width: 100%; padding: 12px 20px; font-size: 1rem; }
.content-area {
  padding: 32px;
  flex: 1;
  overflow-y: auto;
}

/* UI Elements */
.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 24px;
}
.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(248,250,252,0.5);
}
.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

/* Forms */
.form-group {
  margin-bottom: 20px;
  text-align: left;
}
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: var(--text2);
  font-weight: 600;
}
.form-group input, .form-group select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: var(--radius2);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}
.form-group input:focus, .form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
  background: var(--bg2);
}

.form-group-modal {
  margin-bottom: 16px;
}
.form-group-modal label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  color: var(--text2);
  font-weight: 600;
}
.form-group-modal input, .form-group-modal select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: var(--radius2);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}
.form-group-modal input:focus, .form-group-modal select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
  background: var(--bg2);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Buttons */
.btn, .btn-primary, .btn-purple, .btn-outline, .btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius2);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  outline: none;
  text-decoration: none;
}
.btn svg, .btn-primary svg, .btn-purple svg, .btn-outline svg, .btn-danger svg {
  width: 20px;
  height: 20px;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.3);
}
.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
  transform: translateY(-1px);
}
.btn-purple {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}
.btn-purple:hover {
  background: var(--accent2);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text2);
}
.btn-outline:hover {
  background: var(--bg3);
  color: var(--text);
  border-color: var(--text3);
}
.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: 6px;
}
.btn-block {
  width: 100%;
}
.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}
.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

/* Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th {
  background: var(--bg3);
  color: var(--text2);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 14px 24px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 0.95rem;
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: none;
}
tr:hover td {
  background: rgba(14, 165, 233, 0.02);
}

/* Badges */
.badge-role {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}
.role-admin { background: rgba(245, 158, 11, 0.15); color: #b45309; }
.role-manager { background: rgba(14, 165, 233, 0.15); color: #0284c7; }
.role-sales { background: rgba(16, 185, 129, 0.15); color: #059669; }

.badge-cat {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}
.cat-a { background: rgba(16, 185, 129, 0.15); color: #059669; border: 1px solid rgba(16,185,129,0.3); }
.cat-b { background: rgba(245, 158, 11, 0.15); color: #b45309; border: 1px solid rgba(245,158,11,0.3); }

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--card);
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.stat-icon svg {
  width: 24px;
  height: 24px;
}
.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1;
}
.stat-label {
  color: var(--text3);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}
.modal {
  background: var(--card);
  width: 100%;
  max-width: 500px;
  border-radius: var(--radius);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  border: 1px solid var(--border);
}
.modal-overlay:not(.hidden) .modal {
  transform: translateY(0) scale(1);
}
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(248,250,252,0.5);
}
.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}
.modal-close {
  background: transparent;
  border: none;
  color: var(--text3);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition);
}
.modal-close:hover {
  background: var(--bg3);
  color: var(--danger);
}
.modal-body {
  padding: 24px;
}
.hidden {
  display: none !important;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
}
.toast {
  padding: 12px 20px;
  border-radius: var(--radius2);
  color: #fff;
  font-weight: 500;
  font-size: 0.95rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  animation: slideIn 0.3s ease forwards;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text3);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  max-height: 75vh;
}
.modal-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

#sync-btn:not([disabled]) {
  border-color: var(--primary) !important;
  color: var(--primary-dark) !important;
  background: rgba(14, 165, 233, 0.08);
}
#sync-btn:not([disabled]):hover {
  background: rgba(14, 165, 233, 0.15);
}

/* ============================
   TABLET (768px - 1024px)
   ============================ */
@media (min-width: 769px) and (max-width: 1024px) {
  .sidebar {
    width: 220px;
  }
  .topbar {
    padding: 0 20px;
  }
  .content-area {
    padding: 20px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
  .topbar-date {
    display: none;
  }
  .modal {
    max-width: 480px;
    margin: 16px;
  }
}

/* ============================
   MOBILE (max-width: 768px)
   ============================ */
@media (max-width: 768px) {
  /* Sidebar: mobile drawer */
  .sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    bottom: 0;
    transition: left 0.3s ease;
    z-index: 100;
    width: 280px;
  }
  .sidebar.open {
    left: 0;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
  }
  .sidebar-overlay.active {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 99;
    display: block !important;
  }
  .sidebar-toggle {
    display: block;
    background: none;
    border: none;
    color: var(--text2);
    width: 24px;
    height: 24px;
    cursor: pointer;
  }
  .mobile-menu-btn {
    display: block;
  }

  /* Topbar: compact for mobile */
  .topbar {
    padding: 0 12px;
    height: 56px;
  }
  .topbar-left {
    gap: 10px;
    min-width: 0;
    flex: 1;
  }
  .page-title {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
  }
  .topbar-right {
    gap: 8px;
    flex-shrink: 0;
  }
  .topbar-date {
    display: none;
  }
  #topbar-name {
    display: none;
  }
  .topbar-user {
    gap: 4px;
  }

  /* Sync button compact on mobile */
  #sync-btn .sync-text {
    display: none;
  }
  #sync-btn {
    padding: 6px 8px !important;
    min-width: 34px;
  }

  /* Content area: smaller padding */
  .content-area {
    padding: 12px;
  }

  /* Stats grid: single column */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Cards */
  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
  }

  /* Forms: stack on mobile */
  .form-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  /* Tables: scrollable */
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table {
    min-width: 500px;
  }
  th, td {
    padding: 10px 14px;
    font-size: 0.85rem;
  }

  /* Section header: stack on small screens */
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .section-title {
    font-size: 1.15rem;
  }

  /* Modal: full width on mobile */
  .modal-overlay {
    align-items: flex-end;
  }
  .modal {
    max-width: 100%;
    width: 100%;
    border-radius: var(--radius) var(--radius) 0 0;
    max-height: 90vh;
  }
  .modal-body {
    max-height: 65vh;
    padding: 16px;
  }
  .modal-header {
    padding: 16px;
  }
  .modal-footer {
    padding: 12px 16px;
  }

  /* Login card: mobile friendly */
  .login-card {
    padding: 28px 20px;
    margin: 16px;
    max-width: 100%;
  }
  .logo-text h1 {
    font-size: 1.8rem;
  }

  /* Tour plan grid: 1 column on mobile */
  #mtp-days > div {
    grid-template-columns: 1fr !important;
  }

  /* Doctor cards grid: 1 column on mobile */
  .content-area > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  /* Buttons: smaller on mobile */
  .btn, .btn-primary, .btn-purple, .btn-outline {
    padding: 8px 14px;
    font-size: 0.88rem;
  }
  .btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
  }
}

/* Extra small screens (360px and below) */
@media (max-width: 360px) {
  .topbar {
    padding: 0 8px;
  }
  .page-title {
    max-width: 110px;
  }
  .content-area {
    padding: 8px;
  }
  .login-card {
    padding: 20px 14px;
    margin: 8px;
  }
}

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

/* =========================================
   IOS & LIQUID GLASS SPECIFIC (FLUTTER APP)
   ========================================= */
.flutter-app {
    --bg-color: #f2f2f7; /* iOS standard background */
    --surface-color: rgba(255, 255, 255, 0.7);
    --border: rgba(0, 0, 0, 0.05);
}

.flutter-app body {
    background-color: var(--bg-color);
}

/* Liquid Glass Cards */
.flutter-app .card, 
.flutter-app .stat-card,
.flutter-app .list-item,
.flutter-app .doctor-card {
    background: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04) !important;
    border-radius: 16px !important;
}

/* iOS Topbar override */
.flutter-app .topbar {
    display: none !important; /* Topbar flutter tomondan native chiziladi (Sinxronlash tugmasi bilan) */
}

/* iOS Sidebar/Menu adjustments */
.flutter-app .sidebar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border-right: 1px solid rgba(0, 0, 0, 0.05);
}

.flutter-app .content-area {
    padding-top: 16px !important;
}

/* Buttons iOS Style */
.flutter-app .btn-primary {
    background: #007aff !important; /* iOS Blue */
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3) !important;
}

.flutter-app .btn-primary:active {
    transform: scale(0.97);
    opacity: 0.9;
}

/* Inputs iOS Style */
.flutter-app input, 
.flutter-app select, 
.flutter-app textarea {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 12px !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02) !important;
}

.flutter-app input:focus, 
.flutter-app select:focus {
    border-color: #007aff !important;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15) !important;
}

/* Main Login screen in flutter */
.flutter-app .login-card {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1) !important;
}

