:root {
  --bg-primary: #090d16;
  --bg-card: rgba(21, 29, 46, 0.75);
  --border-color: rgba(255, 255, 255, 0.08);
  --text-main: #f1f5f9;
  --text-muted: #64748b;
  --accent-emerald: #10b981;
  --accent-cyan: #06b6d4;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --font-sans: 'Inter', system-ui, sans-serif;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  padding: 1rem;
}

.app-wrapper {
  max-width: 600px;
  margin: 0 auto;
}

header {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.brand {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--accent-emerald);
  font-weight: 700;
  letter-spacing: 0.05em;
}

h1 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-top: 0.25rem;
}

.ticket-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: transform 0.2s ease;
}

.ticket-card:hover {
  border-color: rgba(16, 185, 129, 0.4);
}

.ticket-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.ticket-id {
  font-weight: 800;
  font-size: 1rem;
  color: var(--accent-cyan);
}

.badge {
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
}

.badge-high { background: rgba(244, 63, 94, 0.2); color: var(--accent-rose); }
.badge-medium { background: rgba(245, 158, 11, 0.2); color: var(--accent-amber); }
.badge-low { background: rgba(16, 185, 129, 0.2); color: var(--accent-emerald); }

.ticket-location {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.btn-action {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-cyan));
  color: #000;
  border: none;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.btn-action:hover {
  opacity: 0.9;
}

.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.25rem;
}

.card-header {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

textarea {
  font-family: var(--font-sans);
}

textarea:focus {
  outline: none;
  border-color: var(--accent-cyan);
}

/* FD-18: modal + toast menggantikan prompt()/alert() -- keduanya bisa diblokir
   atau tampil tidak konsisten pada sebagian peramban seluler (mode standalone,
   WebView dalam aplikasi lain), pilihan buruk untuk modul yang mengklaim
   "mobile-first". */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
}

.modal-box {
  background: #111827;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.25rem;
  max-width: 420px;
  width: 100%;
}

.modal-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.modal-box textarea {
  width: 100%;
  background: rgba(9, 13, 22, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.6rem;
  color: var(--text-main);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  resize: vertical;
}

.modal-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
}

.modal-actions .btn-action {
  width: auto;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}

.btn-secondary:hover {
  border-color: var(--text-muted);
}

.toast-container {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 1100;
  max-width: 420px;
  margin: 0 auto;
  pointer-events: none;
}

.toast {
  background: #111827;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-cyan);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  cursor: pointer;
  pointer-events: auto;
  animation: toast-in 0.2s ease;
}

.toast-success { border-left-color: var(--accent-emerald); }
.toast-error { border-left-color: var(--accent-rose); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
