/* ===================================================================
   ADMIN PANEL CSS (MINI-WORDPRESS CMS) - L2BLADE DARK GRAPHITE & STEEL
   =================================================================== */

:root {
  --admin-bg: #0c0d10;
  --admin-sidebar-bg: #101319;
  --admin-card-bg: #141820;
  --admin-input-bg: #181d26;
  
  --primary: #374151;
  --primary-light: #4b5563;
  --primary-lighter: #9ca3af;
  --primary-glow: rgba(148, 163, 184, 0.35);
  
  --border-color: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(156, 163, 175, 0.45);
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  
  --font-sans: 'Sora', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  background-color: var(--admin-bg);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
}

/* ===================================================================
   ADMIN LOGIN VIEW
   =================================================================== */
.admin-login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
  background-image: 
    radial-gradient(circle at 50% 20%, rgba(75, 85, 99, 0.25), transparent 50%),
    radial-gradient(circle at 10% 80%, rgba(31, 41, 55, 0.2), transparent 40%);
}

.login-card {
  background: var(--admin-card-bg);
  border: 1px solid var(--border-hover);
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  padding: 2.75rem 2.25rem;
  text-align: center;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 35px var(--primary-glow);
}

.login-crest {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(75, 85, 99, 0.25);
  border: 1px solid var(--primary-light);
  color: var(--primary-lighter);
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem auto;
  box-shadow: 0 0 20px var(--primary-glow);
}

.login-card h2 {
  font-size: 1.6rem;
  margin-bottom: 0.35rem;
  color: #fff;
}

.login-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

.login-footer-hint {
  background: rgba(55, 65, 81, 0.2);
  border: 1px solid rgba(156, 163, 175, 0.25);
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 0.82rem;
  color: #e5e7eb;
  margin-top: 1.75rem;
  text-align: left;
}

.btn-back-home {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s;
}

.btn-back-home:hover {
  color: var(--primary-lighter);
}

/* ===================================================================
   ADMIN LAYOUT & SIDEBAR
   =================================================================== */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 270px;
  background: var(--admin-sidebar-bg);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-logo-img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--primary-light);
  object-fit: cover;
}

.sidebar-title-col {
  display: flex;
  flex-direction: column;
}

.sidebar-title {
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff;
  letter-spacing: 0.05em;
}

.sidebar-badge {
  font-size: 0.7rem;
  color: var(--primary-lighter);
  font-weight: 600;
}

.sidebar-user-card {
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(75, 85, 99, 0.12);
  border-bottom: 1px solid var(--border-color);
}

.user-avatar-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

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

.user-info strong {
  font-size: 0.9rem;
  color: #fff;
}

.user-info span {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Sidebar Menu */
.sidebar-menu {
  padding: 1.25rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex-grow: 1;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.menu-item i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

.menu-item:hover {
  color: #fff;
  background: rgba(75, 85, 99, 0.2);
}

.menu-item.active {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
  font-weight: 600;
}

.sidebar-footer {
  padding: 1.25rem;
  border-top: 1px solid var(--border-color);
}

/* ===================================================================
   MAIN CONTENT & TOPBAR
   =================================================================== */
.admin-main {
  margin-left: 270px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-topbar {
  height: 70px;
  background: rgba(16, 19, 25, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

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

.topbar-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
}

.mobile-sidebar-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  font-size: 1.1rem;
  cursor: pointer;
}

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

.save-status-indicator {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.admin-body {
  padding: 2.25rem;
}

.admin-tab-pane {
  display: none;
}

.admin-tab-pane.active {
  display: block;
  animation: fadeIn 0.25s ease-out;
}

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

/* ===================================================================
   ADMIN CARDS & FORMS
   =================================================================== */
.admin-card {
  background: var(--admin-card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.card-header {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.card-header h3 {
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 0.25rem;
}

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

.card-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: flex-end;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Welcome Banner */
.welcome-banner {
  background: linear-gradient(135deg, rgba(55, 65, 81, 0.4) 0%, rgba(20, 24, 32, 0.95) 100%);
  border: 1px solid var(--border-hover);
  border-radius: 12px;
  padding: 1.75rem 2rem;
  margin-bottom: 2rem;
}

.welcome-banner h3 {
  font-size: 1.35rem;
  margin-bottom: 0.4rem;
}

.welcome-banner p {
  color: #d1d5db;
  font-size: 0.92rem;
  max-width: 820px;
  line-height: 1.6;
}

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

.stat-box {
  background: var(--admin-card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.4rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.stat-icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.bg-purple, .bg-steel { background: rgba(75, 85, 99, 0.35); color: #e5e7eb; }
.bg-emerald { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.bg-amber { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.bg-blue { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }

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

.stat-num {
  font-size: 1.6rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}

/* Quick Actions */
.quick-actions-card {
  background: var(--admin-card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.quick-actions-card h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.quick-buttons-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* Form Controls */
.form-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #e5e7eb;
}

.form-group input,
.form-group textarea,
.form-group select {
  background: var(--admin-input-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 10px var(--primary-glow);
}

.hint {
  font-size: 0.76rem;
  color: var(--text-dim);
}

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

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

/* Image settings */
.image-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.image-box {
  background: rgba(10, 6, 18, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.5rem;
}

.img-preview-box {
  width: 100%;
  height: 180px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  margin-top: 0.75rem;
  background: #000;
}

.img-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-preview-box.logo-preview {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.img-preview-box.logo-preview img {
  width: 110px;
  height: 110px;
  object-fit: contain;
}

/* Color Picker */
.color-picker-box {
  background: rgba(10, 6, 18, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.5rem;
}

.color-picker-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

.color-input {
  width: 60px;
  height: 45px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
}

.color-preset-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.color-preset {
  padding: 0.45rem 1rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
}

.color-preset:hover {
  transform: translateY(-2px);
}

/* Switch toggle */
.switch-group {
  background: rgba(10, 6, 18, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.25rem;
}

.switch-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
}

.switch-checkbox {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.switch-slider {
  width: 48px;
  height: 26px;
  background-color: #374151;
  border-radius: 34px;
  position: relative;
  transition: .3s;
}

.switch-slider:before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: .3s;
}

.switch-checkbox:checked + .switch-slider {
  background-color: #10b981;
}

.switch-checkbox:checked + .switch-slider:before {
  transform: translateX(22px);
}

.switch-text {
  font-size: 1rem;
  font-weight: 600;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th {
  padding: 0.9rem 1.25rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.admin-table td {
  padding: 0.9rem 1.25rem;
  font-size: 0.88rem;
  color: #e5e7eb;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.admin-table tr:hover td {
  background: rgba(75, 85, 99, 0.15);
}

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

.search-box i {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}

.search-box input {
  width: 100%;
  padding-left: 2.25rem;
  padding-right: 0.75rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  background: var(--admin-input-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: #fff;
  font-size: 0.85rem;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.badge-primary, .badge-steel { background: rgba(75, 85, 99, 0.35); color: #e5e7eb; }
.badge-warning { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary-light);
}

.btn-primary:hover {
  background: var(--primary-light);
  box-shadow: 0 0 15px var(--primary-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-color);
  color: #d1d5db;
}

.btn-outline:hover {
  border-color: var(--primary-light);
  color: #fff;
  background: rgba(75, 85, 99, 0.25);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.btn-danger:hover {
  background: #dc2626;
  color: #fff;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
}

.btn-block {
  width: 100%;
}

.text-right {
  text-align: right;
}

.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.text-emerald-400 { color: #34d399; }
.text-purple-400, .text-steel-400 { color: #9ca3af; }

.d-none { display: none !important; }

/* Toast */
.admin-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #10b981;
  color: #fff;
  padding: 0.85rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 99999;
  animation: slideUp 0.3s ease-out;
}

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

/* Modals */
.admin-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 2, 7, 0.85);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
}

.admin-modal-backdrop.active {
  display: flex;
}

.admin-modal-card {
  background: var(--admin-card-bg);
  border: 1px solid var(--border-hover);
  border-radius: 12px;
  width: 100%;
  max-width: 620px;
  padding: 2.25rem;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 15px 40px rgba(0,0,0,0.8);
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
}

.modal-close-btn:hover {
  color: #fff;
}

.modal-footer {
  margin-top: 1.75rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ===================================================================
   BACKUP & RESTORE STYLES
   =================================================================== */
.backup-buttons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.backup-option-box {
  background: rgba(18, 22, 30, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.backup-option-box:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.backup-option-box .option-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(75, 85, 99, 0.25);
  border: 1px solid var(--primary-light);
  color: var(--primary-lighter);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.backup-option-box h5 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.backup-option-box p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.restore-warning-note {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  color: #fde68a;
  margin-top: 1rem;
}

.migration-help-box {
  background: rgba(18, 22, 30, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem 2rem;
}

.migration-help-box h4 {
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}

.migration-help-box ol {
  padding-left: 1.25rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.migration-help-box code {
  background: rgba(0, 0, 0, 0.5);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  color: var(--primary-lighter);
  font-family: var(--font-mono);
}

.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1.5rem; }

/* ===================================================================
   DYNAMIC CARD & LINK EDITORS
   =================================================================== */
.card-editor-item {
  background: rgba(18, 22, 30, 0.75);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.4rem;
  margin-bottom: 1.25rem;
  transition: border-color 0.2s ease;
}

.card-editor-item:hover {
  border-color: var(--border-hover);
}

.card-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.card-editor-header h4 {
  font-size: 1.05rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.links-editor-box {
  background: rgba(12, 14, 18, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
}

.link-row-item {
  display: grid;
  grid-template-columns: 140px 1fr 130px 42px;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 0.65rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.link-row-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.perk-row-item {
  display: grid;
  grid-template-columns: 170px 1fr 1fr 42px;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 0.65rem;
  padding: 0.75rem;
  background: rgba(12, 14, 18, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}
.mb-4 { margin-bottom: 1.5rem; }

/* ===================================================================
   RESPONSIVE DESIGN FOR ADMIN PANEL
   =================================================================== */

/* Backdrop overlay */
.admin-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4, 2, 7, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 95;
}

.admin-sidebar-backdrop.active {
  display: block;
}

@media (max-width: 992px) {
  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.7);
  }

  .admin-sidebar.open {
    transform: translateX(0);
  }

  .admin-main {
    margin-left: 0;
  }

  .mobile-sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .form-grid-2 {
    grid-template-columns: 1fr;
  }

  .stats-overview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .admin-topbar {
    padding: 0 1rem;
    height: 60px;
  }

  .topbar-title {
    font-size: 1.1rem;
  }

  .admin-body {
    padding: 1.5rem 1rem;
  }

  .admin-card {
    padding: 1.5rem 1.25rem;
    margin-bottom: 1.5rem;
  }

  .card-header h3 {
    font-size: 1.15rem;
  }

  .welcome-banner {
    padding: 1.25rem 1rem;
    margin-bottom: 1.5rem;
  }

  .welcome-banner h3 {
    font-size: 1.2rem;
  }

  .welcome-banner p {
    font-size: 0.88rem;
  }

  .search-box {
    width: 100%;
  }

  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-table th,
  .admin-table td {
    padding: 0.75rem 0.65rem;
    font-size: 0.82rem;
  }
}

@media (max-width: 576px) {
  .admin-topbar {
    padding: 0 0.75rem;
  }

  .save-status-indicator {
    display: none; /* Keep clean on small mobile header */
  }

  .topbar-right .btn {
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
  }

  .admin-body {
    padding: 1rem 0.65rem;
  }

  .admin-card {
    padding: 1.25rem 0.85rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
  }

  .stats-overview-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
    margin-bottom: 1.25rem;
  }

  .stat-box {
    padding: 0.85rem 0.65rem;
    gap: 0.65rem;
  }

  .stat-icon-wrap {
    width: 38px;
    height: 38px;
    font-size: 1.15rem;
  }

  .stat-meta {
    font-size: 0.72rem;
  }

  .stat-num {
    font-size: 1.25rem;
  }

  .login-card {
    padding: 1.75rem 1.25rem;
    border-radius: 14px;
  }

  .login-crest {
    width: 50px;
    height: 50px;
    font-size: 1.4rem;
    margin-bottom: 1rem;
  }

  .login-card h2 {
    font-size: 1.35rem;
  }

  .login-desc {
    font-size: 0.82rem;
    margin-bottom: 1.25rem;
  }

  .card-footer {
    flex-direction: column-reverse;
    gap: 0.65rem;
  }

  .card-footer .btn {
    width: 100%;
  }

  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="number"],
  textarea,
  select {
    font-size: 16px !important;
  }
}

@media (max-width: 360px) {
  .stats-overview-grid {
    grid-template-columns: 1fr;
  }
}

/* Password Management UI */
.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-input-wrap input {
  padding-right: 2.75rem !important;
  width: 100%;
}

.password-toggle-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
  z-index: 2;
}

.password-toggle-btn:hover {
  color: #ffffff;
}

.row-highlight-me {
  background: rgba(55, 65, 81, 0.25) !important;
  border-left: 3px solid #9ca3af;
}

.user-highlight-badge {
  background: rgba(55, 65, 81, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-xs {
  font-size: 0.75rem;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
}

