/* 
 * dashboard.css — Modestly Admin Command Center
 * ─────────────────────────────────────────────
 * Refined Brand Identity: High Contrast / Minimalist / Editorial
 */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --bg-deep: #121212;
  --bg-main: #ffffff;
  --text-main: #121212;
  --text-muted: #888888;
  --border: #e0e0e0;
  --border-light: #f0f0f0;
  --accent: #121212;
  --gold: #B8975A;
  --error: #dc3545;
  --success: #2e7d32;
  --sidebar-width: 240px;
  --serif: 'Playfair Display', serif;
  --sans: 'Inter', sans-serif;
  --transition: all 0.3s ease;
}

/* Base Styles */
body {
  background-color: var(--bg-main);
  color: var(--text-main);
  margin: 0;
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

.dashboard-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar - Editorial Dark */
.sidebar {
  width: var(--sidebar-width);
  /* Subtle grid effect from brand images */
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  display: flex;
  flex-direction: column;
  padding: 40px 24px;
  position: fixed;
  height: 100vh;
  z-index: 100;
  background-color: var(--bg-deep);
  color: white;
}

.sidebar-header {
  margin-bottom: 24px;
  position: relative;
}

.sidebar-close-btn {
  display: none;
}

.logo-text {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: white;
  display: inline-block;
}


.sidebar-logo {
  position: relative;
  display: inline-block;
}
.sidebar-logo .logo-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: #fff;
  position: relative;
  display: inline-block;
}
.sidebar-logo .logo-rule {
  display: block;
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 1.8rem;
  height: 2px;
  background: #C5A059;
  transition: width 0.3s ease-in-out;
  opacity: .9;
}
.sidebar-logo:hover .logo-rule {
  width: 100%;
}

.mo-accent {
  position: relative;
  display: inline-block;
}

.mo-bar {
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2.5px;
  background: var(--gold, #c5a059);
  display: block;
}

.role-badge {
  font-size: 10px;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 8px;
}

.nav-section-label {
  font-size: 10px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 15px;
  -webkit-overflow-scrolling: touch;
}

.sidebar-nav::-webkit-scrollbar {
  display: none;
}

.sidebar-nav {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.sidebar-nav ul {
  list-style: none;
  padding: 0;
}

.sidebar-nav li {
  margin-bottom: 8px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  padding: 10px 0;
  text-decoration: none;
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  font-weight: 300;
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

.sidebar-nav a em {
  font-family: var(--serif);
  font-style: italic;
  margin-left: 4px;
  color: var(--gold);
  opacity: 0.8;
}

.sidebar-nav li.active a,
.sidebar-nav a:hover {
  color: white;
  padding-left: 10px;
}

.nav-icon {
  margin-right: 12px;
  opacity: 0.5;
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 30px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
}

.avatar {
  width: 32px;
  height: 32px;
  background: var(--gold);
  color: var(--bg-deep);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
}

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

.user-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.user-role {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.logout-btn {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: transparent;
  color: rgba(255,255,255,0.5);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.logout-btn:hover {
  border-color: white;
  color: white;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 40px 32px;
}

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

.header-title p {
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.header-title h2 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.2;
  margin: 0;
}

.header-title h2 em {
  font-style: italic;
  color: var(--gold);
}

.header-controls {
  margin-top: 16px;
  display: flex;
  gap: 16px;
  align-items: center;
}

/* Inputs & Search */
.search-box {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.search-box svg {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #ccc;
}

.search-box input {
  width: 100%;
  padding: 12px 0 12px 30px;
  border: none;
  border-bottom: 1px solid var(--border);
  font-family: var(--sans);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}

.search-box input:focus {
  border-color: var(--bg-deep);
}

.role-select {
  padding: 10px;
  border: none;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #666;
  outline: none;
  cursor: pointer;
}

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

.stat-card {
  padding: 20px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
}

.stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.stat-value {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 600;
  margin: 0;
}

.stat-sub {
  font-size: 11px;
  color: #aaa;
  margin-top: 4px;
}

/* Table Design - Ultra Minimalist */
.table-container {
  margin-top: 40px;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: 14px 16px;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 400;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 16px 16px;
  font-size: 13.5px;
  border-bottom: 1px solid #f8f8f8;
  vertical-align: middle;
}

th:first-child, td:first-child {
  padding-left: 0;
}

th:last-child, td:last-child {
  padding-right: 0;
}

.item-name {
  font-weight: 500;
  margin-bottom: 4px;
}

.item-sub {
  font-size: 12px;
  color: #aaa;
}

.vendor-brand {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
}

.role-pill {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #999;
  white-space: nowrap;
}

.status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}

.status-active { background: #e8f5e9; color: #2e7d32; }
.status-banned { background: #ffe3e3; color: #c92a2a; border: 1px solid #ffc9c9; }
.status-pending { background: #fff3e0; color: #ef6c00; }

/* Order Status Badge Colors - Premium High Fashion Palette */
.status-pending_payment, .status-PENDING_PAYMENT { background: #fffde7; color: #b78103; border: 1px solid #fff59d; }
.status-paid, .status-PAID { background: #e8eaf6; color: #3f51b5; border: 1px solid #c5cae9; }
.status-in_production, .status-IN_PRODUCTION { background: #f3e5f5; color: #7b1fa2; border: 1px solid #e1bee7; }
.status-ready, .status-READY { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.status-shipped, .status-SHIPPED { background: #e0f7fa; color: #00838f; border: 1px solid #b2ebf2; }
.status-delivered, .status-DELIVERED { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.status-cancelled, .status-CANCELLED, .status-rejected, .status-REJECTED { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.status-disputed, .status-DISPUTED { background: #fbe9e7; color: #c62828; border: 1px solid #ffccbc; }
.status-HELD_IN_ESCROW, .status-held_in_escrow { background: #fff8e1; color: #f57c00; border: 1px solid #ffe0b2; }

/* Payout status classes */
.status-approved, .status-APPROVED { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }

/* Ticket status classes */
.status-open, .status-OPEN { background: #e3f2fd; color: #1565c0; border: 1px solid #bbdefb; }
.status-resolved, .status-RESOLVED { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.status-closed, .status-CLOSED { background: #f5f5f5; color: #757575; border: 1px solid #e0e0e0; }

/* Ticket category badges */
.category-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
  background: #f0f0f0;
  color: #555;
}
.category-product { background: #fce4ec; color: #c62828; }
.category-delivery { background: #e0f2f1; color: #00695c; }
.category-payment { background: #fff3e0; color: #e65100; }

/* Action Buttons */
.action-btns {
  display: flex;
  gap: 12px;
}

.btn {
  background: transparent;
  border: none;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  padding: 5px 0;
  border-bottom: 1px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-approve {
  color: var(--gold);
  border-bottom: 1px solid var(--gold);
}

.btn-approve:hover {
  letter-spacing: 2px;
}

.btn-reject {
  color: #aaa;
}

.btn-reject:hover {
  color: var(--error);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
  overflow: hidden;
}

.modal-content {
  width: 100%;
  max-width: 560px;
  height: 100vh;
  background: #ffffff;
  padding: 32px 36px;
  position: relative;
  overflow-y: auto;
  box-shadow: -4px 0 24px rgba(0,0,0,0.08);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: transparent;
  border: 1px solid var(--border);
  color: #666;
  font-size: 18px;
  font-weight: 400;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close:hover { background: #f5f5f5; color: #121212; border-color: #ccc; }

.modal-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 24px;
}

.modal-title em {
  font-style: italic;
  color: var(--gold);
}

.modal-two-col {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: block;
}

.info-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 0;
  flex-shrink: 0;
  min-width: 120px;
}

.info-value {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  text-align: right;
  word-break: break-word;
}

.info-value.italic { font-style: italic; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.gallery-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #f5f5f5;
  border: 1px solid #eee;
  border-radius: 6px;
  transition: opacity 0.2s;
  cursor: pointer;
}

.gallery-img:hover { opacity: 0.8; }

.modal-footer {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  top: auto;
  left: auto;
  bottom: 40px;
  right: 40px;
  z-index: 2000;
  pointer-events: none;
}

.toast {
  background: var(--bg-deep);
  color: white;
  padding: 20px 40px;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s ease;
  pointer-events: auto;
}

.toast.visible {
  transform: translateY(0);
  opacity: 1;
}

/* States */
.skeleton-card {
  padding: 40px 0;
  border-bottom: 1px solid var(--border-light);
}

.sk { background: #f0f0f0; border-radius: 4px; }
.sk-h { width: 40%; height: 10px; margin-bottom: 20px; }
.sk-v { width: 80%; height: 30px; }
.sk-text { width: 100%; height: 15px; }

.initial-loader {
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner {
  width: 30px;
  height: 30px;
  border: 1px solid #eee;
  border-top-color: var(--bg-deep);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.empty-state {
  padding: 100px 0;
  text-align: center;
}

.empty-icon { font-size: 40px; color: #eee; margin-bottom: 20px; }
.empty-state h3 { font-family: var(--serif); font-size: 24px; font-weight: 400; }

/* Prompt Overlay */
.prompt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.prompt-box {
  width: 100%;
  max-width: 500px;
}

.prompt-box h4 { font-family: var(--serif); font-size: 32px; margin-bottom: 10px; }
.prompt-label { font-size: 12px; color: #888; margin-bottom: 20px; }
.prompt-box textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid var(--border);
  font-family: var(--sans);
  font-size: 14px;
  outline: none;
  margin-bottom: 30px;
}

.prompt-actions { display: flex; gap: 20px; }

/* Transaction Type Pilla */
.role-deposit { color: #2e7d32; font-weight: 600; }
.role-purchase { color: #1565c0; font-weight: 600; }
.role-refund { color: #d84315; font-weight: 600; }
.role-payout { color: #6a1b9a; font-weight: 600; }
.role-escrow_release { color: #c2185b; font-weight: 600; }

/* ─────────────────────────────────────────────────────────────────────────────
 * PROMPT 1: RESPONSIVE SYSTEM, REPAIRED DRAWERS & ACCESSIBLE FOOTERS
 * ───────────────────────────────────────────────────────────────────────────── */

/* Danger & Action Button Variants */
.btn-danger, .btn-reject, button[data-action="deleteProduct"], button[data-action="deleteUser"], button[data-action="banUser"] {
  background: #dc3545 !important;
  color: #ffffff !important;
  border: 1px solid #dc3545 !important;
}
.btn-danger:hover, .btn-reject:hover {
  background: #bd2130 !important;
  border-color: #b21f2d !important;
}

.btn-approve, .btn-primary {
  background: #121212 !important;
  color: #ffffff !important;
  border: 1px solid #121212 !important;
}
.btn-approve:hover {
  background: #333333 !important;
}

.btn-secondary {
  background: #f5f5f5 !important;
  color: #333333 !important;
  border: 1px solid #e0e0e0 !important;
}
.btn-secondary:hover {
  background: #e0e0e0 !important;
}

/* Full Modal / Side Drawer System */
/* Full Modal / Side Drawer System */
.full-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  justify-content: flex-end;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.full-modal.hidden {
  display: none !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.full-modal-inner {
  position: relative;
  width: min(100vw, 720px);
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 36px rgba(0, 0, 0, 0.22);
  box-sizing: border-box;
  overflow: hidden;
}

.full-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 100;
  background: var(--bg-deep, #121212);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.full-modal-close:hover {
  background: #2a2a2a;
  transform: scale(1.06);
}
.full-modal-close:focus-visible {
  outline: 2px solid var(--gold, #B8975A);
  outline-offset: 2px;
}

.full-modal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  padding: 0;
  word-break: normal;
  overflow-wrap: break-word;
  -webkit-overflow-scrolling: touch;
}

.drawer-header, .profile-header {
  padding: 20px 68px 18px 24px;
  border-bottom: 1px solid var(--border-light, #eaedf1);
  background: #ffffff;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.profile-header h2, .drawer-title {
  font-family: var(--serif, Georgia, serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--text-main, #121212);
  margin: 0;
  line-height: 1.3;
  word-break: normal;
  overflow-wrap: break-word;
}

.drawer-eyebrow, .profile-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold, #B8975A);
  margin-bottom: 4px;
  display: block;
}

.drawer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

/* Content Area Cards & Grid */
.drawer-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-sizing: border-box;
}

.drawer-card {
  background: #ffffff;
  border: 1px solid var(--border-light, #eaedf1);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.drawer-card-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted, #71717a);
  margin-bottom: 14px;
  margin-top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-grid, .info-grid-2col {
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  box-sizing: border-box;
}

.info-item, .info-field {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-item .info-label, .info-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted, #71717a);
  margin-bottom: 2px;
}

.info-item .info-value, .info-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main, #121212);
  line-height: 1.5;
  text-align: left;
  word-break: normal;
  overflow-wrap: break-word;
}

.info-value.tech-ref {
  overflow-wrap: anywhere;
  word-break: break-all;
}

.info-value.money {
  font-family: var(--sans, sans-serif);
  font-weight: 700;
  color: #121212;
  font-size: 16px;
}

.product-desc-box {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-main, #121212);
  background: #fdfdfd;
  padding: 14px;
  border-radius: 6px;
  border: 1px solid var(--border-light, #eaedf1);
  white-space: pre-wrap;
  word-break: normal;
  overflow-wrap: break-word;
  margin-top: 6px;
}

/* Gallery Component */
.full-modal-gallery {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gallery-primary-viewport {
  width: 100%;
  max-height: 380px;
  aspect-ratio: 4/5;
  background: #f8f8f9;
  border: 1px solid var(--border-light, #eaedf1);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.gallery-primary-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: zoom-in;
  transition: transform 0.25s ease;
}

.gallery-primary-img:hover {
  transform: scale(1.02);
}

.gallery-thumbs-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}

.gallery-thumb-card {
  position: relative;
  width: 76px;
  height: 76px;
  min-width: 76px;
  min-height: 76px;
  border-radius: 6px;
  border: 2px solid var(--border-light, #eaedf1);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fafafa;
}

.gallery-thumb-card.active {
  border-color: var(--gold, #B8975A);
  box-shadow: 0 0 0 2px rgba(184, 151, 90, 0.3);
}

.gallery-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.full-modal-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border-light, #eaedf1);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.full-modal-img:hover {
  transform: scale(1.03);
}

/* Governance Documents Component */
.gov-docs-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gov-doc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: #fcfcfd;
  border: 1px solid var(--border-light, #eaedf1);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.gov-doc-row:hover {
  border-color: var(--gold, #B8975A);
  background: #ffffff;
}

.gov-doc-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.gov-doc-icon-box {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  border-radius: 6px;
  background: #f4f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  overflow: hidden;
  border: 1px solid var(--border-light, #eaedf1);
}

.gov-doc-icon-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gov-doc-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.gov-doc-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main, #121212);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gov-doc-subtext {
  font-size: 11px;
  color: var(--text-muted, #71717a);
}

.doc-view-btn {
  min-height: 44px;
  min-width: 88px;
  padding: 8px 16px;
  background: #121212;
  color: #ffffff;
  border: 1px solid #121212;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  cursor: pointer;
  box-sizing: border-box;
}

.doc-view-btn:hover {
  background: var(--gold, #B8975A);
  border-color: var(--gold, #B8975A);
  color: #121212;
}

.doc-missing-tag {
  font-size: 12px;
  color: var(--text-muted, #71717a);
  font-weight: 500;
  padding: 6px 12px;
  background: #f4f4f6;
  border-radius: 4px;
}

/* Activity Summary Cards Grid */
.activity-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.activity-card {
  background: #ffffff;
  border: 1px solid var(--border-light, #eaedf1);
  border-radius: 8px;
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 72px;
}

.activity-card:hover {
  border-color: var(--gold, #B8975A);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.activity-card-num {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main, #121212);
  line-height: 1;
}

.activity-card-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted, #71717a);
  font-weight: 600;
  margin-top: 4px;
}

/* Sticky Footer & Action Hierarchy */
.full-modal-footer, .modal-footer {
  position: sticky;
  bottom: 0;
  background: #ffffff;
  border-top: 1px solid var(--border-light, #eaedf1);
  padding: 16px 24px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 40;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
}

.drawer-footer-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.footer-action-row-primary {
  width: 100%;
}

.footer-action-row-primary .btn {
  width: 100%;
  min-height: 44px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
}

.footer-action-row-secondary {
  display: flex;
  gap: 10px;
  width: 100%;
}

.footer-action-row-secondary .btn {
  flex: 1;
  min-height: 44px;
  font-size: 12px;
  font-weight: 600;
}

.footer-action-row-destructive {
  width: 100%;
  padding-top: 8px;
  border-top: 1px solid var(--border-light, #eaedf1);
  display: flex;
  justify-content: flex-end;
}

.footer-action-row-destructive .btn {
  width: 100%;
  min-height: 44px;
}

.full-modal-footer .btn, .modal-footer .btn {
  min-height: 44px;
  padding: 10px 18px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.full-modal-footer .btn:disabled, .modal-footer .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Product Review Drawer Action Grid */
.product-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.product-actions-grid .primary-actions,
.product-actions-grid .secondary-actions {
  display: flex;
  gap: 10px;
}

/* Work Queue Top Summary Bar */
.work-queue-bar {
  background: var(--bg-deep);
  color: white;
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 28px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.work-queue-title {
  font-family: var(--serif);
  font-size: 18px;
  color: white;
  margin-bottom: 14px;
}
.work-queue-title em {
  color: var(--gold);
  font-style: italic;
}
.work-queue-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}
.work-queue-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}
.work-queue-card:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--gold);
}
.work-queue-card .num {
  font-size: 22px;
  font-weight: 700;
  color: var(--gold);
}
.work-queue-card .lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.7);
  margin-top: 2px;
}

/* Table vs Mobile Card Display Rules */
.desktop-table-view { display: block; }
.mobile-cards-view { display: none; }

.user-mobile-cards {
  flex-direction: column;
  gap: 12px;
  padding: 12px;
}

.mobile-card-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}
.mobile-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.mobile-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.mobile-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  word-break: break-word;
}
.mobile-card-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
}
.mobile-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
}

/* Responsive Media Queries */

/* Mobile Topbar & Off-canvas Navigation */
.mobile-topbar { display: none; }

@media (max-width: 1023px) {
  html.mobile-sidebar-open,
  body.mobile-sidebar-open {
    overflow: hidden;
    overscroll-behavior: none;
  }

  .mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 16px;
    background: var(--bg-deep);
    color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 800;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .hamburger-btn {
    background: transparent;
    border: none;
    color: white;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    touch-action: manipulation;
  }
  .hamburger-btn:hover { background: rgba(255,255,255,0.1); }

  .mobile-topbar-brand .logo-text {
    font-family: var(--serif);
    font-size: 18px;
    letter-spacing: 3px;
    color: white;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    z-index: 1300;
    transform: translate3d(-100%, 0, 0);
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 4px 0 24px rgba(0,0,0,0.3);
    will-change: transform;
    overscroll-behavior: contain;
  }

  .sidebar.open {
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
    isolation: isolate;
  }

  .sidebar.open .sidebar-nav,
  .sidebar.open .sidebar-nav ul,
  .sidebar.open .sidebar-nav li,
  .sidebar-nav a,
  .sidebar-close-btn,
  .logout-btn {
    position: relative;
    z-index: 2;
    touch-action: manipulation;
    pointer-events: auto;
  }

  .sidebar-nav li,
  .sidebar-nav a {
    min-height: 44px;
  }

  .sidebar-close-btn {
    position: absolute;
    top: -12px;
    right: -8px;
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 6px;
    background: transparent;
    color: #ffffff;
    font: 300 28px/1 var(--sans);
    cursor: pointer;
    touch-action: manipulation;
  }

  .sidebar-close-btn:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
  }

  .sidebar-overlay {
    position: fixed;
    top: 0;
    /* Keep the backdrop outside the drawer hit area so it cannot intercept
       taps intended for navigation controls on mobile browsers. */
    left: min(280px, 85vw);
    right: 0;
    width: auto;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0s linear 0.2s;
    touch-action: manipulation;
  }

  .sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.2s ease;
  }

  .main-content {
    margin-left: 0 !important;
    padding: 20px 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* Tablet & Mobile Table Card Conversion */
@media (max-width: 767px) {
  .desktop-table-view { display: none !important; }
  .mobile-cards-view { display: block !important; }
  .user-mobile-cards { display: flex !important; }

  .stats-grid, .summary-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Mobile Screens (< 600px) */
@media (max-width: 600px) {
  .stats-grid, .summary-grid {
    grid-template-columns: 1fr;
  }

  .full-modal-inner {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
  }

  .profile-grid {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .profile-header {
    padding: 20px 16px 14px 16px;
  }

  .full-modal-footer, .modal-footer {
    flex-direction: column;
    align-items: stretch;
    padding: 14px 16px;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }

  .full-modal-footer .btn, .modal-footer .btn {
    width: 100%;
    min-height: 44px;
  }

  .product-actions-grid {
    grid-template-columns: 1fr;
  }
  .product-actions-grid .primary-actions,
  .product-actions-grid .secondary-actions {
    flex-direction: column;
  }

  .toast-container {
    top: auto;
    bottom: 20px;
    left: 16px;
    right: 16px;
    max-width: calc(100vw - 32px);
    width: auto;
  }

  .toast {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 20px;
  }
}

/* Redesigned Drawer Responsive Breakpoints (< 640px and < 480px) */
@media (max-width: 640px) {
  .full-modal-inner {
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
  }

  .drawer-header, .profile-header {
    padding: 16px 60px 14px 16px;
  }

  .drawer-content {
    padding: 16px;
    gap: 16px;
  }

  .drawer-card {
    padding: 16px;
  }

  .info-grid-2col {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .activity-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .full-modal-footer, .modal-footer {
    padding: 14px 16px;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }

  .footer-action-row-secondary {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .gov-doc-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .gov-doc-left {
    width: 100%;
  }
  .doc-view-btn {
    width: 100%;
  }
}

/* ── Queue Navigation & History Styling ── */
.queue-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.queue-tabs {
  display: flex;
  gap: 4px;
  background: var(--border-light, #f0f0f0);
  padding: 4px;
  border-radius: 8px;
  overflow-x: auto;
}

.queue-tab {
  padding: 8px 16px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted, #888);
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition, all 0.2s ease);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.queue-tab:hover {
  color: var(--text-main, #121212);
}

.queue-tab.active {
  background: var(--bg-main, #ffffff);
  color: var(--text-main, #121212);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.queue-tab-count {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(0,0,0,0.06);
  color: inherit;
}

.queue-tab.active .queue-tab-count {
  background: var(--bg-deep, #121212);
  color: #ffffff;
}

.queue-search-filter {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.queue-search-input, .queue-date-input, .queue-select {
  padding: 8px 12px;
  border: 1px solid var(--border, #e0e0e0);
  border-radius: 6px;
  font-size: 13px;
  min-height: 38px;
  box-sizing: border-box;
  background: #ffffff;
}

.status-declined, .status-DECLINED {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Document Row Component */
.doc-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #fafafa;
  border: 1px solid var(--border-light, #eaedf1);
  border-radius: 8px;
  margin-bottom: 8px;
  gap: 12px;
}

.doc-row-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.doc-row-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: rgba(184, 151, 90, 0.12);
  color: var(--gold, #B8975A);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.doc-row-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main, #121212);
  margin-bottom: 2px;
}

.doc-row-meta {
  font-size: 11px;
  color: var(--text-muted, #888888);
}

.doc-row-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* Decision Summary Box */
.decision-summary-box {
  background: #fdfbf7;
  border: 1px solid var(--gold, #B8975A);
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
}

.decision-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.decision-summary-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--gold, #B8975A);
}
