/* ==========================================================================
   ADMIN TELEMETRY COCKPIT & SECURITY PORTAL (IRD GROUP)
   ========================================================================== */

.admin-body {
  background-color: #040508;
  color: #e2e8f0;
  font-family: var(--font-body);
  min-height: 100vh;
}

/* ==========================================================================
   SECURE GATEWAY LOCKSCREEN
   ========================================================================== */

.security-gate {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, #0c0d12 0%, #030304 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 50000;
  padding: 20px;
}

.security-card {
  background: rgba(10, 10, 12, 0.6);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(20px);
  border-radius: 8px;
  width: 100%;
  max-width: 400px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.security-logo {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
  font-family: var(--font-headings);
}

.security-logo span {
  color: var(--accent-gold);
}

.security-subtitle {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 30px;
  font-weight: 700;
}

.security-status-icon {
  width: 60px;
  height: 60px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--text-muted);
  margin: 0 auto 30px auto;
  transition: var(--transition-smooth);
}
.security-gate.success .security-status-icon {
  border-color: #10b981;
  color: #10b981;
  background: rgba(16, 185, 129, 0.05);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}

/* ==========================================================================
   MAIN DASHBOARD SHELL
   ========================================================================== */

.dashboard-container {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  padding-top: 70px; /* Offset completely to sit below the persistent global header */
}

@media (max-width: 992px) {
  .dashboard-container {
    grid-template-columns: 1fr;
  }
}

/* Dashboard Sidebar */
.dashboard-sidebar {
  background-color: #07080a;
  border-right: 1px solid var(--border-color);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-main);
  margin-bottom: 40px;
  font-family: var(--font-headings);
  text-transform: uppercase;
}
.sidebar-brand span {
  color: var(--accent-gold);
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}

.sidebar-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}
.sidebar-menu-item:hover, .sidebar-menu-item.active {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.02);
}
.sidebar-menu-item.active {
  border-left: 2px solid var(--accent-gold);
  border-radius: 0 6px 6px 0;
  background: linear-gradient(90deg, rgba(197, 168, 128, 0.04) 0%, transparent 100%);
}

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

/* Dashboard Content */
.dashboard-content {
  padding: 40px;
  overflow-y: auto;
  height: calc(100vh - 70px);
}

@media (max-width: 992px) {
  .dashboard-content {
    height: auto;
    padding: 20px;
  }
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.dashboard-title h1 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 4px;
  font-family: var(--font-headings);
  text-transform: uppercase;
}
.dashboard-title p {
  font-size: 12px;
  color: var(--text-muted);
}

/* Telemetry metric cards */
.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.telemetry-card {
  background: #090a0d;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.telemetry-icon {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background: rgba(197, 168, 128, 0.05);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.telemetry-value {
  font-size: 20px;
  font-weight: 700;
}

.telemetry-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   ORDER TABLE & LIFE-CYCLE
   ========================================================================== */

.admin-card {
  background: #07080a;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 30px;
  margin-bottom: 30px;
}

.admin-card-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

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

.admin-table th {
  padding: 14px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.admin-table td {
  padding: 16px;
  font-size: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  color: #cbd5e1;
}

/* Status colors */
.status-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  display: inline-block;
  letter-spacing: 0.5px;
}
.status-new { background: rgba(59, 130, 246, 0.1); color: #3b82f6; border: 1px solid rgba(59, 130, 246, 0.2); }
.status-pending { background: rgba(245, 158, 11, 0.1); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.2); }
.status-packed { background: rgba(138, 43, 226, 0.1); color: #8a2be2; border: 1px solid rgba(138, 43, 226, 0.2); }
.status-shipped { background: rgba(6, 182, 212, 0.1); color: #06b6d4; border: 1px solid rgba(6, 182, 212, 0.2); }
.status-delivered { background: rgba(16, 185, 129, 0.1); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.2); }
.status-cancelled { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.2); }

/* ==========================================================================
   LIVE NOTIFICATION HUB
   ========================================================================== */

.notification-hub {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 500px;
  overflow-y: auto;
}

.notification-feed-item {
  background: rgba(255, 255, 255, 0.005);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 16px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.notif-channel-icon {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.notif-channel-email { background: rgba(59, 130, 246, 0.05); color: #3b82f6; border: 1px solid rgba(59, 130, 246, 0.15); }
.notif-channel-whatsapp { background: rgba(16, 185, 129, 0.05); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.15); }

.notif-feed-content {
  flex-grow: 1;
}

.notif-feed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.notif-feed-title {
  font-weight: 700;
  font-size: 13px;
}

.notif-feed-time {
  font-size: 10px;
  color: var(--text-muted);
}

.notif-feed-msg {
  font-size: 11px;
  color: var(--text-muted);
  white-space: pre-line;
  background: rgba(0, 0, 0, 0.2);
  padding: 12px;
  border-radius: 4px;
  font-family: monospace;
  border: 1px solid rgba(255,255,255,0.01);
}

/* ==========================================================================
   ADMIN LIGHT MODE COHESION OVERRIDES
   ========================================================================== */
.theme-light.admin-body, .theme-light .admin-body {
  background-color: #f6f5f2;
  color: #21262d;
}

.theme-light .dashboard-sidebar {
  background-color: #ffffff;
  border-right: 1px solid rgba(150, 125, 91, 0.08);
}

.theme-light .sidebar-brand {
  color: #21262d;
}

.theme-light .sidebar-menu-item {
  color: #647084;
}

.theme-light .sidebar-menu-item:hover, 
.theme-light .sidebar-menu-item.active {
  color: #21262d;
  background: rgba(150, 125, 91, 0.04);
}

.theme-light .sidebar-menu-item.active {
  border-left-color: var(--accent-gold);
  background: linear-gradient(90deg, rgba(150, 125, 91, 0.06) 0%, transparent 100%);
}

.theme-light .sidebar-footer {
  border-top-color: rgba(150, 125, 91, 0.08);
}

.theme-light .telemetry-card {
  background: #ffffff;
  border-color: rgba(150, 125, 91, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.theme-light .telemetry-value {
  color: #21262d;
}

.theme-light .admin-card {
  background: #ffffff;
  border-color: rgba(150, 125, 91, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.theme-light .admin-card-title {
  color: #21262d;
}

.theme-light .admin-table th {
  color: #647084;
  border-bottom-color: rgba(150, 125, 91, 0.08);
}

.theme-light .admin-table td {
  color: #333333;
  border-bottom-color: rgba(0, 0, 0, 0.04);
}

.theme-light .security-gate {
  background: radial-gradient(circle at center, #ffffff 0%, #f6f5f2 100%);
}

.theme-light .security-card {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(150, 125, 91, 0.1);
  box-shadow: 0 20px 50px rgba(150, 125, 91, 0.1);
}

.theme-light .security-logo {
  color: #21262d;
}

.theme-light .security-status-icon {
  background: rgba(0, 0, 0, 0.01);
  border-color: rgba(0, 0, 0, 0.05);
}

.theme-light .notif-feed-msg {
  background: #f8fafc;
  color: #334155;
  border-color: #e2e8f0;
}

.theme-light .notification-feed-item {
  background: #ffffff;
  border-color: rgba(150, 125, 91, 0.08);
}

/* ==========================================================================
   DRAG AND DROP FILE UPLOAD ZONE
   ========================================================================== */
.upload-drop-zone {
  border: 2px dashed rgba(197, 168, 128, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.01);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-fast);
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.theme-light .upload-drop-zone {
  border-color: rgba(150, 125, 91, 0.3);
  background: #f8f7f4;
}

.upload-drop-zone:hover, .upload-drop-zone.dragover {
  border-color: var(--accent-gold);
  background: rgba(197, 168, 128, 0.04);
}

.theme-light .upload-drop-zone:hover, .theme-light .upload-drop-zone.dragover {
  background: rgba(150, 125, 91, 0.05);
}

.upload-drop-zone i {
  font-size: 24px;
  color: var(--accent-gold);
}

.upload-drop-zone span {
  font-size: 11px;
  color: var(--text-muted);
}

.upload-thumbnails-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.upload-thumbnail-container {
  position: relative;
  width: 60px;
  height: 60px;
}

.upload-thumbnail {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.upload-thumbnail-remove {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ef4444;
  color: white;
  font-size: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

