/* Admin & Staff Dashboard Layout */
.admin-shell {
  display: flex;
  min-height: 100vh;
  background: var(--bg-grouped);
}

.admin-sidebar {
  width: 260px;
  background: var(--bg-card);
  border-right: 0.5px solid var(--separator-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
}

@media (max-width: 991px) {
  .admin-sidebar {
    display: none;
  }
}

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

.admin-nav {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.admin-nav::-webkit-scrollbar {
  display: none !important;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--duration-fast);
  text-decoration: none;
}

.admin-nav-link:hover, .admin-nav-link.active {
  background: var(--color-primary-subtle);
  color: var(--color-primary);
}

.admin-nav-icon {
  width: 20px;
  height: 20px;
}

.admin-content-area {
  flex: 1;
  padding: 28px clamp(16px, 3vw, 36px);
  max-width: 1400px;
  min-width: 0;
}

/* Stat Metrics Grid */
.stat-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-trend {
  font-size: 12px;
  font-weight: 600;
}

.trend-up { color: var(--color-success); }
.trend-down { color: var(--color-danger); }

/* iOS Admin Data Table */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  margin-bottom: 24px;
}

.table-header {
  padding: 18px 24px;
  border-bottom: 0.5px solid var(--separator-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.data-table-wrap {
  width: 100%;
  overflow-x: auto;
}

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

.data-table th {
  padding: 12px 18px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-card-secondary);
  border-bottom: 0.5px solid var(--separator-subtle);
}

.data-table td {
  padding: 14px 18px;
  font-size: 14px;
  border-bottom: 0.5px solid var(--separator-subtle);
  color: var(--text-primary);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: var(--fill-quaternary);
}

/* Status Badges */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
}

.status-pending { background: var(--color-warning-subtle); color: var(--color-warning); }
.status-confirmed { background: var(--color-primary-subtle); color: var(--color-primary); }
.status-delivered { background: var(--color-success-subtle); color: var(--color-success); }
.status-cancelled { background: var(--color-danger-subtle); color: var(--color-danger); }

/* Support Desk Two-Pane Layout */
.support-desk-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 20px;
  min-height: 600px;
}

@media (max-width: 991px) {
  .support-desk-grid {
    grid-template-columns: 1fr;
  }
}

.ticket-item-card {
  padding: 16px 18px;
  background: #FFFFFF;
  border: 1.5px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.ticket-item-card:hover {
  border-color: rgba(0, 122, 255, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 122, 255, 0.08);
}

.ticket-item-card.active {
  border-color: #007AFF;
  background: #F4F8FF;
  box-shadow: 0 6px 20px rgba(0, 122, 255, 0.14);
}


.integration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.integration-tile {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-success);
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.2);
}

.impersonation-banner {
  background: #FFF3CD;
  color: #856404;
  border-bottom: 1px solid #FFEEBA;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Document Print Styling */
.print-document-wrap {
  background: #fff;
  color: #000;
  padding: 32px;
  border-radius: var(--radius-lg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

@media print {
  body * {
    visibility: hidden;
  }
  .print-document-wrap, .print-document-wrap * {
    visibility: visible;
  }
  .print-document-wrap {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 20px;
    box-shadow: none;
  }
}

/* =========================================================
   Ultra-Premium Executive Dashboard Enhancements
   ========================================================= */

.admin-brand-card, .category-card {
  position: relative;
  display: flex !important;
  flex-direction: column !important;
  height: auto !important;
  min-height: 240px !important;
  max-height: none !important;
  overflow: visible !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-xs) !important;
  padding: 0 !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease !important;
}

.admin-brand-card:hover, .category-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.08), 0 0 1px 1px rgba(0, 122, 255, 0.15) !important;
  border-color: rgba(0, 122, 255, 0.25) !important;
}

.dropzone-upload {
  border: 2px dashed rgba(0, 122, 255, 0.35);
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  transition: all 0.2s ease;
  cursor: pointer;
}

.dropzone-upload:hover {
  border-color: var(--color-primary);
  background: rgba(0, 122, 255, 0.04);
  transform: scale(1.01);
}

.form-control:focus, .form-input:focus {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.12) !important;
  outline: none !important;
}

.badge-pulse {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-pulse::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 2px rgba(52, 199, 89, 0.3);
}

/* =========================================================
   Apple iOS Neumorphism Design System for Executive Analytics
   ========================================================= */

.neu-card {
  background: #F4F7FB;
  border-radius: 26px;
  box-shadow: 10px 10px 24px rgba(166, 180, 200, 0.45), -10px -10px 24px rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.7);
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.neu-card:hover {
  box-shadow: 12px 12px 28px rgba(166, 180, 200, 0.5), -12px -12px 28px #ffffff;
}

.neu-inset {
  background: #EEF2F7;
  border-radius: 20px;
  box-shadow: inset 5px 5px 10px rgba(166, 180, 200, 0.45), inset -5px -5px 10px rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(215, 225, 238, 0.5);
}

.neu-tile {
  background: #F4F7FB;
  border-radius: 20px;
  box-shadow: 6px 6px 16px rgba(166, 180, 200, 0.4), -6px -6px 16px rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.8);
  padding: 18px 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.neu-tile:hover {
  transform: translateY(-2px);
  box-shadow: 8px 8px 20px rgba(166, 180, 200, 0.48), -8px -8px 20px #ffffff;
}

.neu-segmented {
  display: inline-flex;
  padding: 5px;
  background: #EBEEF4;
  border-radius: 999px;
  box-shadow: inset 3px 3px 6px rgba(166, 180, 200, 0.5), inset -3px -3px 6px rgba(255, 255, 255, 0.85);
  gap: 4px;
}

.neu-segmented-btn {
  border: none;
  background: transparent;
  color: #64748B;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.neu-segmented-btn.active {
  background: #F4F7FB;
  color: #007AFF;
  box-shadow: 3px 3px 8px rgba(166, 180, 200, 0.45), -3px -3px 8px #ffffff;
}

.neu-pill {
  border-radius: 999px;
  background: #F4F7FB;
  box-shadow: 4px 4px 10px rgba(166, 180, 200, 0.4), -4px -4px 10px #ffffff;
  padding: 6px 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.neu-circle-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #F4F7FB;
  box-shadow: 5px 5px 12px rgba(166, 180, 200, 0.45), -5px -5px 12px #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.neu-circle-btn:active {
  box-shadow: inset 3px 3px 6px rgba(166, 180, 200, 0.5), inset -3px -3px 6px #ffffff;
}

.neu-gauge-dish {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: #F4F7FB;
  box-shadow: 8px 8px 20px rgba(166, 180, 200, 0.45), -8px -8px 20px #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 0 auto;
}

.neu-chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(17, 24, 39, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transform: translate(-50%, -120%);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 100;
  white-space: nowrap;
}

