/* ===== Asset Event Tracker — Design System Dark (Roster Style) ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #0f0e1a; --bg-2: #141228; --bg-3: #1a1838;
  --card: rgba(38, 33, 92, 0.25); --card-solid: #1a1838;
  --border: rgba(127, 119, 221, 0.2); --border-hover: rgba(127, 119, 221, 0.45);
  --purple: #7F77DD; --purple-dark: #5a52b8; --purple-light: rgba(127, 119, 221, 0.15);
  --teal: #5DCAA5; --teal-light: rgba(93, 202, 165, 0.15);
  --yellow: #F5A623; --yellow-light: rgba(245, 166, 35, 0.15);
  --red: #E05C6E; --red-light: rgba(224, 92, 110, 0.15);
  --gray: #8884c4;
  --text: #EEEDFE; --text-muted: #9b97d4; --text-light: #6b67a8;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --radius: 12px; --radius-sm: 8px; --radius-lg: 18px;
  --shadow: 0 2px 8px rgba(0,0,0,0.3), 0 0 0 1px rgba(127,119,221,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4), 0 0 0 1px rgba(127,119,221,0.1);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(127,119,221,0.15);
  --glow-purple: 0 0 24px rgba(127, 119, 221, 0.25);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font); background: var(--bg); color: var(--text);
  min-height: 100vh; -webkit-font-smoothing: antialiased;
}
a { color: var(--purple); text-decoration: none; }
button { font-family: var(--font); cursor: pointer; }
input, select, textarea { font-family: var(--font); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #3C3489; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--purple); }
.hidden { display: none !important; }

/* Particles canvas */
#particles-canvas {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes shimmerBtn { 0% { left: -80%; } 100% { left: 120%; } }

/* ===== LOGIN ===== */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1; padding: 20px;
}
.login-card {
  background: rgba(26, 24, 56, 0.85); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px; width: 100%; max-width: 400px;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(127,119,221,0.1);
  backdrop-filter: blur(20px); animation: slideUp 0.4s ease;
}
.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo h1 {
  font-size: 2rem; font-weight: 800;
  background: linear-gradient(135deg, #7F77DD 0%, #5DCAA5 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  letter-spacing: -0.04em;
}
.login-logo p { color: var(--text-muted); font-size: 0.88rem; margin-top: 6px; }

/* ===== LAYOUT ===== */
.app-layout { display: flex; min-height: 100vh; position: relative; z-index: 1; }

/* Sidebar */
.sidebar {
  width: 240px; background: linear-gradient(180deg, rgba(20,18,40,0.88) 0%, rgba(15,14,26,0.95) 100%);
  border-right: 1px solid rgba(127,119,221,0.15); display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
  backdrop-filter: blur(32px) saturate(1.4); box-shadow: 4px 0 32px rgba(0,0,0,0.4);
  transition: width 0.3s cubic-bezier(.4,0,.2,1); overflow: hidden;
}
.sidebar::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--purple), var(--teal), transparent); opacity: 0.5; z-index: 1;
}
.sidebar-collapsed .sidebar { width: 68px; }
.sidebar-collapsed .sidebar-header-info, .sidebar-collapsed .nav-label, .sidebar-collapsed .sidebar-footer-role {
  opacity: 0; width: 0; overflow: hidden; white-space: nowrap;
}
.sidebar-collapsed .sidebar-header { justify-content: center; padding: 16px 0; gap: 0; }
.sidebar-collapsed .nav-item { justify-content: center; margin: 2px 6px; padding: 10px; }
.sidebar-collapsed .main-content { margin-left: 68px; }

.sidebar-header {
  padding: 18px 16px 14px; border-bottom: 1px solid rgba(127,119,221,0.12);
  display: flex; align-items: center; gap: 12px; position: relative;
}
.sidebar-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), rgba(15,14,26,0.6));
  display: flex; align-items: center; justify-content: center; position: relative; flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(15,14,26,0.9), 0 0 16px rgba(127,119,221,0.2);
}
.avatar-initial { font-size: 1rem; font-weight: 700; color: #fff; text-transform: uppercase; }
.avatar-status {
  position: absolute; bottom: 0; right: 0; width: 10px; height: 10px;
  background: #22c55e; border-radius: 50%; border: 2px solid rgba(20, 18, 40, 0.95);
  box-shadow: 0 0 8px rgba(34,197,94,0.6);
}
.sidebar-header-info { flex: 1; min-width: 0; }
.sidebar-brand-text {
  font-size: 1rem; font-weight: 800; letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--purple), var(--teal));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.sidebar-user-name { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }

.sidebar-nav { flex: 1; padding: 8px 0; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px; margin: 2px 8px;
  border-radius: 10px; color: var(--text-muted); font-size: 0.85rem; font-weight: 500;
  cursor: pointer; transition: all 0.2s; position: relative; overflow: hidden;
}
.nav-item:hover { background: rgba(127,119,221,0.08); color: var(--text); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(127,119,221,0.16) 0%, rgba(93,202,165,0.08) 100%);
  color: #fff; font-weight: 600;
  box-shadow: 0 0 20px rgba(127,119,221,0.1), inset 0 0 0 1px rgba(127,119,221,0.18);
}
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 20%; bottom: 20%; width: 3px;
  background: linear-gradient(180deg, var(--purple), var(--teal)); border-radius: 0 4px 4px 0;
}
.nav-icon { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1rem; }
.nav-label { flex: 1; white-space: nowrap; }

.sidebar-footer {
  padding: 10px 12px; border-top: 1px solid rgba(127,119,221,0.12);
  background: rgba(10, 9, 18, 0.4); display: flex; align-items: center; gap: 4px;
}
.sidebar-footer-btn {
  display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 8px;
  font-size: 0.75rem; font-weight: 500; color: var(--text-muted); cursor: pointer;
  transition: all 0.2s; border: none; background: none; width: 100%;
}
.sidebar-footer-btn:hover { background: rgba(224,92,110,0.1); color: var(--red); }

/* Mobile */
.mobile-hamburger {
  display: none; position: fixed; top: 12px; left: 12px; z-index: 150;
  background: rgba(20,18,40,0.9); backdrop-filter: blur(12px);
  border: 1px solid var(--border); border-radius: 10px; padding: 8px;
  color: var(--text); cursor: pointer; box-shadow: var(--shadow);
}
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(6px); z-index: 99; }
.mobile-sidebar-open .sidebar-overlay { display: block; }
.mobile-sidebar-open .sidebar { transform: translateX(0) !important; }

/* Main */
.main-content { margin-left: 240px; flex: 1; padding: 28px; min-height: 100vh; position: relative; z-index: 1; transition: margin-left 0.3s; }
.page-header { margin-bottom: 24px; }
.page-header h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.page-header p { color: var(--text-muted); margin-top: 4px; font-size: 0.9rem; }
.page-header-row { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* Cards */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; backdrop-filter: blur(12px); box-shadow: var(--shadow);
  animation: fadeIn 0.2s ease; transition: border-color 0.3s, box-shadow 0.3s;
}
.card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-md); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
.card-title { font-size: 1rem; font-weight: 600; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card {
  border-radius: 14px; padding: 1.4rem 1rem 1.2rem; text-align: center;
  border: 1px solid var(--border); position: relative; overflow: hidden;
  backdrop-filter: blur(12px); transition: all 0.25s;
}
.stat-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(0,0,0,0.4); }
.stat-card.blue   { background: linear-gradient(135deg, rgba(127,119,221,0.2) 0%, rgba(90,82,184,0.15) 100%); border-color: rgba(127,119,221,0.25); box-shadow: 0 4px 16px rgba(127,119,221,0.15); }
.stat-card.green  { background: linear-gradient(135deg, rgba(93,202,165,0.2) 0%, rgba(93,202,165,0.1) 100%); border-color: rgba(93,202,165,0.25); box-shadow: 0 4px 16px rgba(93,202,165,0.15); }
.stat-card.yellow { background: linear-gradient(135deg, rgba(245,166,35,0.2) 0%, rgba(245,166,35,0.1) 100%); border-color: rgba(245,166,35,0.25); box-shadow: 0 4px 16px rgba(245,166,35,0.15); }
.stat-card.purple { background: linear-gradient(135deg, rgba(127,119,221,0.25) 0%, rgba(93,202,165,0.1) 100%); border-color: rgba(127,119,221,0.3); box-shadow: 0 4px 16px rgba(127,119,221,0.2); }
.stat-icon { font-size: 2rem; margin-bottom: .5rem; position: relative; z-index: 1; }
.stat-card .stat-value {
  font-size: 2.2rem; font-weight: 800; line-height: 1; position: relative; z-index: 1; color: #fff;
}
.stat-card .stat-label { color: rgba(255,255,255,0.65); font-size: .78rem; margin-top: .35rem; position: relative; z-index: 1; font-weight: 500; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px;
  border-radius: var(--radius-sm); font-size: 0.875rem; font-weight: 500;
  cursor: pointer; border: 1px solid transparent; transition: all 0.15s; white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
  color: white; box-shadow: 0 2px 8px rgba(127,119,221,0.3); overflow: hidden; position: relative;
}
.btn-primary::after {
  content: ''; position: absolute; top: -50%; left: -80%; width: 60%; height: 200%;
  background: rgba(255,255,255,0.12); transform: skewX(-20deg); pointer-events: none;
}
.btn-primary:hover::after { animation: shimmerBtn 0.55s ease forwards; }
.btn-primary:hover { box-shadow: 0 4px 20px rgba(127,119,221,0.55); transform: translateY(-1px); }
.btn-secondary { background: rgba(127,119,221,0.1); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--border-hover); background: rgba(127,119,221,0.2); }
.btn-success { background: linear-gradient(135deg, var(--teal) 0%, #3aaa88 100%); color: #0f0e1a; font-weight: 600; box-shadow: 0 2px 8px rgba(93,202,165,0.3); }
.btn-success:hover { box-shadow: 0 4px 16px rgba(93,202,165,0.5); transform: translateY(-1px); }
.btn-danger { background: rgba(224, 92, 110, 0.2); color: var(--red); border-color: rgba(224, 92, 110, 0.3); }
.btn-danger:hover { background: var(--red); color: white; }
.btn-warning { background: rgba(245, 166, 35, 0.2); color: var(--yellow); border-color: rgba(245, 166, 35, 0.3); }
.btn-warning:hover { background: var(--yellow); color: #0f0e1a; }
.btn-sm { padding: 5px 10px; font-size: 0.78rem; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.83rem; font-weight: 500; color: var(--text-muted); margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="time"], input[type="url"],
input[type="file"], select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.875rem; color: var(--text); background: rgba(15, 14, 26, 0.6);
  transition: border-color 0.15s, box-shadow 0.15s; font-family: var(--font);
}
input::placeholder, textarea::placeholder { color: var(--text-light); }
select option { background: #1a1838; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(127,119,221,0.15); }
textarea { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Tables */
.table-container { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
th {
  font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.05em; padding: 10px 14px; background: rgba(15, 14, 26, 0.6);
  border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap;
}
td { padding: 11px 14px; border-bottom: 1px solid rgba(127,119,221,0.08); font-size: 0.875rem; }
tr:hover td { background: rgba(127,119,221,0.05); }
tr:last-child td { border-bottom: none; }
.table-actions { display: flex; gap: 6px; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(8, 7, 18, 0.7); backdrop-filter: blur(8px);
  z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal {
  background: rgba(26, 24, 56, 0.97); border: 1px solid var(--border); border-radius: var(--radius-lg);
  width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(127,119,221,0.1); backdrop-filter: blur(20px);
}
.modal-header {
  padding: 20px 24px 16px; display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: rgba(26, 24, 56, 0.98); z-index: 1;
  border-bottom: 1px solid var(--border); backdrop-filter: blur(20px);
}
.modal-header h3 { font-size: 1.05rem; font-weight: 600; }
.modal-close {
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; cursor: pointer; border: 1px solid var(--border);
  background: rgba(127,119,221,0.1); color: var(--text-muted); font-size: 1rem; flex-shrink: 0;
}
.modal-close:hover { background: rgba(224,92,110,0.2); border-color: var(--red); color: var(--red); }
.modal-body { padding: 20px 24px; }
.modal-footer {
  padding: 14px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px;
  position: sticky; bottom: 0; background: rgba(26, 24, 56, 0.98); backdrop-filter: blur(20px);
}

/* Toast */
#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 12px 18px; border-radius: var(--radius-sm); font-size: 0.875rem; font-weight: 500;
  box-shadow: var(--shadow-lg); animation: slideUp 0.3s ease; display: flex; align-items: center;
  gap: 8px; min-width: 220px; max-width: 360px; border: 1px solid transparent; backdrop-filter: blur(12px);
}
.toast-success { background: rgba(93,202,165,0.2); border-color: rgba(93,202,165,0.4); color: var(--teal); }
.toast-error { background: rgba(224,92,110,0.2); border-color: rgba(224,92,110,0.4); color: var(--red); }
.toast-info { background: rgba(127,119,221,0.2); border-color: rgba(127,119,221,0.4); color: var(--purple); }

/* Badges */
.badge {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 12px;
  font-size: 0.73rem; font-weight: 600; white-space: nowrap;
}
.badge-purple { background: rgba(127,119,221,0.2); color: var(--purple); border: 1px solid rgba(127,119,221,0.3); }
.badge-teal { background: var(--teal-light); color: var(--teal); border: 1px solid rgba(93,202,165,0.3); }
.badge-yellow { background: var(--yellow-light); color: var(--yellow); border: 1px solid rgba(245,166,35,0.3); }
.badge-red { background: var(--red-light); color: var(--red); border: 1px solid rgba(224,92,110,0.3); }
.badge-blue { background: rgba(59,130,246,0.15); color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); }
.badge-gray { background: rgba(127,119,221,0.1); color: var(--text-muted); border: 1px solid var(--border); }
.badge-superadmin { background: linear-gradient(135deg, rgba(127,119,221,0.3), rgba(93,202,165,0.3)); color: var(--teal); border: 1px solid rgba(93,202,165,0.3); }

/* Event card */
.event-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; backdrop-filter: blur(12px); box-shadow: var(--shadow);
  animation: fadeIn 0.2s ease; transition: border-color 0.3s, box-shadow 0.3s, transform 0.2s;
  margin-bottom: 12px;
}
.event-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.event-card-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; }

/* Tabs */
.tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 20px; gap: 0; overflow-x: auto; }
.tab-btn {
  padding: 10px 18px; font-size: 0.875rem; font-weight: 500; color: var(--text-muted);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: all 0.15s; background: none; border-top: none; border-left: none; border-right: none; white-space: nowrap;
}
.tab-btn:hover { color: var(--text); background: rgba(127,119,221,0.05); }
.tab-btn.active { color: var(--purple); border-bottom-color: var(--purple); }

/* Alert */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.875rem; margin-bottom: 16px; }
.alert-error { background: rgba(224,92,110,0.1); color: var(--red); border-left: 3px solid var(--red); }
.alert-success { background: rgba(93,202,165,0.1); color: var(--teal); border-left: 3px solid var(--teal); }

/* Empty state */
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 12px; opacity: 0.6; }

/* Responsive */
@media (max-width: 700px) {
  .sidebar { transform: translateX(-100%); width: 260px !important; }
  .main-content { margin-left: 0 !important; padding-top: 56px; }
  .mobile-hamburger { display: flex; }
  .form-row { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr 1fr; }
}
