/* Utile Admin - Premium UrbanClap-style Dashboard */
:root {
  --primary: #FF6B35;
  --primary-dark: #E55A2B;
  --primary-soft: #FFF5F0;
  --secondary: #1A1A1A;
  --text: #2D3748;
  --text-muted: #718096;
  --success: #10B981;
  --success-soft: #ECFDF5;
  --warning: #F59E0B;
  --warning-soft: #FFFBEB;
  --danger: #EF4444;
  --danger-soft: #FEF2F2;
  --info: #3B82F6;
  --info-soft: #EFF6FF;
  --border: #E2E8F0;
  --bg: #F7FAFC;
  --sidebar-width: 260px;
  --topbar-height: 72px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(180deg, #F1F5F9 0%, #F7FAFC 50%, #EDF2F7 100%);
  color: var(--text);
  margin: 0;
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Sidebar - Premium dark */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  max-height: 100vh;
  background: linear-gradient(180deg, #0F0F0F 0%, #1A1A1A 50%, #141414 100%);
  color: #fff;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 24px rgba(0,0,0,0.15);
  overflow: hidden;
}
.sidebar-brand {
  flex-shrink: 0;
  padding: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-brand::before {
  content: '';
  width: 6px;
  height: 28px;
  background: linear-gradient(180deg, var(--primary) 0%, #FF8A5C 100%);
  border-radius: 3px;
  box-shadow: 0 0 12px rgba(255,107,53,0.4);
}
.sidebar-nav {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}
.sidebar-nav::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.3);
}
.sidebar .nav-section:last-of-type { margin-top: auto; }
.sidebar .nav-section {
  padding: 20px 16px 10px;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.4);
  font-weight: 600;
}
.sidebar a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  margin: 2px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}
.sidebar a:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}
.sidebar a.active {
  background: rgba(255,107,53,0.15);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--primary);
}
.sidebar a .nav-icon {
  width: 22px;
  text-align: center;
  font-size: 1rem;
  opacity: 0.9;
}

/* Main content */
.main {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: var(--topbar-height);
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
}
.topbar .page-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--secondary);
  letter-spacing: -0.02em;
}
.topbar .admin-info {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar .admin-info::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* Page header */
.page-header {
  margin-bottom: 28px;
}
.page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.03em;
  color: var(--secondary);
}
.page-header .subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Cards - Premium style */
.card {
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #fff;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 1rem;
  background: #fff;
  color: var(--secondary);
}
.card-body { padding: 24px; }

/* KPI Cards - Big brand style */
.kpi-card {
  padding: 24px;
  border-radius: var(--radius);
  background: #fff;
  border: none;
  box-shadow: var(--shadow);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}
.kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.kpi-card .kpi-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.kpi-card .kpi-value {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--secondary);
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.kpi-card .kpi-change {
  font-size: 0.85rem;
  margin-top: 8px;
  color: var(--text-muted);
}
.kpi-card .kpi-change.positive { color: var(--success); font-weight: 600; }
.kpi-card .kpi-change.negative { color: var(--danger); font-weight: 600; }
.kpi-card.accent { border-left: 4px solid var(--primary); }
.kpi-card.accent::before { background: var(--primary); }
.kpi-card.success { border-left: 4px solid var(--success); }
.kpi-card.success::before { background: var(--success); }
.kpi-card.warning { border-left: 4px solid var(--warning); }
.kpi-card.warning::before { background: var(--warning); }
.kpi-card.info { border-left: 4px solid var(--info); }
.kpi-card.info::before { background: var(--info); }

/* Secondary stat cards - Premium grid */
.main .card.p-3.text-center {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all 0.25s ease;
  border: none;
  position: relative;
  overflow: hidden;
}
.main .card.p-3.text-center::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, rgba(255,107,53,0.5) 100%);
  opacity: 0;
  transition: opacity 0.2s;
}
.main .card.p-3.text-center:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.main .card.p-3.text-center:hover::before { opacity: 1; }
.main .card.p-3.text-center .text-muted { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.main .card.p-3.text-center .fs-4 { font-weight: 800; letter-spacing: -0.02em; }

/* Tables */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table {
  margin-bottom: 0;
  font-size: 0.9rem;
}
.table thead th {
  background: #F8FAFC;
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.table tbody td {
  padding: 16px 20px;
  vertical-align: middle;
  border-bottom: 1px solid #F1F5F9;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #FAFBFC; }

/* Buttons */
.btn {
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: all 0.2s ease;
}
.btn-dark {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
}
.btn-dark:hover {
  background: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
  transform: translateY(-1px);
}
.btn-outline-dark {
  border-color: var(--border);
  color: var(--text);
}
.btn-outline-dark:hover {
  background: #F8FAFC;
  border-color: var(--text-muted);
  color: var(--secondary);
}
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }

/* Badges */
.badge {
  font-weight: 600;
  font-size: 0.7rem;
  padding: 5px 12px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

/* Report filters - Premium card */
.report-filters {
  background: linear-gradient(135deg, #fff 0%, #FAFBFC 100%);
  padding: 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  margin-bottom: 28px;
  border: 1px solid var(--border);
}
.report-filters .form-label {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.report-filters .form-control {
  font-weight: 500;
}

/* Report summary */
.report-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.report-summary .summary-item {
  background: #fff;
  padding: 22px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.04);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.report-summary .summary-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary);
  opacity: 0.3;
}
.report-summary .summary-item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: rgba(255,107,53,0.2);
}
.report-summary .summary-item:hover::before { opacity: 0.8; }
.report-summary .summary-item .value.text-success { color: var(--success) !important; }
.report-summary .summary-item .label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.report-summary .summary-item .value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--secondary);
}

/* Charts - Premium */
.chart-container {
  position: relative;
  height: 340px;
  padding: 20px 0;
}
.chart-card {
  border: none;
  box-shadow: var(--shadow-md);
}
.chart-card .card-header {
  font-size: 1.05rem;
  font-weight: 700;
  padding: 20px 24px;
  background: linear-gradient(180deg, #FAFBFC 0%, #fff 100%);
}
.chart-card .card-body { padding: 28px; }

/* Activity list */
.activity-list .activity-item {
  padding: 16px 24px;
  border-bottom: 1px solid #F1F5F9;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: background 0.2s ease;
}
.activity-list .activity-item:hover { background: #FAFBFC; }
.activity-list .activity-item:last-child { border-bottom: none; }
.activity-list .activity-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  margin-top: 8px;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(255,107,53,0.2);
}
.activity-list .activity-content { flex: 1; }
.activity-list .activity-time {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--text-muted);
}
.empty-state .empty-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  opacity: 0.4;
}

/* Quick Actions */
.main .card.p-4 .fw-semibold {
  font-size: 1rem;
  color: var(--secondary);
  margin-bottom: 16px;
}
.main .card.p-4 .btn {
  margin: 4px;
}

/* Form controls */
.form-control, .form-select {
  border-radius: var(--radius-sm);
  border-color: var(--border);
  padding: 10px 14px;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,107,53,0.15);
}

/* Container */
.main .container-fluid {
  padding: 28px 32px;
  flex: 1;
}

/* Nav tabs */
.nav-tabs {
  border-bottom: 2px solid var(--border);
}
.nav-tabs .nav-link {
  font-weight: 600;
  color: var(--text-muted);
  border: none;
  border-bottom: 3px solid transparent;
  padding: 14px 20px;
  border-radius: 0;
}
.nav-tabs .nav-link:hover { color: var(--secondary); }
.nav-tabs .nav-link.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: transparent;
}

/* Export button */
.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

/* Row spacing */
.row.g-4 { --bs-gutter-y: 1.5rem; --bs-gutter-x: 1.5rem; }
.row.g-3 { --bs-gutter-y: 1rem; --bs-gutter-x: 1rem; }
.row.mb-4 { margin-bottom: 2rem; }

/* Responsive */
@media (max-width: 768px) {
  .sidebar { width: 72px; padding: 0; }
  .sidebar .brand span, .sidebar .nav-section, .sidebar a span:not(.nav-icon) { display: none; }
  .sidebar .brand::before { margin: 0 auto; }
  .main { margin-left: 72px; }
  .topbar .page-title { font-size: 1.1rem; }
  .main .container-fluid { padding: 16px; }
}
