@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;600;700&display=swap');
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif; background: #1a1b2e; color: #c8cad0; }

/* ── Sidebar ── */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 230px; background: #15162a;
  color: #fff; padding: 20px 0;
  position: fixed; height: 100vh; overflow-y: auto;
  border-right: 1px solid rgba(255,255,255,0.06);
}
.sidebar-header { padding: 0 20px 20px; border-bottom: 1px solid rgba(255,255,255,0.06); margin-bottom: 10px; }
.sidebar-header h2 {
  font-size: 17px; color: #7c8aff; font-weight: 700; letter-spacing: 1px;
}
.sidebar-header small { color: rgba(255,255,255,0.25); font-size: 11px; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 20px; color: rgba(255,255,255,0.4); text-decoration: none; font-size: 13px;
  transition: all 0.2s; border-left: 3px solid transparent;
}
.sidebar-nav a:hover { background: rgba(124,138,255,0.06); color: rgba(255,255,255,0.8); border-left-color: rgba(124,138,255,0.3); }
.sidebar-nav a.active { background: rgba(124,138,255,0.1); color: #a0aaff; border-left-color: #7c8aff; }
.sidebar-nav a .icon { width: 20px; text-align: center; }
.sidebar-footer {
  position: absolute; bottom: 0; width: 100%; padding: 15px 20px;
  border-top: 1px solid rgba(255,255,255,0.06); background: rgba(0,0,0,0.15);
}
.sidebar-footer .user-info { font-size: 12px; color: rgba(255,255,255,0.35); margin-bottom: 8px; }
.sidebar-footer .btn { width: 100%; font-size: 12px; padding: 8px; }

/* ── Main ── */
.main { flex: 1; margin-left: 230px; padding: 24px; background: #1a1b2e; }
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 20px; font-weight: 700; color: #e2e4ea; }
.page-header p { color: rgba(255,255,255,0.3); font-size: 13px; margin-top: 4px; }

/* ── Stats Cards ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: #1f2037; padding: 20px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05);
  transition: all 0.3s;
}
.stat-card:hover { border-color: rgba(124,138,255,0.2); }
.stat-card .label { font-size: 12px; color: rgba(255,255,255,0.35); text-transform: uppercase; letter-spacing: 1px; }
.stat-card .value { font-size: 28px; font-weight: 700; margin-top: 4px; color: #7c8aff; }
.stat-card .sub { font-size: 12px; color: rgba(255,255,255,0.25); margin-top: 4px; }

/* ── Cards ── */
.card {
  background: #1f2037; border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05);
  padding: 20px; margin-bottom: 24px;
}
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.card-header h3 { font-size: 15px; font-weight: 600; color: rgba(255,255,255,0.7); }

/* ── Table ── */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  background: rgba(124,138,255,0.05); padding: 10px 12px; text-align: left;
  font-weight: 600; color: rgba(124,138,255,0.6); border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px;
}
tbody td { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.03); color: rgba(255,255,255,0.6); }
tbody tr:hover { background: rgba(124,138,255,0.03); }

/* ── Buttons ── */
.btn {
  padding: 8px 18px; border: none; border-radius: 8px; font-size: 13px;
  cursor: pointer; transition: all 0.2s; font-weight: 500;
}
.btn-primary { background: #5b6abf; color: #fff; }
.btn-primary:hover { background: #6b7ad0; }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-success { background: #3d9970; color: #fff; }
.btn-success:hover { background: #4aad80; }
.btn-danger { background: #c0392b; color: #fff; }
.btn-danger:hover { background: #d04535; }
.btn-secondary { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.6); border: 1px solid rgba(255,255,255,0.08); }
.btn-secondary:hover { background: rgba(255,255,255,0.12); }
.btn-warning { background: #d4a017; color: #1a1b2e; }

/* ── Form inputs ── */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 4px; color: rgba(255,255,255,0.45); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 10px 12px;
  background: #262840; border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px; color: #d0d2d8; font-size: 14px; outline: none;
  transition: all 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: #5b6abf;
}
.form-group input::placeholder, .form-group textarea::placeholder { color: rgba(255,255,255,0.18); }
.form-group select option { background: #262840; color: #d0d2d8; }

/* ── Badges ── */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600;
}
.badge-pending { background: rgba(212,160,23,0.15); color: #d4a017; }
.badge-assigned { background: rgba(91,106,191,0.15); color: #7c8aff; }
.badge-contacted { background: rgba(61,153,112,0.15); color: #4aad80; }
.badge-joined { background: rgba(52,152,219,0.15); color: #5dade2; }
.badge-opened { background: rgba(39,174,96,0.15); color: #27ae60; }
.badge-lost { background: rgba(192,57,43,0.15); color: #e74c3c; }
.badge-active { background: rgba(39,174,96,0.15); color: #27ae60; }
.badge-disabled { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.3); }
.badge-banned { background: rgba(192,57,43,0.15); color: #e74c3c; }
.badge-resting { background: rgba(212,160,23,0.15); color: #d4a017; }

/* ── Modal ── */
.modal-overlay {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6); z-index: 1000; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-overlay.show { display: flex; }
.modal {
  background: #1f2037; border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px; padding: 28px; width: 100%; max-width: 500px;
  max-height: 80vh; overflow-y: auto;
}
.modal h3 { font-size: 16px; margin-bottom: 16px; color: #a0aaff; }
.modal .form-actions { display: flex; gap: 10px; margin-top: 20px; justify-content: flex-end; }

/* ── Toolbar ── */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar input, .toolbar select {
  padding: 7px 12px; background: #262840;
  border: 1px solid rgba(255,255,255,0.08); border-radius: 8px;
  font-size: 13px; color: #d0d2d8;
}

/* ── Error ── */
.error-msg { color: #e74c3c; font-size: 13px; margin-top: 8px; display: none; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.15); }
::-webkit-scrollbar-thumb { background: rgba(124,138,255,0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(124,138,255,0.35); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
}
