/* ============================================
   MOTO ON — Admin Panel Styles
   Dark theme with red accents (#c41e2a)
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  --admin-bg: #0a0a0a;
  --admin-sidebar: #111111;
  --admin-card: #141414;
  --admin-input: #1a1a1a;
  --admin-border: #2a2a2a;
  --admin-red: #c41e2a;
  --admin-red-hover: #a8182e;
  --admin-red-light: rgba(196, 30, 42, 0.15);
  --admin-text: #f0f0f0;
  --admin-text-muted: #888888;
  --admin-success: #28a745;
  --admin-warning: #ffc107;
  --admin-danger: #dc3545;
  --admin-info: #17a2b8;
  --sidebar-width: 250px;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.admin-body {
  font-family: 'Inter', sans-serif;
  background-color: var(--admin-bg);
  color: var(--admin-text);
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  letter-spacing: 0.5px;
}

a {
  color: var(--admin-red);
  text-decoration: none;
}

a:hover {
  color: var(--admin-red-hover);
}

/* ---------- Admin Layout ---------- */
.admin-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.admin-sidebar {
  width: var(--sidebar-width);
  background-color: var(--admin-sidebar);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  border-right: 1px solid var(--admin-border);
  transition: transform 0.3s ease;
}

.sidebar-logo {
  padding: 24px 20px;
  border-bottom: 1px solid var(--admin-border);
  text-align: center;
}

.sidebar-logo h2 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.6rem;
  color: var(--admin-red);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.sidebar-logo span {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  color: var(--admin-text-muted);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-top: 4px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 0;
  overflow-y: auto;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--admin-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}

.sidebar-nav a:hover {
  color: var(--admin-text);
  background-color: rgba(255, 255, 255, 0.04);
}

.sidebar-nav a.active {
  color: var(--admin-red);
  border-left-color: var(--admin-red);
  background-color: var(--admin-red-light);
}

.sidebar-nav a .nav-icon {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--admin-border);
}

.sidebar-footer .admin-name {
  font-size: 0.8rem;
  color: var(--admin-text-muted);
  margin-bottom: 10px;
  display: block;
}

.sidebar-footer .btn-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: transparent;
  border: 1px solid var(--admin-border);
  color: var(--admin-text-muted);
  font-size: 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
}

.sidebar-footer .btn-logout:hover {
  border-color: var(--admin-danger);
  color: var(--admin-danger);
  background: rgba(220, 53, 69, 0.1);
}

/* Sidebar Collapse Button */
.sidebar-collapse-btn {
  position: absolute;
  top: 50%;
  right: -15px;
  width: 30px;
  height: 30px;
  background: var(--admin-red);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1001;
  transform: translateY(-50%);
  border: 2px solid var(--admin-border);
  transition: all 0.3s ease;
  font-size: 12px;
}

body.sidebar-collapsed .admin-sidebar {
  transform: translateX(-100%);
}
body.sidebar-collapsed .admin-content {
  margin-left: 0;
  transition: margin-left 0.3s ease;
}
.admin-content {
  transition: margin-left 0.3s ease;
}
body.sidebar-collapsed .sidebar-collapse-btn {
  right: -30px;
  transform: translateY(-50%) rotate(180deg);
}

/* Mobile sidebar toggle */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 1100;
  background: var(--admin-sidebar);
  border: 1px solid var(--admin-border);
  color: var(--admin-text);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.2rem;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999;
}

/* ---------- Content Area ---------- */
.admin-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 32px;
  min-height: 100vh;
}

.content-header {
  margin-bottom: 32px;
}

.content-header h1 {
  font-size: 1.8rem;
  margin-bottom: 4px;
}

.content-header p {
  color: var(--admin-text-muted);
  font-size: 0.9rem;
}

/* ---------- Cards & Panels ---------- */
.admin-card {
  background-color: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
}

.admin-card.red-border {
  border-left: 3px solid var(--admin-red);
}

.admin-card h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: var(--admin-text);
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background-color: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  transition: border-color 0.2s ease;
}

.stat-card:hover {
  border-color: var(--admin-red);
}

.stat-card .stat-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.stat-card .stat-number {
  font-family: 'Oswald', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--admin-red);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--admin-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ---------- Quick Actions ---------- */
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

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

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table thead {
  background-color: var(--admin-red);
}

.admin-table thead th {
  padding: 12px 16px;
  text-align: left;
  font-family: 'Oswald', sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.8rem;
  color: #fff;
}

.admin-table tbody tr {
  border-bottom: 1px solid var(--admin-border);
  transition: background-color 0.15s ease;
}

.admin-table tbody tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.02);
}

.admin-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.admin-table tbody td {
  padding: 12px 16px;
  color: var(--admin-text);
}

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-published {
  background-color: rgba(40, 167, 69, 0.15);
  color: var(--admin-success);
  border: 1px solid rgba(40, 167, 69, 0.3);
}

.badge-draft {
  background-color: rgba(136, 136, 136, 0.15);
  color: var(--admin-text-muted);
  border: 1px solid rgba(136, 136, 136, 0.3);
}

.badge-active {
  background-color: rgba(40, 167, 69, 0.15);
  color: var(--admin-success);
  border: 1px solid rgba(40, 167, 69, 0.3);
}

.badge-inactive {
  background-color: rgba(220, 53, 69, 0.15);
  color: var(--admin-danger);
  border: 1px solid rgba(220, 53, 69, 0.3);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--admin-red);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--admin-red-hover);
  color: #fff;
}

.btn-secondary {
  background-color: transparent;
  color: var(--admin-text);
  border: 1px solid var(--admin-border);
}

.btn-secondary:hover {
  border-color: var(--admin-text-muted);
  background-color: rgba(255, 255, 255, 0.05);
}

.btn-danger {
  background-color: transparent;
  color: var(--admin-danger);
  border: 1px solid rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
  background-color: rgba(220, 53, 69, 0.1);
  border-color: var(--admin-danger);
}

.btn-success {
  background-color: var(--admin-success);
  color: #fff;
}

.btn-success:hover {
  background-color: #218838;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.78rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn .spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ---------- Form Elements ---------- */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--admin-text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background-color: var(--admin-input);
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  color: var(--admin-text);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  transition: border-color 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--admin-red);
  box-shadow: 0 0 0 3px var(--admin-red-light);
}

.form-control::placeholder {
  color: #555;
}

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

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23888' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--admin-border);
  border-radius: 26px;
  transition: 0.3s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  border-radius: 50%;
  transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--admin-red);
}

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

/* File Upload Area */
.upload-zone {
  border: 2px dashed var(--admin-border);
  border-radius: 8px;
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--admin-input);
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--admin-red);
  background: var(--admin-red-light);
}

.upload-zone .upload-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.upload-zone .upload-text {
  font-size: 0.95rem;
  color: var(--admin-text-muted);
  margin-bottom: 4px;
}

.upload-zone .upload-hint {
  font-size: 0.8rem;
  color: #555;
}

/* Image Preview */
.image-preview {
  max-width: 300px;
  max-height: 200px;
  border-radius: 6px;
  border: 1px solid var(--admin-border);
  margin-top: 10px;
}

/* Progress Bar */
.progress-bar-container {
  width: 100%;
  background: var(--admin-border);
  border-radius: 4px;
  height: 6px;
  margin-top: 12px;
  overflow: hidden;
  display: none;
}

.progress-bar-fill {
  height: 100%;
  background: var(--admin-red);
  border-radius: 4px;
  width: 0%;
  transition: width 0.3s ease;
}

/* ---------- Gallery Grid ---------- */
.gallery-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.gallery-admin-item {
  position: relative;
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  overflow: hidden;
}

.gallery-admin-item img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.gallery-admin-item .item-info {
  padding: 10px 12px;
}

.gallery-admin-item .item-info .item-name {
  font-size: 0.8rem;
  color: var(--admin-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

.gallery-admin-item .item-info .item-date {
  font-size: 0.72rem;
  color: #555;
  margin-bottom: 8px;
}

.gallery-admin-item .btn-delete-img {
  width: 100%;
}

/* ---------- Quill Editor Overrides (Dark Theme) ---------- */
.ql-toolbar.ql-snow {
  background-color: var(--admin-sidebar) !important;
  border: 1px solid var(--admin-border) !important;
  border-radius: 8px 8px 0 0 !important;
}

.ql-container.ql-snow {
  border: 1px solid var(--admin-border) !important;
  border-top: none !important;
  border-radius: 0 0 8px 8px !important;
  background-color: var(--admin-input) !important;
  font-family: 'Inter', sans-serif !important;
}

.ql-editor {
  min-height: 300px;
  color: var(--admin-text) !important;
  font-size: 0.95rem !important;
  line-height: 1.7 !important;
}

.ql-editor.ql-blank::before {
  color: #555 !important;
  font-style: italic !important;
}

/* Quill toolbar icons — make them white */
.ql-snow .ql-stroke {
  stroke: #ccc !important;
}

.ql-snow .ql-fill,
.ql-snow .ql-stroke.ql-fill {
  fill: #ccc !important;
}

.ql-snow .ql-picker {
  color: #ccc !important;
}

.ql-snow .ql-picker-label::before {
  color: #ccc !important;
}

.ql-snow .ql-picker-options {
  background-color: var(--admin-sidebar) !important;
  border-color: var(--admin-border) !important;
}

.ql-snow .ql-picker-item {
  color: #ccc !important;
}

.ql-snow .ql-picker-item:hover {
  color: var(--admin-red) !important;
}

/* Active toolbar buttons */
.ql-snow .ql-active .ql-stroke {
  stroke: var(--admin-red) !important;
}

.ql-snow .ql-active .ql-fill,
.ql-snow .ql-active .ql-stroke.ql-fill {
  fill: var(--admin-red) !important;
}

.ql-snow .ql-active {
  color: var(--admin-red) !important;
}

.ql-snow .ql-picker-label:hover .ql-stroke {
  stroke: var(--admin-red) !important;
}

.ql-snow button:hover .ql-stroke {
  stroke: var(--admin-red) !important;
}

.ql-snow button:hover .ql-fill {
  fill: var(--admin-red) !important;
}

/* Quill tooltip (link dialog) */
.ql-snow .ql-tooltip {
  background-color: var(--admin-card) !important;
  border: 1px solid var(--admin-border) !important;
  color: var(--admin-text) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

.ql-snow .ql-tooltip input[type="text"] {
  background-color: var(--admin-input) !important;
  color: var(--admin-text) !important;
  border: 1px solid var(--admin-border) !important;
}

.ql-snow .ql-tooltip a {
  color: var(--admin-red) !important;
}

/* ---------- Notification Toast ---------- */
.notification-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notification {
  padding: 14px 20px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #fff;
  min-width: 280px;
  max-width: 400px;
  animation: slideIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.notification.success {
  background-color: var(--admin-success);
}

.notification.error {
  background-color: var(--admin-danger);
}

.notification.info {
  background-color: var(--admin-info);
}

.notification.fadeOut {
  animation: slideOut 0.3s ease forwards;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

/* ---------- Confirm Dialog ---------- */
.confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
}

.confirm-dialog {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 32px;
  max-width: 400px;
  width: 90%;
  text-align: center;
}

.confirm-dialog p {
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.confirm-dialog .confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 32px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-content h3 {
  margin-bottom: 20px;
  font-size: 1.2rem;
}

/* ---------- Login Page ---------- */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background-color: var(--admin-bg);
  background-image:
    radial-gradient(rgba(196, 30, 42, 0.05) 1px, transparent 1px),
    radial-gradient(rgba(196, 30, 42, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
}

.login-card {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
}

.login-card .login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-card .login-logo h1 {
  font-family: 'Oswald', sans-serif;
  font-size: 2.2rem;
  color: var(--admin-red);
  text-transform: uppercase;
  letter-spacing: 3px;
}

.login-card .login-logo p {
  color: var(--admin-text-muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

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

.login-card .btn-primary {
  width: 100%;
  padding: 12px;
  font-size: 0.95rem;
  margin-top: 8px;
}

/* ---------- Recent Posts List ---------- */
.recent-list {
  list-style: none;
}

.recent-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--admin-border);
}

.recent-list li:last-child {
  border-bottom: none;
}

.recent-list .post-title {
  font-weight: 500;
  color: var(--admin-text);
}

.recent-list .post-date {
  font-size: 0.8rem;
  color: var(--admin-text-muted);
}

/* ---------- Editor Section ---------- */
.editor-section {
  display: none;
}

.editor-section.active {
  display: block;
}

.list-section {
  display: block;
}

.list-section.hidden {
  display: none;
}

/* ---------- Actions Cell ---------- */
.actions-cell {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ---------- Social Links List (About Page) ---------- */
.social-inputs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* ---------- Support Links List ---------- */
.support-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px;
  background: var(--admin-input);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  margin-bottom: 12px;
}

.support-item-info {
  flex: 1;
}

.support-item-info h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.support-item-info .support-url {
  font-size: 0.8rem;
  color: var(--admin-text-muted);
  word-break: break-all;
}

.support-item-info .support-desc {
  font-size: 0.85rem;
  color: var(--admin-text-muted);
  margin-top: 6px;
}

.support-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  margin-left: 16px;
}

/* ---------- Users List ---------- */
.user-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--admin-input);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  margin-bottom: 12px;
}

.user-item-info h4 {
  font-size: 1rem;
  margin-bottom: 2px;
}

.user-item-info p {
  font-size: 0.8rem;
  color: var(--admin-text-muted);
}

/* ---------- Empty State ---------- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--admin-text-muted);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 0.9rem;
}

/* ---------- Loading Spinner ---------- */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

.loading-spinner::after {
  content: '';
  width: 32px;
  height: 32px;
  border: 3px solid var(--admin-border);
  border-top-color: var(--admin-red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .sidebar-toggle {
    display: block;
  }

  .admin-sidebar {
    transform: translateX(-100%);
  }

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

  .sidebar-overlay.active {
    display: block;
  }

  .admin-content {
    margin-left: 0;
    padding: 20px;
    padding-top: 64px;
  }

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

  .gallery-admin-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .admin-table {
    font-size: 0.8rem;
  }

  .admin-table thead th,
  .admin-table tbody td {
    padding: 8px 10px;
  }

  .quick-actions {
    flex-direction: column;
  }

  .quick-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .support-item {
    flex-direction: column;
  }

  .support-item-actions {
    margin-left: 0;
    margin-top: 12px;
  }
}

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

  .login-card {
    padding: 24px;
  }

  .content-header h1 {
    font-size: 1.4rem;
  }
}
