/* =========================================================
   ORTHOS OPD — Administrator Portal Stylesheet
   Modern Medical Executive Design System
   ========================================================= */

:root {
  --navy-950: #040d18;
  --navy-900: #071729;
  --navy-850: #0a1f35;
  --navy-800: #0B2239;
  --navy-700: #123150;
  --navy-600: #1B4268;
  --navy-500: #295b8a;

  --gold: #C6A45C;
  --gold-light: #E0C48A;
  --gold-dark: #A98841;
  --gold-glow: rgba(198, 164, 92, 0.2);

  --teal: #0B7A75;
  --teal-light: #14b8a6;
  --teal-glow: rgba(11, 122, 117, 0.15);

  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.12);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);
  --info: #0284c7;
  --info-bg: rgba(2, 132, 199, 0.12);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(7, 23, 41, 0.06);
  --shadow-md: 0 10px 30px rgba(7, 23, 41, 0.08);
  --shadow-lg: 0 20px 50px rgba(7, 23, 41, 0.16);

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --sidebar-w: 260px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  color: var(--slate-800);
  background: var(--slate-100);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

img {
  display: block;
  max-width: 100%;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

/* =========================================================
   LOGIN SCREEN
   ========================================================= */
.login-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at top right, #123150 0%, #071729 60%, #040d18 100%);
  position: relative;
  overflow: hidden;
}

.login-view::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(198, 164, 92, 0.15) 0%, transparent 70%);
  top: -150px;
  right: -150px;
  pointer-events: none;
}

.login-view::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(11, 122, 117, 0.18) 0%, transparent 70%);
  bottom: -150px;
  left: -150px;
  pointer-events: none;
}

.login-card {
  width: 100%;
  max-width: 460px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  padding: 40px;
  position: relative;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.6);
  animation: fadeInScale 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.login-logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--navy-900);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  box-shadow: 0 8px 20px rgba(7, 23, 41, 0.25);
}

.login-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.login-brand-text h2 {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 0.06em;
  color: var(--navy-900);
  line-height: 1.1;
  font-weight: 700;
}

.login-brand-text span {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-dark);
  font-weight: 700;
}

.single-user-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(11, 122, 117, 0.08);
  border: 1px solid rgba(11, 122, 117, 0.25);
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 20px;
}

.login-card h3 {
  font-size: 20px;
  color: var(--navy-900);
  margin-bottom: 6px;
  font-weight: 800;
}

.login-card p.login-sub {
  font-size: 13px;
  color: var(--slate-500);
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--slate-700);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 7px;
}

.input-with-icon {
  position: relative;
}

.input-with-icon input {
  width: 100%;
  height: 48px;
  padding: 0 44px 0 16px;
  background: var(--slate-50);
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--slate-900);
  transition: all 0.2s;
}

.input-with-icon input:focus {
  outline: none;
  border-color: var(--navy-600);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(27, 66, 104, 0.12);
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--slate-400);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
}

.toggle-password:hover {
  color: var(--slate-700);
}

.login-extra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  font-size: 13px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--slate-600);
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--navy-800);
}

.btn-primary {
  width: 100%;
  height: 50px;
  background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-700) 100%);
  color: #ffffff;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(11, 34, 57, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 100%);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(11, 34, 57, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
}

.login-alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.login-alert.danger {
  background: var(--danger-bg);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #b91c1c;
}

.login-alert.success {
  background: var(--success-bg);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #047857;
}

.credential-hint {
  margin-top: 24px;
  padding: 14px;
  background: var(--slate-50);
  border: 1px dashed var(--slate-300);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--slate-600);
}

.credential-hint strong {
  color: var(--navy-900);
}

.quick-fill-btn {
  background: var(--slate-200);
  border: none;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  margin-left: 6px;
  font-weight: 700;
  color: var(--navy-800);
}

.quick-fill-btn:hover {
  background: var(--slate-300);
}

.back-home {
  text-align: center;
  margin-top: 20px;
}

.back-home a {
  font-size: 13px;
  color: var(--slate-500);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.back-home a:hover {
  color: var(--navy-900);
}

/* =========================================================
   PORTAL DASHBOARD LAYOUT (POST-LOGIN)
   ========================================================= */
.admin-app {
  display: flex;
  min-height: 100vh;
  background: #f4f6fa;
}

/* SIDEBAR */
.admin-sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--navy-950) 0%, var(--navy-900) 100%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 4px 0 24px rgba(4, 13, 24, 0.4);
}

.sidebar-header {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border: 1px solid rgba(198, 164, 92, 0.4);
}

.sidebar-brand-text h1 {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.06em;
  color: #ffffff;
  line-height: 1.1;
  font-weight: 700;
}

.sidebar-brand-text span {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-light);
  font-weight: 700;
}

.single-user-pill {
  margin: 16px 16px 8px;
  background: rgba(198, 164, 92, 0.12);
  border: 1px solid rgba(198, 164, 92, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sup-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy-900);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}

.sup-info {
  line-height: 1.2;
  overflow: hidden;
}

.sup-name {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.sup-role {
  font-size: 10px;
  color: var(--gold-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.nav-section-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--slate-400);
  padding: 12px 12px 6px;
  font-weight: 700;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--slate-300);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.sidebar-item svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  flex-shrink: 0;
  color: var(--slate-400);
  transition: color 0.2s;
}

.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.sidebar-item:hover svg {
  color: var(--gold-light);
}

.sidebar-item.active {
  background: linear-gradient(90deg, rgba(198, 164, 92, 0.22) 0%, rgba(198, 164, 92, 0.06) 100%);
  color: #ffffff;
  font-weight: 700;
  border-left: 3px solid var(--gold);
}

.sidebar-item.active svg {
  color: var(--gold);
}

.sidebar-badge {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 800;
}

.badge-amber {
  background: var(--warning);
  color: #000000;
}

.badge-blue {
  background: var(--teal);
  color: #ffffff;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-light);
  padding: 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.2s;
}

.sidebar-link-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  padding: 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #ffffff;
}

/* MAIN CONTENT AREA */
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-x: hidden;
}

/* TOPBAR */
.admin-topbar {
  height: 64px;
  background: #ffffff;
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-title h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--navy-900);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.live-time {
  font-size: 12.5px;
  color: var(--slate-500);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.topbar-btn {
  height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--slate-200);
  background: #ffffff;
  color: var(--slate-700);
}

.topbar-btn:hover {
  background: var(--slate-50);
  border-color: var(--slate-300);
}

.topbar-btn.primary {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: #ffffff;
}

.topbar-btn.primary:hover {
  background: var(--navy-900);
}

/* PAGE WRAPPER */
.admin-content {
  padding: 32px;
  flex: 1;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.25s ease;
}

.tab-pane.active {
  display: block;
}

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

/* =========================================================
   DASHBOARD OVERVIEW METRICS
   ========================================================= */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.kpi-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 22px;
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.kpi-info h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-500);
  margin-bottom: 6px;
  font-weight: 700;
}

.kpi-num {
  font-size: 32px;
  font-weight: 800;
  color: var(--navy-900);
  line-height: 1;
}

.kpi-sub {
  font-size: 11.5px;
  color: var(--slate-400);
  margin-top: 6px;
}

.kpi-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kpi-icon.navy {
  background: rgba(11, 34, 57, 0.08);
  color: var(--navy-800);
}

.kpi-icon.amber {
  background: var(--warning-bg);
  color: #b45309;
}

.kpi-icon.green {
  background: var(--success-bg);
  color: var(--success);
}

.kpi-icon.gold {
  background: rgba(198, 164, 92, 0.15);
  color: var(--gold-dark);
}

/* QUICK ACTION BAR */
.quick-action-strip {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 18px 24px;
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.qas-text h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--navy-900);
}

.qas-text p {
  font-size: 12.5px;
  color: var(--slate-500);
}

.qas-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-pill {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 700;
  border: 1px solid var(--slate-300);
  background: var(--slate-50);
  color: var(--slate-700);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-pill:hover {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: #ffffff;
}

.btn-pill.gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: #ffffff;
  border-color: var(--gold);
}

.btn-pill.gold:hover {
  filter: brightness(1.08);
}

/* =========================================================
   TABLES & CARDS
   ========================================================= */
.panel-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  margin-bottom: 28px;
  overflow: hidden;
}

.panel-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.panel-title-wrap h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--navy-900);
}

.panel-title-wrap p {
  font-size: 12.5px;
  color: var(--slate-500);
  margin-top: 2px;
}

.panel-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  min-width: 240px;
}

.search-box input {
  width: 100%;
  height: 38px;
  padding: 0 14px 0 36px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--slate-900);
}

.search-box input:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--navy-600);
}

.search-box svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--slate-400);
  width: 16px;
  height: 16px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--slate-100);
  padding: 4px;
  border-radius: var(--radius-sm);
}

.filter-btn {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--slate-600);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn.active {
  background: #ffffff;
  color: var(--navy-900);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* DATA TABLE */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}

.data-table th {
  background: var(--slate-50);
  padding: 12px 18px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-500);
  border-bottom: 1px solid var(--slate-200);
  white-space: nowrap;
}

.data-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--slate-200);
  color: var(--slate-700);
  vertical-align: middle;
}

.data-table tbody tr:hover {
  background: rgba(241, 245, 249, 0.6);
}

.patient-cell {
  display: flex;
  flex-direction: column;
}

.patient-name {
  font-weight: 800;
  color: var(--navy-900);
  font-size: 14px;
}

.patient-phone {
  font-size: 12px;
  color: var(--slate-500);
}

/* STATUS PILLS */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-pill.pending {
  background: var(--warning-bg);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-pill.confirmed {
  background: var(--success-bg);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-pill.completed {
  background: rgba(2, 132, 199, 0.12);
  color: #0369a1;
  border: 1px solid rgba(2, 132, 199, 0.3);
}

.status-pill.cancelled {
  background: var(--danger-bg);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.action-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--slate-200);
  background: #ffffff;
  color: var(--slate-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: var(--slate-100);
  color: var(--navy-900);
}

.btn-icon.whatsapp {
  color: #059669;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.btn-icon.whatsapp:hover {
  background: #d1fae5;
}

.btn-icon.call {
  color: #0284c7;
  background: #f0f9ff;
  border-color: #bae6fd;
}

.btn-icon.danger {
  color: #dc2626;
  background: #fef2f2;
  border-color: #fecaca;
}

.btn-icon.danger:hover {
  background: #fee2e2;
}

/* =========================================================
   GRID ITEMS (BLOGS, VIDEOS, GALLERY, FAQS)
   ========================================================= */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
  padding: 24px;
}

.admin-card-item {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.admin-card-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-item-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--slate-900);
  overflow: hidden;
}

.card-item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-item-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 9px;
  background: rgba(7, 23, 41, 0.85);
  backdrop-filter: blur(8px);
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-full);
}

.card-item-meta {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 3px 8px;
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
}

.card-item-body {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-item-body h4 {
  font-size: 15px;
  font-weight: 800;
  color: var(--navy-900);
  margin-bottom: 8px;
  line-height: 1.35;
}

.card-item-body p {
  font-size: 12.5px;
  color: var(--slate-600);
  margin-bottom: 16px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-item-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--slate-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* FAQ LIST IN ADMIN */
.admin-faq-list {
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-faq-card {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.faq-q-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--navy-900);
  margin-bottom: 6px;
}

.faq-q-ans {
  font-size: 13px;
  color: var(--slate-600);
  line-height: 1.5;
}

/* =========================================================
   FORM CONTROLS & MODALS
   ========================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 23, 41, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.modal-overlay.show {
  display: flex;
}

.admin-modal {
  background: #ffffff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 620px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
  border: 1px solid var(--slate-200);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: modalEnter 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalEnter {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--navy-900);
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--slate-400);
  cursor: pointer;
  line-height: 1;
}

.modal-close-btn:hover {
  color: var(--slate-700);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background: var(--slate-50);
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

.modal-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.modal-form-grid .full-w {
  grid-column: 1 / -1;
}

.input-field, .select-field, .textarea-field {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-sm);
  background: var(--slate-50);
  font-size: 13.5px;
  color: var(--slate-900);
  transition: all 0.2s;
}

.input-field:focus, .select-field:focus, .textarea-field:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--navy-600);
  box-shadow: 0 0 0 3px rgba(27, 66, 104, 0.1);
}

.textarea-field {
  min-height: 100px;
  resize: vertical;
}

/* =========================================================
   SETTINGS & SECURITY TABS
   ========================================================= */
.settings-section-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.settings-section-card h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--navy-900);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-section-card p.sub {
  font-size: 13px;
  color: var(--slate-500);
  margin-bottom: 20px;
}

.danger-zone {
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: #fffafa;
}

.danger-zone h3 {
  color: #b91c1c;
}

/* TOAST NOTIFICATION */
.admin-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.admin-toast {
  pointer-events: auto;
  background: var(--navy-900);
  color: #ffffff;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.35);
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 4px solid var(--gold);
  animation: toastSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastSlide {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

.admin-toast.success { border-left-color: var(--success); }
.admin-toast.danger { border-left-color: var(--danger); }
.admin-toast.warning { border-left-color: var(--warning); }

/* MOBILE RESPONSIVENESS */
@media (max-width: 900px) {
  .admin-app {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }
  .sidebar-nav {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    padding: 8px;
  }
  .sidebar-item {
    white-space: nowrap;
  }
  .admin-content {
    padding: 16px;
  }
  .admin-topbar {
    padding: 0 16px;
  }
  .modal-form-grid {
    grid-template-columns: 1fr;
  }
}
