/* ZEROIXDARK PTERO - MIDNIGHT GLASS DESIGN SYSTEM */
:root {
  /* Colors */
  --bg-dark: #0a0e1a;
  --bg-mid: #0f1729;
  --bg-light: #131b33;
  --accent-cyan: #38bdf8;
  --accent-cyan-hover: #06b6d4;
  --accent-violet: #7c3aed;
  --accent-gold: #fbbf24;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --danger: #ef4444;
  --success: #10b981;
  
  /* Glass Effects */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --glow-cyan: 0 0 15px rgba(56, 189, 248, 0.4);
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', sans-serif; }
body { background: linear-gradient(135deg, var(--bg-dark), var(--bg-mid), var(--bg-light)); color: var(--text-main); min-height: 100vh; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }

/* Utilities */
.text-cyan { color: var(--accent-cyan); }
.text-gold { color: var(--accent-gold); }
.text-muted { color: var(--text-muted); }
.glass-card { background: var(--glass-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--glass-border); border-radius: 12px; box-shadow: var(--glass-shadow); padding: 20px; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.glass-card:hover { border-color: rgba(56, 189, 248, 0.3); transform: translateY(-2px); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; border-radius: 8px; border: none; cursor: pointer; font-weight: 600; transition: all 0.3s ease; }
.btn-primary { background: var(--accent-cyan); color: #000; box-shadow: var(--glow-cyan); }
.btn-primary:hover { background: var(--accent-cyan-hover); transform: translateY(-2px); box-shadow: 0 0 25px rgba(56, 189, 248, 0.6); }
.btn-secondary { background: var(--glass-bg); border: 1px solid var(--glass-border); color: var(--text-main); }
.btn-secondary:hover { background: rgba(255,255,255,0.1); }
.btn-danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.3); }
.btn-icon { background: transparent; border: none; color: var(--text-muted); cursor: pointer; padding: 8px; border-radius: 6px; transition: 0.2s; }
.btn-icon:hover { background: var(--glass-bg); color: var(--accent-cyan); }

/* Badges */
.badge-cyan { background: rgba(56,189,248,0.1); color: var(--accent-cyan); padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; border: 1px solid rgba(56,189,248,0.3); }
.badge-gold { background: rgba(251,191,36,0.1); color: var(--accent-gold); padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; border: 1px solid rgba(251,191,36,0.3); }
.badge-danger { background: rgba(239,68,68,0.1); color: var(--danger); padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; border: 1px solid rgba(239,68,68,0.3); }

/* Forms */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 0.9rem; color: var(--text-muted); }
.form-control { width: 100%; background: rgba(0,0,0,0.2); border: 1px solid var(--glass-border); color: #fff; padding: 12px; border-radius: 8px; outline: none; transition: 0.3s; }
.form-control:focus { border-color: var(--accent-cyan); box-shadow: 0 0 10px rgba(56,189,248,0.2); }

/* Landing Page */
.navbar { position: fixed; top: 0; width: 100%; padding: 20px 5%; display: flex; justify-content: space-between; align-items: center; z-index: 100; backdrop-filter: blur(10px); border-bottom: 1px solid var(--glass-border); }
.nav-links { display: flex; gap: 20px; }
.hero { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 100vh; padding: 100px 5% 50px; background: radial-gradient(circle at center, rgba(124,58,237,0.1) 0%, transparent 50%); }
.hero h1 { font-size: 3.5rem; margin-bottom: 20px; line-height: 1.2; text-shadow: 0 0 20px rgba(255,255,255,0.1); }
.hero p { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 30px; max-width: 600px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; padding: 40px 5%; }
.section-title { text-align: center; margin: 60px 0 30px; font-size: 2rem; }

/* Dashboard Layout */
#layout-container { display: flex; height: 100vh; }
.sidebar { width: 260px; height: 100%; display: flex; flex-direction: column; border-right: 1px solid var(--glass-border); border-radius: 0; }
.sidebar-brand { padding: 24px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--glass-border); }
.sidebar-nav { flex: 1; padding: 20px 10px; display: flex; flex-direction: column; gap: 5px; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 8px; color: var(--text-muted); transition: 0.3s; }
.nav-item:hover, .nav-item.active { background: rgba(56,189,248,0.1); color: var(--accent-cyan); }
.sidebar-profile { padding: 20px; border-top: 1px solid var(--glass-border); display: flex; align-items: center; gap: 12px; }
.sidebar-profile img { width: 40px; height: 40px; border-radius: 50%; }
.profile-info { flex: 1; display: flex; flex-direction: column; }
.profile-info .name { font-weight: bold; font-size: 0.9rem; }

.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.top-navbar { padding: 20px 30px; display: flex; justify-content: space-between; align-items: center; border-radius: 0; border-bottom: 1px solid var(--glass-border); }
#page-content { padding: 30px; overflow-y: auto; flex: 1; }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px; text-align: left; border-bottom: 1px solid var(--glass-border); }
th { color: var(--text-muted); font-weight: 500; font-size: 0.9rem; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* Toasts & Modal */
.glass-toast { position: fixed; bottom: 20px; right: 20px; padding: 15px 25px; border-radius: 8px; background: rgba(10, 14, 26, 0.9); backdrop-filter: blur(10px); border: 1px solid var(--glass-border); display: flex; align-items: center; gap: 10px; z-index: 9999; opacity: 0; transition: opacity 0.3s; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.toast-success { border-color: rgba(16, 185, 129, 0.5); color: var(--success); }
.toast-error { border-color: rgba(239, 68, 68, 0.5); color: var(--danger); }

.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(5px); z-index: 1000; align-items: center; justify-content: center; }
.modal.active { display: flex; }
.modal-content { width: 100%; max-width: 500px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }

/* Dashboard Cards (UPDATE BAGIAN INI DI style.css) */
.stats-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); /* Diperlebar */
  gap: 25px; /* Jarak antar card diperbesar */
  margin-bottom: 35px; 
}
.stat-card { 
  display: flex; 
  align-items: center; 
  gap: 20px; /* Jarak icon dan teks diperbesar */
  padding: 25px; /* Ruang dalam card diperlega */
  border-radius: 16px; /* Sudut lebih membulat */
  background: linear-gradient(145deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
}
.stat-icon { 
  width: 55px; 
  height: 55px; 
  border-radius: 14px; 
  background: rgba(56,189,248,0.1); 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  color: var(--accent-cyan); 
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.stat-info h4 { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 8px; font-weight: 500; }
.stat-info h2 { font-size: 2rem; font-weight: 700; letter-spacing: -0.5px; }

.glass-card {
  padding: 25px; /* Padding card umum diperbesar */
  border-radius: 16px;
}

/* Modal Styling untuk Tambah User */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10, 14, 26, 0.8); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; opacity: 0; pointer-events: none; transition: 0.3s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal-box {
  background: var(--bg-mid); border: 1px solid var(--glass-border);
  width: 90%; max-width: 500px; padding: 30px; border-radius: 16px;
  box-shadow: var(--glass-shadow); transform: translateY(20px); transition: 0.3s;
}
.modal-overlay.active .modal-box { transform: translateY(0); }

.expired-banner { border-color: var(--danger); background: rgba(239,68,68,0.05); text-align: center; padding: 40px; margin: 20px 0; }
.countdown-badge.expired { color: var(--danger); border-color: var(--danger); background: rgba(239,68,68,0.1); }

/* Responsive */
@media(max-width: 768px) {
  .hero h1 { font-size: 2.2rem; }
  #layout-container { flex-direction: column; }
  .sidebar { 
    width: 100%; 
    height: auto; 
    border-right: none; 
    border-bottom: 1px solid var(--glass-border); 
    flex-direction: row; 
    justify-content: space-between; 
    align-items: center;
    padding: 12px 16px; 
  }
  .sidebar-brand { 
    padding: 0; 
    border-bottom: none; 
    gap: 8px;
  }
  .sidebar-brand h2 { font-size: 1rem; }
  .sidebar-nav { display: none; }
  .sidebar-profile { 
    border: none; 
    padding: 0; 
    gap: 8px;
  }
  .sidebar-profile .profile-info { display: none; } /* Sembunyikan nama di mobile biar lebih rapi */
  .top-navbar { 
    padding: 14px 16px; 
    flex-wrap: wrap;
    gap: 8px;
  }
  #page-title { font-size: 1.15rem; }
  #page-content { padding: 16px; }
  
  .admin-header-card h3 { margin-bottom: 12px !important; }
  .admin-actions { 
    flex-direction: column; 
  }
  .admin-actions .btn { 
    width: 100%; 
    justify-content: center;
  }
  
  /* Table lebih nyaman di HP */
  table { font-size: 0.85rem; }
  th, td { padding: 10px 8px; white-space: nowrap; }
  
  .modal-box { 
    width: 94%; 
    padding: 20px; 
    max-height: 90vh; 
    overflow-y: auto; 
  }
  .stats-grid { gap: 12px; }
  .stat-card { padding: 16px; gap: 12px; }
}
