/* ============================================================
   PRIMETOUCH CLEANING — ADMIN PANEL & MODALS (FIXED + DETAIL GRID + BOOKING MODAL)
   ============================================================ */

/* ── MODAL BACKDROP (blur only behind) ────────────────────── */
.modal-backdrop,
.admin-modal-overlay,
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 8, 18, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: var(--z-modal, 2000);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fade-in 0.2s ease-out;
}

/* ── MODAL CONTAINER (crisp, no blur) ─────────────────────── */
.modal,
.admin-modal,
.pt-custom-modal,
#pt-modal .modal-box,
.amodal-box {
  background: var(--bg-card);
  border-radius: 1.25rem;
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-light);
  animation: modal-rise 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  isolation: isolate;
}

.modal-lg {
  max-width: 900px;
}

.modal-sm {
  max-width: 460px;
}

/* Modal header / body / footer */
.modal-header,
.amodal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.25rem;
  border-radius: 0.5rem;
  transition: all 0.15s ease;
}

.modal-close:hover {
  background: var(--error-bg);
  color: var(--error);
  transform: scale(1.05);
}

.modal-body,
.amodal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer,
.amodal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Ensure no blur inside */
.modal-body *,
.amodal-body * {
  filter: none;
  backdrop-filter: none;
}

/* ── Modal body content improvements ──────────────────────── */
.modal-body p {
  margin: 0 0 1rem 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.modal-body p:last-child {
  margin-bottom: 0;
}

.modal-body .text-muted {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.modal-body .note {
  background: var(--gold-muted);
  border-left: 3px solid var(--gold);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-primary);
}

/* Animations */
@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modal-rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive modals */
@media (max-width: 640px) {

  .modal-backdrop,
  .admin-modal-overlay,
  .modal-overlay {
    /* Switch to bottom sheet on mobile */
    align-items: flex-end;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .modal,
  .admin-modal,
  .pt-custom-modal,
  #pt-modal .modal-box,
  .amodal-box {
    max-width: 100%;
    width: 100%;
    max-height: 92dvh;
    max-height: 92vh; /* fallback */
    border-radius: 1.25rem 1.25rem 0 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: modal-rise-mobile 0.28s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  }

  .modal-footer,
  .amodal-footer {
    position: sticky;
    bottom: 0;
    background: var(--bg-card);
    z-index: 2;
    flex-wrap: wrap;
    padding-bottom: max(1rem, env(safe-area-inset-bottom, 1rem));
  }

  .modal-body {
    padding: 1.25rem;
  }

  .modal-header {
    padding: 1rem 1.25rem;
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 2;
    border-bottom: 1px solid var(--border);
  }
}

@keyframes modal-rise-mobile {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── MODAL DETAILS (Table-like structure) ─────────────────── */
.modal-detail-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.modal-detail-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

.modal-detail-row:last-child {
  border-bottom: none;
}

.modal-detail-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-right: 0.5rem;
}

.modal-detail-value {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  word-break: break-word;
}

.modal-detail-section {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 2px solid var(--gold-border);
}

.modal-detail-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

@media (max-width: 540px) {
  .modal-detail-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
    padding: 0.65rem 0;
  }

  .modal-detail-label {
    font-size: 0.65rem;
  }

  .modal-detail-value {
    font-size: 0.85rem;
    padding-left: 0.25rem;
  }
}

/* ── ADMIN KPI CARDS (side by side) ───────────────────────── */
.admin-kpi-row,
#admin-kpis {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 1.5rem !important;
  margin-bottom: 2rem !important;
}

@media (max-width: 900px) {

  .admin-kpi-row,
  #admin-kpis {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 500px) {

  .admin-kpi-row,
  #admin-kpis {
    grid-template-columns: 1fr !important;
  }
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all 0.22s ease;
}

.kpi-card:hover {
  border-color: var(--gold-border);
  transform: translateY(-4px);
  box-shadow: var(--shadow-gold-sm);
}

.kpi-icon {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
  color: var(--gold);
}

.kpi-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.kpi-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.kpi-change {
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.kpi-change.up {
  color: var(--success);
}

.kpi-change.down {
  color: var(--error);
}

/* ── ADMIN TABLES ─────────────────────────────────────────── */
.admin-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
  min-width: 580px;
}

.admin-table th {
  padding: 11px 14px;
  text-align: left;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
}

.admin-table th:hover {
  color: var(--text-secondary);
}

.admin-table th.sorted-asc::after {
  content: ' ↑';
  color: var(--gold);
}

.admin-table th.sorted-desc::after {
  content: ' ↓';
  color: var(--gold);
}

.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: middle;
}

.admin-table tbody tr:hover td {
  background: rgba(201, 168, 76, 0.04);
}

/* Table toolbar */
.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 9px 14px;
  transition: all 0.14s;
}

.admin-search:focus-within {
  border-color: var(--gold-border);
  box-shadow: 0 0 0 3px var(--gold-glow-soft);
}

.admin-search input {
  background: none;
  border: none;
  outline: none;
  font-size: 0.88rem;
  color: var(--text-primary);
  width: 200px;
}

/* Pagination */
.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}

.pagination-btns {
  display: flex;
  gap: 3px;
}

.page-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.14s;
}

.page-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-light);
}

.page-btn.active {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
  font-weight: 700;
}

.page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Empty state */
.admin-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}

/* ── ADMIN FILTER TABS ────────────────────────────────────── */
.admin-filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.admin-filter-tab {
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  border: 1.5px solid var(--border-light);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.14s;
}

.admin-filter-tab:hover {
  border-color: var(--gold-border);
  color: var(--gold);
  background: var(--gold-muted);
}

.admin-filter-tab.active {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}

/* ── ACTION BUTTONS ───────────────────────────────────────── */
.row-actions {
  display: flex;
  gap: 5px;
  justify-content: flex-end;
}

.btn-icon-sm {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.14s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon-sm.edit:hover {
  background: var(--info-bg);
  color: var(--info);
  border-color: var(--info-border);
}

.btn-icon-sm.delete:hover {
  background: var(--error-bg);
  color: var(--error);
  border-color: var(--error-border);
}

.btn-icon-sm.view:hover {
  background: var(--gold-muted);
  color: var(--gold);
  border-color: var(--gold-border);
}

/* ── STATUS PILLS ─────────────────────────────────────────── */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: capitalize;
  border: 1px solid transparent;
}

.status-pill::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.pill-confirmed {
  background: var(--info-bg);
  color: var(--info);
  border-color: var(--info-border);
}

.pill-completed {
  background: var(--success-bg);
  color: var(--success);
  border-color: var(--success-border);
}

.pill-pending {
  background: var(--warning-bg);
  color: var(--warning);
  border-color: var(--warning-border);
}

.pill-cancelled {
  background: var(--error-bg);
  color: var(--error);
  border-color: var(--error-border);
}

.pill-active {
  background: var(--success-bg);
  color: var(--success);
}

.pill-inactive {
  background: var(--error-bg);
  color: var(--error);
}

/* ── USER / AGENT CARDS ───────────────────────────────────── */
.agent-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.agent-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 0.14s;
}

.agent-card:hover {
  border-color: var(--gold-border);
  transform: translateX(3px);
}

.agent-avatar {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: var(--navy);
  font-weight: 700;
  font-size: 0.83rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.agent-info {
  flex: 1;
}

.agent-name {
  font-weight: 600;
}

.agent-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.agent-rating {
  font-size: 0.75rem;
  color: var(--gold);
}

/* ── TOGGLE SWITCH ────────────────────────────────────────── */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
}

.toggle-switch input {
  display: none;
}

.toggle-track {
  position: absolute;
  inset: 0;
  border-radius: 11px;
  background: var(--border-mid);
  cursor: pointer;
  transition: background 0.14s;
}

.toggle-switch input:checked+.toggle-track {
  background: var(--success);
}

.toggle-track::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toggle-switch input:checked+.toggle-track::after {
  transform: translateX(16px);
}

/* ── ACTIVITY FEED ────────────────────────────────────────── */
.activity-feed {
  display: flex;
  flex-direction: column;
}

.activity-item {
  display: flex;
  gap: 1rem;
  padding: 0.75rem 0;
  position: relative;
}

.activity-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 28px;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--border), transparent);
}

.activity-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--bg-card);
  flex-shrink: 0;
  margin-top: 4px;
  box-shadow: 0 0 0 3px var(--gold-muted);
}

.activity-content {
  flex: 1;
}

.activity-text {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.activity-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ── RESPONSIVE ADMIN ─────────────────────────────────────── */
@media (max-width: 768px) {
  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-search input {
    width: 100%;
  }

  .admin-pagination {
    flex-direction: column;
    align-items: flex-start;
  }

  .row-actions {
    justify-content: flex-start;
  }
}

/* Light mode adjustments */
[data-theme="light"] .modal {
  background: #ffffff;
  border-color: rgba(140, 100, 40, 0.2);
}

[data-theme="light"] .admin-table th {
  background: #f7f2e8;
}

[data-theme="light"] .admin-table tbody tr:hover td {
  background: rgba(184, 145, 31, 0.05);
}

[data-theme="light"] .status-pill {
  background: #fef9e6;
}

[data-theme="light"] .agent-card {
  background: #ffffff;
}

/* ============================================================
   ── BOOKING MODAL SPECIFIC STYLES (improved layout) ────────
   ============================================================ */

/* Booking detail grid (two-column layout) */
.booking-detail-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  margin-bottom: 1.5rem;
}

.booking-detail-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

.booking-detail-row:last-child {
  border-bottom: none;
}

.booking-detail-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.9;
}

.booking-detail-value {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  word-break: break-word;
}

/* Booking sections (grouping) */
.booking-section {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.booking-section:first-of-type {
  margin-top: 0;
  border-top: none;
}

.booking-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.booking-section-title::before {
  content: '';
  width: 4px;
  height: 16px;
  background: var(--gold);
  border-radius: 2px;
  display: inline-block;
}

/* Service items list (inside modal) */
.booking-service-list {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  margin-top: 0.5rem;
}

.booking-service-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.booking-service-item:last-child {
  border-bottom: none;
}

.booking-service-name {
  font-weight: 600;
  color: var(--text-primary);
}

.booking-service-price {
  color: var(--gold);
  font-weight: 600;
}

/* Add-ons list (compact) */
.booking-addons-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.booking-addon-tag {
  background: var(--gold-muted);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-pill);
  padding: 0.2rem 0.7rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gold);
}

/* Payment summary */
.booking-payment-summary {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-top: 0.5rem;
}

.payment-row {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  font-size: 0.85rem;
}

.payment-row.total {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 2px solid var(--gold-border);
  font-weight: 700;
  font-size: 1rem;
  color: var(--gold);
}

.payment-row.discount {
  color: var(--success);
}

/* Status badge inside modal (enlarged for visibility) */
.modal-body .status-pill {
  font-size: 0.75rem;
  padding: 4px 12px;
}

/* Notes / special requests */
.booking-notes {
  background: var(--gold-muted);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Customer contact row (phone, email) */
.booking-contact-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.booking-contact-icon {
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Responsive: stack labels on small screens */
@media (max-width: 540px) {
  .booking-detail-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
    padding: 0.6rem 0;
  }

  .booking-detail-label {
    font-size: 0.65rem;
  }

  .booking-service-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}

/* ============================================================
   ADMIN PANEL HEADERS & REFRESH BUTTONS (fixed positioning)
   ============================================================ */

/* Panel header wrapper */
.dash-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.dash-page-header h2,
.dash-page-header .section-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.dash-page-header .section-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Button group inside header */
.dash-page-header .btn-group {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* Refresh button (always visible, no hidden class) */
.refresh-panel,
.btn-refresh {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.4rem 0.8rem;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.14s;
}

.refresh-panel:hover,
.btn-refresh:hover {
  background: var(--gold-muted);
  border-color: var(--gold-border);
  color: var(--gold);
}

/* Toolbar improvements */
.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  background: var(--bg-secondary);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.admin-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.4rem 0.8rem;
}

.panel-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.message-row-unread td {
  background: rgba(212, 175, 55, 0.06);
}

.message-detail {
  display: grid;
  gap: 1rem;
}

.message-contact {
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
}

.message-meta {
  max-height: 220px;
  overflow: auto;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.admin-search input {
  background: none;
  border: none;
  outline: none;
  font-size: 0.85rem;
  color: var(--text-primary);
  min-width: 200px;
}

.admin-search span {
  color: var(--text-muted);
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .dash-page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-search input {
    width: 100%;
  }
}

/* Remove hidden class from refresh buttons – they should always be visible */
.refresh-panel.hidden {
  display: inline-flex !important;
  /* override if some script hides it */
}
