/* ==========================================
   OXO.GE Admin Panel — Design Refinements
   admin-refined.css v1.0
   Override file — loaded after admin style
   ========================================== */


/* === TASK 1: SIDEBAR === */

.adm-sidebar {
  background: #0a0f1e;
  border-right: 1px solid rgba(255,255,255,0.05);
}

/* Remove gradient — solid near-black separates admin from user dashboard */
.adm-sidebar::before {
  display: none;
}

.adm-brand {
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* Cool blue brand icon — precision over urgency */
.adm-brand-icon {
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  border-radius: 8px;
}

/* Nav items: uniform, calm */
.adm-nav-item {
  color: rgba(255,255,255,0.55);
  padding: 9px 20px;
  transition: background 0.12s ease, color 0.12s ease;
}
.adm-nav-item:hover {
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.85);
}

/* Active: white signal — selected, not alarming */
.adm-nav-item.active {
  background: rgba(255,255,255,0.08);
  border-left: 2px solid rgba(255,255,255,0.6);
  color: #fff;
  font-weight: 600;
}

/* Icons follow text opacity — no independent color system */
.adm-nav-item i {
  color: rgba(255,255,255,0.35);
  transition: color 0.12s ease;
  width: 16px;
  text-align: center;
}
.adm-nav-item:hover i,
.adm-nav-item.active i {
  color: rgba(255,255,255,0.85);
}

/* All section labels: one unified tone — unified system, not color-coded menu */
.adm-nav-label {
  color: rgba(255,255,255,0.28);
  letter-spacing: 0.1em;
  font-size: 10px;
}

/* Sidebar footer: muted back button */
.adm-back-home {
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.45);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 7px;
  transition: background 0.12s, color 0.12s;
}
.adm-back-home:hover {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.7);
}

.adm-back-link {
  color: rgba(255,255,255,0.45);
  border-radius: 7px;
  transition: background 0.12s, color 0.12s;
}
.adm-back-link:hover {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.7);
}

.adm-side-footer {
  border-top: 1px solid rgba(255,255,255,0.06);
}


/* === TASK 2: PAGE HEADER === */

/* Functional border — not decorative gradient */
.adm-page-header {
  border-bottom: 1px solid var(--gray-200);
  border-image: none;
  padding-bottom: 16px;
  margin-bottom: 24px;
}

/* Calmer heading — admin tool, not marketing */
.adm-page-header h1 {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-800);
  letter-spacing: -0.01em;
}

/* Icon as subtle accent, not gradient showpiece */
.adm-page-header h1 i {
  background: none;
  -webkit-text-fill-color: unset;
  background-clip: unset;
  color: var(--gray-400);
  margin-right: 8px;
}

.adm-page-header p {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 3px;
}

/* Server badge: green = healthy system status */
.adm-server-badge {
  background: rgba(16,185,129,0.08);
  color: #059669;
  border-color: rgba(16,185,129,0.2);
  font-size: 11px;
  font-weight: 600;
}


/* === TASK 3: STAT CARDS === */

/* Fixed 4-column grid — no orphan cards */
.adm-stats-grid {
  grid-template-columns: repeat(4, 1fr);
}

/* Physical elevation on cool-gray background */
.adm-stat-card {
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid rgba(0,0,0,0.07);
}
.adm-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
}

.adm-stat-icon {
  border-radius: 10px;
  flex-shrink: 0;
}

/* Icon backgrounds: 0.12 → 0.15 for more presence */
.adm-scolor-indigo .adm-stat-icon { background: rgba(99,102,241,0.15); }
.adm-scolor-emerald .adm-stat-icon { background: rgba(16,185,129,0.15); }
.adm-scolor-amber   .adm-stat-icon { background: rgba(245,158,11,0.15); }
.adm-scolor-purple  .adm-stat-icon { background: rgba(168,85,247,0.15); }
.adm-scolor-cyan    .adm-stat-icon { background: rgba(6,182,212,0.15); }
.adm-scolor-rose    .adm-stat-icon { background: rgba(244,63,94,0.15); }
.adm-scolor-teal    .adm-stat-icon { background: rgba(20,184,166,0.15); }

/* Value: readable, not loud */
.adm-stat-value {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.adm-stat-label {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: 3px;
}


/* === TASK 4: QUICK ACTION BUTTONS === */

/* Unified neutral style — power through restraint */
.adm-action-btn {
  background: var(--white);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
  text-decoration: none;
  cursor: pointer;
}
.adm-action-btn:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  transform: none;
  color: var(--gray-800);
}

/* Remove gradient overrides from color variants */
.adm-abtn-success,
.adm-abtn-purple,
.adm-abtn-cyan,
.adm-abtn-amber {
  background: var(--white);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.adm-abtn-success:hover,
.adm-abtn-purple:hover,
.adm-abtn-cyan:hover,
.adm-abtn-amber:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
  transform: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* Exception: danger retains its identity */
.adm-abtn-danger {
  background: var(--white);
  color: var(--danger);
  border-color: rgba(239,68,68,0.3);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.adm-abtn-danger:hover {
  background: rgba(239,68,68,0.05);
  border-color: var(--danger);
  box-shadow: 0 2px 6px rgba(239,68,68,0.1);
  transform: none;
}

.adm-quick-actions {
  gap: 8px;
}


/* === TASK 5: TABLE === */

/* Table wrapper: visual container — table no longer floats */
.adm-table-wrap {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid var(--gray-200);
  background: var(--white);
}

/* Header: whisper labels */
.adm-table thead th {
  border-bottom: 1px solid var(--gray-200);
  letter-spacing: 0.04em;
  color: var(--gray-400);
  font-weight: 600;
  font-size: 10px;
  padding: 10px 14px;
}

/* Rows: slightly denser */
.adm-table tbody td {
  padding: 11px 14px;
}

/* No orphan border at table bottom */
.adm-table tbody tr:last-child td {
  border-bottom: none;
}

/* Blue-tinted hover — distinct from gray-50 background */
.adm-table tbody tr:hover {
  background: #f8faff;
}

/* Tighter icon buttons for dense tables */
.adm-btn-icon {
  border-radius: 6px;
  width: 30px;
  height: 30px;
}


/* === TASK 6: ADS SUB-TABS === */

.adm-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 24px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.adm-tabs::-webkit-scrollbar {
  display: none;
}

/* Individual tab links */
.adm-tab-link,
.adm-tabs a,
.adm-tabs [role="tab"] {
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-500);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.adm-tab-link:hover,
.adm-tabs a:hover {
  color: var(--gray-700);
}

/* Active: black underline — precise selection signal */
.adm-tab-link.active,
.adm-tabs a.active,
.adm-tabs [role="tab"][aria-selected="true"] {
  color: var(--gray-900);
  border-bottom-color: var(--gray-900);
  font-weight: 600;
}


/* === TASK 7: FORM INPUTS === */

.adm-input {
  height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--gray-200);
  border-radius: 7px;
  font-size: 13px;
  background: var(--white);
  color: var(--gray-800);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}
.adm-input:hover {
  border-color: var(--gray-300);
}
/* Neutral focus ring — admin control, not consumer blue */
.adm-input:focus {
  border-color: var(--gray-400);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
  outline: none;
}

textarea.adm-input {
  height: auto;
  min-height: 88px;
  resize: vertical;
}

/* Uppercase micro-labels — Vercel/Railway/Supabase pattern */
.adm-form-group label,
.adm-form-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  display: block;
}

/* Native select: consistent appearance */
select.adm-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 32px;
  cursor: pointer;
}


/* === TASK 8: CONTENT BACKGROUND & CARD REFINEMENT === */

/* Cool-gray background — warm gray is consumer, cool gray is tool */
.adm-content {
  background: #f4f5f7;
}

/* Cards: lift off the cool-gray background */
.adm-card {
  box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.07);
}

/* Card header icon: neutral, not primary blue */
.adm-card-header h3 i {
  color: var(--gray-400);
}

/* Empty states: need visual container, not floating text */
.adm-empty-state {
  background: var(--white);
  border-radius: 12px;
  border: 1px dashed var(--gray-200);
  padding: 48px 20px;
  color: var(--gray-400);
}


/* === RESPONSIVE === */

@media (max-width: 1200px) {
  .adm-stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .adm-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .adm-form-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .adm-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .adm-sidebar {
    width: 100%;
    min-width: unset;
    position: fixed;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    overflow-y: auto;
  }
  .adm-sidebar.open {
    transform: translateX(0);
  }
  .adm-content {
    padding: 16px;
  }
  .adm-page-header h1 {
    font-size: 16px;
  }
  .adm-quick-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 600px) {
  .adm-stats-grid {
    grid-template-columns: 1fr;
  }
  .adm-form-grid {
    grid-template-columns: 1fr;
  }
}
