/* ============================================
   SKYLINE ADMIN - MODERN CSS
   ============================================ */

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #6366f1;
  --primary-light: #818cf8;
  --secondary: #8b5cf6;
  --cyan: #06b6d4;
  --emerald: #10b981;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --dark-900: #030712;
  --dark-800: #0a0f1a;
  --dark-700: #111827;
  --dark-600: #1f2937;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --white: #ffffff;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, var(--dark-900) 0%, var(--dark-800) 50%, var(--dark-900) 100%);
  color: #f3f4f6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* Layout */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
  width: 280px;
  min-height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.98) 0%, rgba(3, 7, 18, 0.99) 100%);
  border-right: 1px solid rgba(255,255,255,0.06);
  z-index: 50;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--cyan) 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  color: white;
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.4);
  animation: pulse-glow 3s infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.3); }
  50% { box-shadow: 0 0 40px rgba(99, 102, 241, 0.6); }
}

.logo-text h1 {
  font-size: 20px;
  font-weight: 700;
  color: white;
}

.logo-text span {
  font-size: 11px;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* User Card */
.user-card {
  margin: 16px;
  padding: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-info p {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-info .name {
  font-weight: 600;
  font-size: 14px;
}

.user-info .email {
  font-size: 12px;
  color: var(--gray-500);
}

/* Navigation */
.sidebar-nav {
  padding: 16px;
  flex: 1;
}

.nav-section {
  margin-bottom: 24px;
}

.nav-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0 16px;
  margin-bottom: 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  color: var(--gray-400);
  transition: all 0.2s ease;
  margin-bottom: 4px;
  position: relative;
}

.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  border-radius: 0 4px 4px 0;
  transition: height 0.2s ease;
}

.nav-item:hover,
.nav-item.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.15) 0%, transparent 100%);
  color: white;
}

.nav-item:hover::before,
.nav-item.active::before {
  height: 24px;
}

.nav-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.nav-icon.blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.nav-icon.emerald { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.nav-icon.amber { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.nav-icon.pink { background: rgba(236, 72, 153, 0.15); color: #f472b6; }
.nav-icon.indigo { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.nav-icon.gray { background: rgba(107, 114, 128, 0.15); color: #9ca3af; }
.nav-icon.red { background: rgba(239, 68, 68, 0.1); color: #f87171; }

.nav-text {
  font-weight: 500;
  font-size: 14px;
}

.nav-badge {
  margin-left: auto;
  padding: 2px 10px;
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
  margin-left: 280px;
  flex: 1;
  min-height: 100vh;
}

/* Header */
.main-header {
  background: rgba(17, 24, 39, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 16px 32px;
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-title h1 {
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-title p {
  font-size: 13px;
  color: var(--gray-500);
  margin-top: 4px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.btn-icon:hover {
  background: rgba(255,255,255,0.1);
  color: white;
}

.btn-icon .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  background: var(--rose);
  border-radius: 50%;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  border-radius: 12px;
  color: white;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

/* Page Content */
.page-content {
  padding: 32px;
  position: relative;
  z-index: 1;
}

/* ============================================
   CARDS & STATS
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .stats-grid { grid-template-columns: 1fr; }
}

.stat-card {
  background: rgba(17, 24, 39, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(99, 102, 241, 0.05));
  opacity: 0;
  transition: opacity 0.3s;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 20px 40px -15px rgba(99, 102, 241, 0.2);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-card-content {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.stat-label {
  font-size: 13px;
  color: var(--gray-400);
  font-weight: 500;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  margin-top: 8px;
}

.stat-value.gradient {
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-value.emerald { color: var(--emerald); }
.stat-value.amber { color: var(--amber); }
.stat-value.purple { color: var(--secondary); }

.stat-sub {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-sub .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.stat-sub .dot.blue { background: #3b82f6; }
.stat-sub .dot.emerald { background: var(--emerald); }
.stat-sub .dot.purple { background: var(--secondary); }

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: white;
  transition: transform 0.3s;
}

.stat-card:hover .stat-icon {
  transform: scale(1.1) rotate(5deg);
}

.stat-icon.blue { background: linear-gradient(135deg, #3b82f6, #2563eb); box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3); }
.stat-icon.emerald { background: linear-gradient(135deg, var(--emerald), #059669); box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3); }
.stat-icon.amber { background: linear-gradient(135deg, var(--amber), #d97706); box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3); }
.stat-icon.purple { background: linear-gradient(135deg, var(--secondary), #7c3aed); box-shadow: 0 8px 20px rgba(139, 92, 246, 0.3); }

/* ============================================
   GLASS CARDS
   ============================================ */
.glass-card {
  background: rgba(17, 24, 39, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  overflow: hidden;
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title i {
  color: var(--primary);
}

.card-body {
  padding: 24px;
}

/* ============================================
   QUICK ACTIONS
   ============================================ */
.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.action-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.08), transparent);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 14px;
  transition: all 0.2s;
}

.action-item:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.15), transparent);
}

.action-item.emerald {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.08), transparent);
  border-color: rgba(16, 185, 129, 0.15);
}

.action-item.emerald:hover {
  border-color: rgba(16, 185, 129, 0.4);
}

.action-item.amber {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.08), transparent);
  border-color: rgba(245, 158, 11, 0.15);
}

.action-item.amber:hover {
  border-color: rgba(245, 158, 11, 0.4);
}

.action-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.action-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-icon.indigo { background: rgba(99, 102, 241, 0.2); color: #818cf8; }
.action-icon.emerald { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.action-icon.amber { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }

.action-text {
  font-weight: 500;
  font-size: 14px;
}

.action-arrow {
  color: var(--gray-500);
  transition: transform 0.2s, color 0.2s;
}

.action-item:hover .action-arrow {
  transform: translateX(4px);
  color: var(--primary);
}

/* ============================================
   TABLES
   ============================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: 16px 24px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.data-table td {
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.data-table tr {
  transition: background 0.2s;
}

.data-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.05);
}

.order-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  padding: 4px 10px;
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border-radius: 8px;
}

.client-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.client-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.client-info .name {
  font-weight: 500;
  font-size: 14px;
}

.client-info .email {
  font-size: 12px;
  color: var(--gray-500);
}

.amount {
  font-weight: 600;
  color: white;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.badge.pending {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge.paid {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge.progress {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.badge.completed {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Action Buttons */
.table-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn:hover {
  background: rgba(99, 102, 241, 0.2);
  color: #818cf8;
}

.action-btn.whatsapp:hover {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

/* Empty State */
.empty-state {
  padding: 64px 24px;
  text-align: center;
}

.empty-icon {
  width: 64px;
  height: 64px;
  background: var(--dark-700);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 28px;
  color: var(--gray-500);
}

.empty-text {
  color: var(--gray-500);
  margin-bottom: 8px;
}

.empty-link {
  color: var(--primary);
  font-size: 14px;
}

.empty-link:hover {
  color: var(--primary-light);
}

/* ============================================
   GRID LAYOUTS
   ============================================ */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
  margin-bottom: 32px;
}

@media (max-width: 1024px) {
  .grid-2 { grid-template-columns: 1fr; }
}

/* ============================================
   CHART
   ============================================ */
.chart-container {
  height: 200px;
  position: relative;
}

/* ============================================
   LINK STYLES
   ============================================ */
.link {
  color: var(--primary);
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.link:hover {
  color: var(--primary-light);
}

.link i {
  transition: transform 0.2s;
}

.link:hover i {
  transform: translateX(4px);
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.2);
}

::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.5);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.8);
}
