*{box-sizing:border-box;margin:0;padding:0}
:root{
  --bg:#08090f;
  --sidebar:#0d101a;
  --card:#121624;
  --card-hover:#161c2e;
  --card-elevated:#181e33;
  --border:#1d233a;
  --border-focus:#f5c842;
  --gold:#f5c842;
  --gold-dark:#e6b800;
  --gold-glow:rgba(245,200,66,0.18);
  --green:#22c55e;
  --green-glow:rgba(34,197,94,0.18);
  --red:#ef4444;
  --red-glow:rgba(239,68,68,0.18);
  --blue:#38bdf8;
  --purple:#a855f7;
  --text:#f1f3f9;
  --text-muted:#828ba2;
  --font:'Plus Jakarta Sans',-apple-system,BlinkMacSystemFont,sans-serif;
  --mono:'JetBrains Mono',monospace;
}
body{
  font-family:var(--font);
  background:var(--bg);
  color:var(--text);
  min-height:100vh;
  font-size:14px;
  line-height:1.5;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}
input,select,textarea,button{font-family:inherit}

/* Scrollbar */
::-webkit-scrollbar{width:6px;height:6px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:#232a42;border-radius:6px}
::-webkit-scrollbar-thumb:hover{background:#323b5c}

/* Layout */
.layout{display:flex;min-height:100vh}
.sidebar{
  width:250px;
  background:var(--sidebar);
  border-right:1px solid var(--border);
  display:flex;
  flex-direction:column;
  position:fixed;
  height:100vh;
  overflow-y:auto;
  z-index:100;
  backdrop-filter:blur(12px);
}
.main{
  margin-left:250px;
  flex:1;
  min-height:100vh;
  display:flex;
  flex-direction:column;
}
@media(max-width:900px){
  .sidebar{width:70px}
  .main{margin-left:70px}
  .logo-text, .nav-label, .sidebar-bottom-full{display:none}
  .sidebar-bottom-icon{display:flex!important}
}

/* Sidebar Branding */
.brand{
  padding:20px 18px;
  display:flex;
  align-items:center;
  gap:12px;
  border-bottom:1px solid var(--border);
  background:linear-gradient(180deg,rgba(245,200,66,0.04) 0%,transparent 100%);
}
.brand-icon{
  width:38px;
  height:38px;
  border-radius:10px;
  background:linear-gradient(135deg,#f5c842 0%,#d99b00 100%);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  color:#090b10;
  box-shadow:0 4px 14px rgba(245,200,66,0.3);
  flex-shrink:0;
}
.brand-title{
  font-size:15px;
  font-weight:800;
  letter-spacing:.3px;
  color:#fff;
  line-height:1.2;
}
.brand-title span{color:var(--gold)}
.brand-sub{
  font-size:11px;
  font-weight:500;
  color:var(--text-muted);
}

/* Navigation */
.nav{padding:14px 10px;flex:1}
.nav-section-title{
  font-size:10px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.8px;
  color:#4f5874;
  padding:10px 12px 4px;
}
.nav-item{
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 14px;
  border-radius:10px;
  cursor:pointer;
  color:var(--text-muted);
  font-size:13px;
  font-weight:600;
  transition:all .18s ease;
  margin-bottom:3px;
}
.nav-item:hover{
  color:#fff;
  background:rgba(255,255,255,0.04);
}
.nav-item.active{
  color:#0b0d14;
  background:linear-gradient(135deg,#f5c842 0%,#e6b800 100%);
  font-weight:700;
  box-shadow:0 4px 14px rgba(245,200,66,0.25);
}
.nav-icon{
  width:20px;
  text-align:center;
  font-size:14px;
}

/* Sidebar Footer */
.sidebar-bottom{
  padding:16px;
  border-top:1px solid var(--border);
  background:rgba(0,0,0,0.2);
}

/* Topbar */
.topbar{
  height:64px;
  border-bottom:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 28px;
  background:rgba(13,16,26,0.8);
  backdrop-filter:blur(12px);
  position:sticky;
  top:0;
  z-index:90;
}
.topbar-left{display:flex;align-items:center;gap:12px}
.topbar-title{font-size:16px;font-weight:700;color:#fff}
.topbar-right{display:flex;align-items:center;gap:10px}

/* Page container */
.page{padding:26px 28px;flex:1}
.page-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:24px;
  flex-wrap:wrap;
  gap:16px;
}
.page-title{font-size:20px;font-weight:800;color:#fff;letter-spacing:-.3px}
.page-sub{font-size:13px;color:var(--text-muted);margin-top:3px}

/* Stats Cards */
.stat-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:18px;
  margin-bottom:26px;
}
.stat-card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:16px;
  padding:20px;
  transition:all .2s ease;
  position:relative;
  overflow:hidden;
}
.stat-card::before{
  content:'';
  position:absolute;
  top:0;left:0;right:0;height:3px;
  background:transparent;
}
.stat-card.gold::before{background:var(--gold)}
.stat-card.green::before{background:var(--green)}
.stat-card.blue::before{background:var(--blue)}
.stat-card.purple::before{background:var(--purple)}
.stat-card.cyan::before{background:#06b6d4}
.stat-card.orange::before{background:#f97316}

.stat-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:12px;
}
.stat-label{font-size:12px;font-weight:600;color:var(--text-muted);text-transform:uppercase;letter-spacing:.5px}
.stat-icon{
  width:36px;height:36px;border-radius:10px;
  display:flex;align-items:center;justify-content:center;
  font-size:16px;
}
.stat-card.gold .stat-icon{background:var(--gold-glow);color:var(--gold)}
.stat-card.green .stat-icon{background:var(--green-glow);color:var(--green)}
.stat-card.blue .stat-icon{background:rgba(56,189,248,0.18);color:var(--blue)}
.stat-card.purple .stat-icon{background:rgba(168,85,247,0.18);color:var(--purple)}
.stat-card.cyan .stat-icon{background:rgba(6,182,212,0.18);color:#06b6d4}
.stat-card.orange .stat-icon{background:rgba(249,115,22,0.18);color:#f97316}

.stat-val{font-size:26px;font-weight:800;color:#fff;letter-spacing:-.5px;line-height:1.2}
.stat-sub{font-size:12px;color:var(--text-muted);margin-top:6px}

/* Cards */
.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:16px;
  padding:22px;
  margin-bottom:22px;
}
.card-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:18px;
}
.card-title{font-size:15px;font-weight:700;color:#fff;display:flex;align-items:center;gap:10px}

/* Search Bar & Table Controls */
.table-search-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:14px;
  gap:12px;
  flex-wrap:wrap;
}
.search-input-wrap{
  position:relative;
  min-width:280px;
}
.search-input-wrap input{
  width:100%;
  padding:9px 12px 9px 36px;
  background:#090c16;
  border:1px solid var(--border);
  border-radius:10px;
  color:#fff;
  font-size:13px;
  outline:none;
  transition:border-color .2s;
}
.search-input-wrap input:focus{
  border-color:var(--border-focus);
}
.search-input-wrap i{
  position:absolute;
  left:13px;
  top:50%;
  transform:translateY(-50%);
  color:var(--text-muted);
  font-size:13px;
}
.table-count-label{
  font-size:12px;
  color:var(--text-muted);
  font-weight:500;
}

/* Tables */
.table-wrap{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:16px;
  overflow:hidden;
  margin-bottom:20px;
}
table{width:100%;border-collapse:collapse;text-align:left}
th{
  background:#0e1220;
  padding:14px 18px;
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.7px;
  color:#737e98;
  border-bottom:1px solid var(--border);
}
td{
  padding:14px 18px;
  border-bottom:1px solid rgba(255,255,255,0.04);
  font-size:13px;
  vertical-align:middle;
}
tr:last-child td{border-bottom:none}
tbody tr:hover{background:rgba(255,255,255,0.02)}

/* Pagination */
.pagination-wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 18px;
  border-top:1px solid var(--border);
  background:#0c0f1b;
  flex-wrap:wrap;
  gap:10px;
}
.page-info{
  font-size:12px;
  color:var(--text-muted);
}
.page-info b{color:#fff}
.pagination-controls{
  display:flex;
  align-items:center;
  gap:5px;
}
.page-badge{
  background:var(--gold);
  color:#090b10;
  font-weight:800;
  font-size:12px;
  padding:4px 10px;
  border-radius:8px;
}

/* Badges */
.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px;
  border-radius:20px;
  font-size:11px;
  font-weight:700;
  letter-spacing:.3px;
}
.badge-green{background:rgba(34,197,94,0.15);color:var(--green);border:1px solid rgba(34,197,94,0.3)}
.badge-gold{background:rgba(245,200,66,0.15);color:var(--gold);border:1px solid rgba(245,200,66,0.3)}
.badge-red{background:rgba(239,68,68,0.15);color:var(--red);border:1px solid rgba(239,68,68,0.3)}
.badge-blue{background:rgba(56,189,248,0.15);color:var(--blue);border:1px solid rgba(56,189,248,0.3)}
.badge-purple{background:rgba(168,85,247,0.15);color:var(--purple);border:1px solid rgba(168,85,247,0.3)}
.badge-gray{background:rgba(255,255,255,0.06);color:var(--text-muted);border:1px solid rgba(255,255,255,0.1)}

.dot{width:6px;height:6px;border-radius:50%}
.dot-green{background:var(--green);box-shadow:0 0 8px var(--green)}
.dot-red{background:var(--red);box-shadow:0 0 8px var(--red)}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:9px 16px;
  border-radius:10px;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
  border:none;
  transition:all .18s ease;
  text-decoration:none;
}
.btn-gold{
  background:linear-gradient(135deg,#f5c842 0%,#e6b800 100%);
  color:#0a0c13;
  box-shadow:0 4px 14px rgba(245,200,66,0.25);
}
.btn-gold:hover:not(:disabled){
  transform:translateY(-1px);
  box-shadow:0 6px 20px rgba(245,200,66,0.4);
}
.btn-ghost{
  background:rgba(255,255,255,0.05);
  color:var(--text);
  border:1px solid var(--border);
}
.btn-ghost:hover:not(:disabled){
  background:rgba(255,255,255,0.08);
  border-color:rgba(255,255,255,0.2);
}
.btn-red{
  background:rgba(239,68,68,0.15);
  color:var(--red);
  border:1px solid rgba(239,68,68,0.3);
}
.btn-red:hover:not(:disabled){
  background:rgba(239,68,68,0.25);
}
.btn-blue{
  background:rgba(56,189,248,0.15);
  color:var(--blue);
  border:1px solid rgba(56,189,248,0.3);
}
.btn-blue:hover:not(:disabled){
  background:rgba(56,189,248,0.25);
}
.btn-green{
  background:rgba(34,197,94,0.18);
  color:var(--green);
  border:1px solid rgba(34,197,94,0.35);
}
.btn-green:hover:not(:disabled){
  background:rgba(34,197,94,0.28);
}
.subtabs{
  display:flex;
  gap:8px;
  margin-bottom:20px;
  overflow-x:auto;
  padding-bottom:4px;
}
.subtab-btn{
  padding:8px 16px;
  border-radius:10px;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
  background:var(--card);
  border:1px solid var(--border);
  color:var(--text-muted);
  transition:all .18s ease;
  white-space:nowrap;
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.subtab-btn:hover{
  color:#fff;
  border-color:rgba(255,255,255,0.2);
}
.subtab-btn.active{
  background:linear-gradient(135deg,#f5c842 0%,#e6b800 100%);
  color:#090b10;
  border-color:var(--gold);
  box-shadow:0 4px 14px rgba(245,200,66,0.25);
}
.btn:disabled{opacity:.5;cursor:not-allowed}
.btn-sm{padding:7px 12px;font-size:12px;border-radius:8px}
.btn-xs{padding:5px 10px;font-size:11px;border-radius:6px}

/* Form inputs */
.form-group{margin-bottom:16px}
.form-group label{
  display:block;
  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.6px;
  color:#828ba2;
  margin-bottom:6px;
}
.form-group input, .form-group select, .form-group textarea{
  width:100%;
  padding:10px 14px;
  background:#090c16;
  border:1px solid var(--border);
  border-radius:10px;
  color:#fff;
  font-size:13px;
  outline:none;
  transition:border-color .2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus{
  border-color:var(--border-focus);
}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.form-grid-3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px}
.form-grid-2-1-1{display:grid;grid-template-columns:2fr 1fr 1fr;gap:14px}
.form-grid-2-1{display:grid;grid-template-columns:2fr 1fr;gap:14px}

input[type="datetime-local"] {
  color-scheme: dark;
}
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: invert(0.85);
  opacity: 0.85;
  transition: opacity .15s, transform .15s;
}
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
  transform: scale(1.1);
}
.fs-preset-btn {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: var(--gold);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.fs-preset-btn:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--gold);
  color: #fff;
  transform: translateY(-1px);
}

/* Modals */
.overlay{
  position:fixed;top:0;left:0;right:0;bottom:0;
  background:rgba(0,0,0,0.78);
  backdrop-filter:blur(6px);
  display:flex;align-items:center;justify-content:center;
  z-index:200;
  padding:24px 16px;
  overflow-y:auto;
}
.modal{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:20px;
  padding:24px 28px;
  width:100%;
  max-width:500px;
  max-height:calc(100vh - 48px);
  display:flex;
  flex-direction:column;
  box-shadow:0 24px 60px rgba(0,0,0,0.85);
  position:relative;
  margin:auto;
}
.modal.modal-lg{
  max-width:840px;
}
.modal-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:18px;
  flex-shrink:0;
}
.modal-title{
  font-size:18px;
  font-weight:800;
  color:#fff;
  display:flex;
  align-items:center;
  gap:10px;
  margin:0;
}
.modal-close{
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.1);
  color:var(--text-muted);
  width:32px;
  height:32px;
  border-radius:8px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:all .2s ease;
}
.modal-close:hover{
  background:rgba(255,255,255,0.15);
  color:#fff;
}
.modal-body{
  overflow-y:auto;
  padding-right:6px;
  flex:1;
}
.modal-body::-webkit-scrollbar{width:6px}
.modal-body::-webkit-scrollbar-track{background:rgba(255,255,255,0.02);border-radius:3px}
.modal-body::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.15);border-radius:3px}
.modal-body::-webkit-scrollbar-thumb:hover{background:var(--gold)}
.modal-footer{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:18px;
  padding-top:14px;
  border-top:1px solid rgba(255,255,255,0.06);
  flex-shrink:0;
}
@media(max-width:768px){
  .modal{max-height:92vh;padding:18px 16px}
  .modal.modal-lg{max-width:100%}
  .form-row, .form-grid-3, .form-grid-2-1-1, .form-grid-2-1{grid-template-columns:1fr !important}
}

/* Toast */
.toast-container{
  position:fixed;
  bottom:24px;
  right:24px;
  display:flex;
  flex-direction:column;
  gap:10px;
  z-index:300;
}
.toast{
  background:#141928;
  border:1px solid var(--border);
  padding:14px 18px;
  border-radius:12px;
  font-size:13px;
  font-weight:600;
  color:#fff;
  display:flex;
  align-items:center;
  gap:12px;
  box-shadow:0 12px 30px rgba(0,0,0,0.6);
  animation:slideUp .25s ease;
}
.toast.success{border-left:4px solid var(--green)}
.toast.error{border-left:4px solid var(--red)}
@keyframes slideUp{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:translateY(0)}}
.spin{animation:spin 1s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

/* Login page */
.login-wrap{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:radial-gradient(ellipse at top,#1b2038 0%,#08090f 70%);
}
.login-box{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:24px;
  padding:44px 36px;
  width:100%;
  max-width:400px;
  box-shadow:0 20px 60px rgba(0,0,0,0.6);
  text-align:center;
}
.login-logo{
  width:64px;
  height:64px;
  border-radius:18px;
  background:linear-gradient(135deg,#f5c842 0%,#d99b00 100%);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:28px;
  color:#090b10;
  margin-bottom:18px;
  box-shadow:0 8px 24px rgba(245,200,66,0.3);
}
.login-title{font-size:22px;font-weight:800;color:#fff}
.login-sub{font-size:13px;color:var(--text-muted);margin-top:4px;margin-bottom:26px}

/* Progress bar */
.progress{height:6px;background:var(--border);border-radius:4px;overflow:hidden;margin-top:8px}
.progress-bar{height:100%;border-radius:4px;transition:width .4s ease}

/* Empty State */
.empty{text-align:center;padding:45px 20px;color:var(--text-muted)}
.empty-icon{font-size:36px;margin-bottom:10px;opacity:.6}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:20px}
@media(max-width:900px){.grid2{grid-template-columns:1fr}}
