/* ========================================================
   ADHVI BRIDAL STUDIO — ADMIN DASHBOARD LUXURY STYLESHEET
   Responsive for Laptop, Tablet, & Mobile Phones
   ======================================================== */

:root {
  --admin-bg: #0F090C;
  --admin-surface: #1B1015;
  --admin-surface-alt: #26161E;
  --admin-border: rgba(212, 175, 55, 0.18);
  --admin-border-focus: rgba(212, 175, 55, 0.55);
  --admin-gold: #D4AF37;
  --admin-gold-light: #F4E4A6;
  --admin-gold-dark: #997819;
  --admin-primary: #801838;
  --admin-primary-light: #A5244C;
  --admin-text: #F8F3EC;
  --admin-text-muted: #B8A89F;
  --admin-danger: #E63946;
  --admin-success: #2A9D8F;
  --admin-warning: #E76F51;
  --admin-radius: 12px;
  --admin-radius-sm: 8px;
  --admin-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  --sidebar-w: 260px;
}

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

body {
  background-color: var(--admin-bg);
  color: var(--admin-text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

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

/* LAYOUT CONTAINER */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */
.admin-sidebar {
  width: var(--sidebar-w);
  background: var(--admin-surface);
  border-right: 1px solid var(--admin-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-brand {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--admin-border);
}

.brand-logo-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--admin-gold);
}

.brand-text h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--admin-gold);
  line-height: 1;
}

.brand-text .est-badge {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--admin-gold-light);
  font-weight: 600;
  margin-top: 3px;
  text-transform: uppercase;
}

.brand-text .portal-title {
  display: block;
  font-size: 0.7rem;
  color: var(--admin-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: var(--admin-radius-sm);
  color: var(--admin-text-muted);
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

.nav-item svg {
  flex-shrink: 0;
}

.nav-item:hover {
  background: var(--admin-surface-alt);
  color: var(--admin-gold-light);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(128, 24, 56, 0.45), rgba(212, 175, 55, 0.15));
  color: #fff;
  border-left: 3px solid var(--admin-gold);
  font-weight: 600;
}

.nav-badge {
  margin-left: auto;
  background: var(--admin-danger);
  color: #fff;
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 12px;
  font-weight: 600;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--admin-primary);
  color: var(--admin-gold-light);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 0.85rem;
}

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

.admin-name {
  font-weight: 600;
  font-size: 0.82rem;
}

.admin-role {
  font-size: 0.7rem;
  color: var(--admin-gold);
}

.logout-btn {
  background: transparent;
  border: none;
  color: var(--admin-text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all 0.2s;
}

.logout-btn:hover {
  color: var(--admin-danger);
  background: rgba(230, 57, 70, 0.1);
}

/* MAIN CONTENT AREA */
.admin-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* TOPBAR */
.admin-topbar {
  background: rgba(27, 16, 21, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--admin-border);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
}

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

.sidebar-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--admin-border);
  color: var(--admin-gold);
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
}

.page-title-box h1 {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
}

.page-title-box p {
  font-size: 0.78rem;
  color: var(--admin-text-muted);
}

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

.view-site-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 20px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--admin-border);
  color: var(--admin-gold-light);
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s;
}

.view-site-btn:hover {
  background: var(--admin-gold);
  color: #1a1005;
}

/* CONTENT BODY */
.admin-content {
  padding: 24px 28px 60px;
  flex: 1;
}

/* CARDS & CONTAINERS */
.stat-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--admin-gold), transparent);
}

.stat-card-info p {
  color: var(--admin-text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.stat-card-info h3 {
  font-size: 1.85rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.stat-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(212, 175, 55, 0.12);
  color: var(--admin-gold);
  display: grid;
  place-items: center;
}

.stat-card.alert-card {
  border-color: rgba(230, 57, 70, 0.4);
  background: linear-gradient(135deg, rgba(230, 57, 70, 0.08), var(--admin-surface));
}

.stat-card.alert-card .stat-card-icon {
  background: rgba(230, 57, 70, 0.15);
  color: var(--admin-danger);
}

/* SECTION CARDS */
.admin-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  padding: 22px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.admin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-card-header h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--admin-gold-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* SEARCH & CONTROLS */
.search-bar-wrap {
  position: relative;
  min-width: 260px;
  max-width: 360px;
  flex: 1;
}

.search-bar-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--admin-text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  background: var(--admin-surface-alt);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius-sm);
  color: #fff;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--admin-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

/* BUTTONS */
.btn-admin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--admin-radius-sm);
  font-weight: 600;
  font-size: 0.84rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-primary-gold {
  background: linear-gradient(135deg, var(--admin-gold), var(--admin-gold-dark));
  color: #160D05;
}

.btn-primary-gold:hover {
  background: linear-gradient(135deg, var(--admin-gold-light), var(--admin-gold));
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
  transform: translateY(-1px);
}

.btn-excel {
  background: #107C41;
  color: #fff;
}

.btn-excel:hover {
  background: #189852;
}

.btn-outline-gold {
  background: transparent;
  border: 1px solid var(--admin-border);
  color: var(--admin-gold-light);
}

.btn-outline-gold:hover {
  border-color: var(--admin-gold);
  background: rgba(212, 175, 55, 0.1);
}

.btn-danger-outline {
  background: transparent;
  border: 1px solid rgba(230, 57, 70, 0.4);
  color: var(--admin-danger);
}

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

.btn-sm {
  padding: 5px 10px;
  font-size: 0.78rem;
}

/* TABLES (RESPONSIVE SCROLL WITH PROPER SPACING) */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--admin-radius-sm);
  border: 1px solid rgba(212, 175, 55, 0.2);
  background: rgba(15, 10, 13, 0.5);
  margin-top: 10px;
}

.table-scroll-hint {
  display: none;
  font-size: 0.75rem;
  color: var(--admin-gold);
  background: rgba(212, 175, 55, 0.1);
  border: 1px dashed rgba(212, 175, 55, 0.3);
  border-radius: 6px;
  padding: 6px 12px;
  margin-bottom: 10px;
  text-align: center;
}

@media (max-width: 992px) {
  .table-scroll-hint {
    display: block;
  }
}

.admin-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
}

.admin-table th {
  background: var(--admin-surface-alt);
  color: var(--admin-gold-light);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 16px;
  border-bottom: 2px solid rgba(212, 175, 55, 0.3);
  white-space: nowrap;
}

.admin-table td {
  padding: 16px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.86rem;
  vertical-align: top;
  line-height: 1.45;
}

.admin-table tr {
  transition: background 0.2s ease;
}

.admin-table tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.015);
}

.admin-table tr:hover td {
  background: rgba(212, 175, 55, 0.04);
}

/* Explicit Column Spacing Helpers */
.col-client { min-width: 220px; width: 220px; }
.col-address { min-width: 200px; max-width: 240px; white-space: normal !important; }
.col-wedding { min-width: 160px; width: 160px; }
.col-service { min-width: 140px; width: 140px; }
.col-birthday { min-width: 130px; width: 130px; }
.col-history { min-width: 230px; max-width: 280px; white-space: normal !important; }
.col-actions { min-width: 110px; width: 110px; }

/* STATUS CHIPS */
.status-chip {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-confirmed {
  background: rgba(42, 157, 143, 0.2);
  color: #48CAE4;
}

.status-pending {
  background: rgba(231, 111, 81, 0.2);
  color: #F4A261;
}

.status-completed {
  background: rgba(42, 157, 143, 0.2);
  color: #52B788;
}

.status-cancelled {
  background: rgba(230, 57, 70, 0.2);
  color: #E63946;
}

/* BIRTHDAY CARD SPECIAL STRIP */
.bday-highlight-box {
  background: linear-gradient(135deg, rgba(128, 24, 56, 0.3), rgba(212, 175, 55, 0.15));
  border: 1px solid var(--admin-gold);
  border-radius: var(--admin-radius);
  padding: 18px 22px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.bday-highlight-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.bday-cake-icon {
  font-size: 2.2rem;
}

.bday-highlight-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--admin-gold-light);
  font-weight: 600;
}

/* MODALS */
.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.admin-modal.open,
.admin-modal.active {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.modal-dialog {
  position: relative;
  background: var(--admin-surface);
  border: 1px solid var(--admin-gold);
  border-radius: var(--admin-radius);
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--admin-shadow);
  padding: 24px;
  z-index: 10;
  animation: modalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--admin-border);
}

.modal-header h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--admin-gold);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--admin-text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

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

/* FORM STYLES */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.form-group label {
  font-size: 0.78rem;
  color: var(--admin-text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-control {
  background: var(--admin-surface-alt);
  border: 1px solid var(--admin-border);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--admin-radius-sm);
  font-size: 0.88rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--admin-gold);
}

/* CHECKLIST STYLES */
.checklist-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.checklist-group {
  background: var(--admin-surface-alt);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius-sm);
  padding: 16px;
}

.checklist-group-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--admin-gold-light);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-radius: 6px;
  transition: background 0.15s;
  cursor: pointer;
  user-select: none;
}

.checklist-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.checklist-item input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--admin-gold);
  cursor: pointer;
}

.checklist-item.checked span {
  text-decoration: line-through;
  color: var(--admin-text-muted);
}

/* MEDIA CARDS GRID */
.media-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}

.media-card {
  background: var(--admin-surface-alt);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.media-thumb-wrap {
  position: relative;
  aspect-ratio: 9/16;
  max-height: 280px;
  background: #000;
  display: grid;
  place-items: center;
}

.media-thumb-wrap img,
.media-thumb-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-badge-type {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: var(--admin-gold-light);
  font-size: 0.68rem;
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid var(--admin-border);
  text-transform: uppercase;
}

.media-likes-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.media-details {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.media-title {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.media-meta {
  font-size: 0.72rem;
  color: var(--admin-text-muted);
  margin-bottom: 8px;
}

/* MOBILE BOTTOM BAR */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--admin-surface);
  border-top: 1px solid var(--admin-border);
  z-index: 100;
  justify-content: space-around;
  padding: 8px 4px;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.5);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--admin-text-muted);
  font-size: 0.65rem;
  padding: 4px 8px;
  text-align: center;
  min-width: 44px;
  transition: color 0.2s;
}

.mobile-nav-item.active,
.mobile-nav-item:hover {
  color: var(--admin-gold);
}

/* SIDEBAR OVERLAY (mobile backdrop when sidebar is open) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.show { display: block; }

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* TABLET + SMALL LAPTOP (≤ 991px) */
@media (max-width: 991px) {
  :root { --sidebar-w: 0px; }

  .admin-sidebar {
    transform: translateX(-100%);
    width: 280px;
    z-index: 200;
    box-shadow: 4px 0 24px rgba(0,0,0,0.6);
  }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .sidebar-toggle { display: flex; }
  .mobile-bottom-nav { display: flex; }
  .admin-content { padding-bottom: 90px; }

  /* Topbar tightening */
  .admin-topbar { padding: 12px 18px; }
  .page-title-box h1 { font-size: 1.35rem; }

  /* Stats grid: 2 columns on tablet */
  .stat-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Action bars in card headers: stack wrap */
  .admin-card-header {
    gap: 10px;
  }

  /* Media grid: 2 columns on tablet */
  .media-admin-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Checklist: 2 columns on tablet */
  .checklist-container {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Modals: use full width on tablet */
  .modal-dialog {
    max-width: 92vw;
    max-height: 92vh;
    padding: 18px;
  }
}

/* MOBILE (≤ 600px) */
@media (max-width: 600px) {
  .admin-topbar {
    padding: 10px 14px;
    gap: 10px;
  }

  .page-title-box h1 { font-size: 1.15rem; }
  .page-title-box p { display: none; } /* hide subtitle on small screens */

  /* hide "View Live Website" label text, keep icon */
  .view-site-btn span { display: none; }
  .view-site-btn { padding: 7px 10px; }

  .admin-content {
    padding: 14px 12px 90px;
  }

  /* Stat cards: 2 per row on mobile */
  .stat-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .stat-card { padding: 14px 12px; }
  .stat-card-info h3 { font-size: 1.45rem; }
  .stat-card-icon { width: 38px; height: 38px; }

  /* Section card: smaller padding */
  .admin-card { padding: 14px 12px; }
  .admin-card-header { gap: 8px; margin-bottom: 12px; }
  .admin-card-header h2 { font-size: 1.1rem; }

  /* Buttons: smaller on mobile */
  .btn-admin { padding: 7px 12px; font-size: 0.8rem; gap: 5px; }
  .btn-sm { padding: 4px 8px; font-size: 0.74rem; }

  /* Forms: single column */
  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .form-control { padding: 9px 10px; font-size: 0.85rem; }

  /* Birthday strip: stack vertically */
  .bday-highlight-box {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px;
  }
  .bday-highlight-title { font-size: 1.05rem; }

  /* Tables: horizontal touch scroll with generous touch spacing */
  .table-responsive {
    border-radius: 8px;
    -webkit-overflow-scrolling: touch;
    box-shadow: inset -10px 0 10px -10px rgba(0,0,0,0.5);
  }
  .admin-table { font-size: 0.82rem; min-width: 1080px; }
  .admin-table th { padding: 12px 14px; }
  .admin-table td { padding: 14px 14px; }

  /* Modals: full screen on mobile */
  .admin-modal { padding: 0; align-items: flex-end; }
  .modal-dialog {
    max-width: 100%;
    width: 100%;
    max-height: 92vh;
    border-radius: var(--admin-radius) var(--admin-radius) 0 0;
    padding: 16px 14px;
    margin: 0;
    animation: modalSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  }
  @keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(60px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .modal-header h3 { font-size: 1.1rem; }

  /* Dossier / info grid inside modals: single column */
  .modal-dialog [style*="grid-template-columns: 1fr 1fr"],
  .modal-dialog [style*="grid-template-columns:1fr 1fr"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  /* Media grid: 2 cards on mobile */
  .media-admin-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .media-thumb-wrap { max-height: 200px; }

  /* Checklist: 1 column on mobile */
  .checklist-container { grid-template-columns: 1fr; }

  /* Search bar: full width */
  .search-bar-wrap { min-width: unset; max-width: 100%; width: 100%; }

  /* Modal footer buttons: stack */
  .modal-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .modal-footer .btn-admin { justify-content: center; }

  /* Filter button pills: scroll horizontally */
  .admin-card-header > div:last-child,
  .admin-card-header > form + * {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    gap: 6px;
  }
}

/* VERY SMALL PHONES (≤ 390px) */
@media (max-width: 390px) {
  .stat-cards-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-card-info h3 { font-size: 1.25rem; }
  .admin-content { padding: 10px 10px 90px; }
  .mobile-nav-item { font-size: 0.6rem; padding: 4px 4px; }
  .media-admin-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
}


/* ============================================================
   DOSSIER INFO GRID (Customer Modal 2-col responsive grid)
   ============================================================ */
.dossier-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  font-size: 0.88rem;
}
@media (max-width: 600px) {
  .dossier-info-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* Modal footer: horizontal on desktop, vertical on mobile */
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--admin-border);
  flex-wrap: wrap;
}
@media (max-width: 480px) {
  .modal-footer { flex-direction: column-reverse; }
  .modal-footer .btn-admin { width: 100%; justify-content: center; }
}

/* ============================================================
   FILTER PILL BAR (scrollable on mobile)
   ============================================================ */
.filter-pill-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
@media (max-width: 600px) {
  .filter-pill-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .filter-pill-bar::-webkit-scrollbar { display: none; }
  .filter-pill-bar .btn-admin { flex-shrink: 0; white-space: nowrap; }
}

/* Action row in card header */
.card-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
@media (max-width: 600px) {
  .card-action-row {
    gap: 6px;
  }
}

/* Social monitor: 1-column iframe on mobile */
@media (max-width: 600px) {
  .social-monitor-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .social-channel-iframe {
    height: 400px !important;
  }
  .viewport-buttons { display: none !important; } /* hide desktop/tablet switcher on phones */
}

/* Topbar: hide long label on small phones */
@media (max-width: 480px) {
  .topbar-right .view-site-btn span { display: none; }
  .topbar-right .view-site-btn svg { margin: 0; }
}

/* ============================================================
   INTERACTIVE MONTHLY CALENDAR GRID VIEW
   ============================================================ */
.monthly-calendar-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 14px;
}

.monthly-calendar-grid {
  min-width: 760px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.cal-header-cell {
  background: var(--admin-surface-alt, #26161E);
  color: var(--admin-gold, #D4AF37);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: center;
  padding: 10px 4px;
  border-radius: 6px;
  border: 1px solid rgba(212, 175, 55, 0.15);
}

.cal-day-cell {
  background: rgba(27, 16, 21, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  min-height: 110px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  position: relative;
  cursor: pointer;
}

.cal-day-cell:hover {
  background: rgba(212, 175, 55, 0.05);
  border-color: rgba(212, 175, 55, 0.4);
}

.cal-day-cell.empty {
  background: rgba(0, 0, 0, 0.2);
  border-color: transparent;
  cursor: default;
  opacity: 0.35;
}

.cal-day-cell.today {
  border: 1.5px solid var(--admin-gold, #D4AF37);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(27, 16, 21, 0.8));
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.15);
}

.cal-day-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.cal-day-number {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-sans);
}

.cal-day-cell.today .cal-day-number {
  color: var(--admin-gold-light, #F4E4A6);
}

.cal-today-badge {
  font-size: 0.6rem;
  font-weight: 700;
  background: var(--admin-gold, #D4AF37);
  color: #111;
  padding: 2px 6px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cal-events-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-grow: 1;
}

.cal-event-chip {
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid transparent;
  transition: transform 0.15s ease;
}

.cal-event-chip:hover {
  transform: translateY(-1px);
}

.cal-chip-confirmed {
  background: rgba(42, 157, 143, 0.25);
  color: #52B788;
  border-color: rgba(82, 183, 136, 0.4);
}

.cal-chip-pending {
  background: rgba(231, 111, 81, 0.25);
  color: #F4A261;
  border-color: rgba(244, 162, 97, 0.4);
}

.cal-chip-completed {
  background: rgba(72, 202, 228, 0.2);
  color: #48CAE4;
  border-color: rgba(72, 202, 228, 0.4);
}

.cal-chip-cancelled {
  background: rgba(230, 57, 70, 0.2);
  color: #E63946;
  border-color: rgba(230, 57, 70, 0.4);
}
