*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #0f0f11;
  --bg2:        #18181c;
  --bg3:        #1e1e24;
  --border:     #2a2a35;
  --text:       #e8e8f0;
  --text2:      #9090a8;
  --text3:      #5a5a70;
  --accent:     #5865f2;
  --accent-h:   #4752c4;
  --green:      #57f287;
  --yellow:     #faa61a;
  --orange:     #f38020;
  --red:        #ed4245;
  --radius:     10px;
  --radius-lg:  16px;
  --shadow:     0 4px 24px rgba(0,0,0,0.4);
  --font:       -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html, body {
  height: 100%; background: var(--bg);
  color: var(--text); font-family: var(--font);
  font-size: 15px; line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Buttons ─────────────────────────────────────────── */
button {
  cursor: pointer; border: none; outline: none;
  font-family: var(--font); font-size: 14px;
  border-radius: var(--radius); padding: 8px 16px;
  transition: background 0.15s, opacity 0.15s, transform 0.1s, box-shadow 0.15s;
  font-weight: 500; letter-spacing: 0.01em;
}
button:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }
button:not(:disabled):active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent); color: #fff; font-weight: 600;
  box-shadow: 0 2px 8px rgba(88,101,242,0.3);
}
.btn-primary:not(:disabled):hover {
  background: var(--accent-h);
  box-shadow: 0 4px 16px rgba(88,101,242,0.4);
}

.btn-ghost {
  background: var(--bg3); color: var(--text2);
  border: 1px solid var(--border);
}
.btn-ghost:not(:disabled):hover {
  background: #25252e; color: var(--text);
  border-color: #3a3a48;
}

.btn-danger {
  background: #2a1010; color: var(--red);
  border: 1px solid #3d1515;
}
.btn-danger:not(:disabled):hover {
  background: #381515;
  border-color: #4a1a1a;
}

.btn-success {
  background: #0d2010; color: var(--green);
  border: 1px solid #1a3520;
}
.btn-success:not(:disabled):hover { background: #122818; }

/* ── Inputs ──────────────────────────────────────────── */
input, textarea, select {
  font-family: var(--font); font-size: 14px;
  color: var(--text); background: var(--bg2);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 8px 12px; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%; appearance: none; -webkit-appearance: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(88,101,242,0.15);
}
input:hover:not(:focus), textarea:hover:not(:focus), select:hover:not(:focus) {
  border-color: #3a3a48;
}
textarea { resize: vertical; min-height: 80px; }

/* Custom select arrow */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239090a8' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

/* ── Scrollbar ───────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3a3a48; }

/* ── Card ────────────────────────────────────────────── */
.card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
}

/* ── Badges ──────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; padding: 2px 8px;
  border-radius: 999px; white-space: nowrap;
  text-transform: uppercase; letter-spacing: 0.6px;
}
.badge-low      { background: #0d2010; color: #57f287; border: 1px solid #1a3520; }
.badge-medium   { background: #2a2010; color: #faa61a; border: 1px solid #3d2f10; }
.badge-high     { background: #2a1a0a; color: #f38020; border: 1px solid #3d2510; }
.badge-critical { background: #2a1010; color: #ed4245; border: 1px solid #3d1515; }
.badge-open         { background: #0d1525; color: #7eb3f7; border: 1px solid #1a2a40; }
.badge-in_progress  { background: #2a2010; color: #faa61a; border: 1px solid #3d2f10; }
.badge-pending_staff{ background: #2a1a0a; color: #f38020; border: 1px solid #3d2510; }
.badge-pending_user { background: #0d2010; color: #57f287; border: 1px solid #1a3520; }
.badge-resolved     { background: #1a1a1a; color: #5a5a70; border: 1px solid #2a2a35; }
.badge-closed       { background: #151515; color: #5a5a70; border: 1px solid #252525; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}