:root {
  color-scheme: light;
  --blue-900: #061731;
  --blue-800: #0b2447;
  --blue-700: #12376d;
  --blue-600: #1a4b92;
  --blue-500: #2463c8;
  --blue-400: #4b8dff;
  --blue-200: #d3e5ff;
  --neutral-50: #f5f7fb;
  --neutral-100: #e6ecf7;
  --neutral-400: #94a3b8;
  --neutral-800: #1f2937;
  --white: #ffffff;
  --shadow: 0 18px 40px rgba(10, 35, 72, 0.2);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at top, #0f2a58 0%, #09172f 45%, #050c1f 100%);
  min-height: 100vh;
  color: var(--neutral-800);
}

main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.app-main {
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
}

.panel {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--shadow);
  max-width: 1100px;
  width: min(1100px, 100%);
}

.panel.logged-in {
  max-width: none;
  width: 100%;
  min-height: 100vh;
  padding: 0;
  overflow: hidden;
  border-radius: 0;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.brand span {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue-500);
  font-weight: 600;
}

.brand h1 {
  margin: 0;
  font-size: 32px;
  color: var(--blue-900);
}

.badge {
  background: linear-gradient(120deg, var(--blue-400), var(--blue-600));
  color: var(--white);
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 12px;
}

.login-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  align-items: center;
}

.login-card {
  background: var(--neutral-50);
  border-radius: 18px;
  padding: 28px;
  box-shadow: inset 0 0 0 1px rgba(36, 99, 200, 0.2);
}

.login-card h2 {
  margin-top: 0;
  font-size: 24px;
  color: var(--blue-800);
}

label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--neutral-400);
  margin-bottom: 6px;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--neutral-100);
  padding: 12px 14px;
  font-size: 14px;
  background: var(--white);
  margin-bottom: 16px;
}

button {
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 600;
  background: linear-gradient(120deg, var(--blue-500), var(--blue-700));
  color: var(--white);
  cursor: pointer;
  width: 100%;
  font-size: 14px;
  letter-spacing: 0.04em;
}

button.secondary {
  background: var(--neutral-100);
  color: var(--blue-700);
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  color: var(--blue-700);
  background: var(--neutral-100);
}

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--neutral-50);
  border-radius: 18px;
  padding: 20px;
  box-shadow: inset 0 0 0 1px rgba(36, 99, 200, 0.15);
  min-height: 200px;
}

.card h3 {
  margin-top: 0;
  color: var(--blue-800);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.topbar button {
  width: auto;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.ticket-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ticket-selector select {
  margin-bottom: 0;
  min-width: 180px;
}

.ticket-selector button {
  width: auto;
}

.app-shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--blue-900);
  color: var(--white);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.sidebar-brand span {
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--blue-200);
}

.sidebar-brand strong {
  display: block;
  font-size: 20px;
  margin-top: 6px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nav-item {
  text-decoration: none;
  color: var(--blue-200);
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 12px;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-icon {
  width: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.nav-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-meta {
  font-size: 11px;
  font-weight: 500;
  color: rgba(211, 229, 255, 0.7);
}

.nav-item.active,
.nav-item:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.sidebar-card {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 16px;
  font-size: 13px;
}

.sidebar-card span {
  display: block;
  color: var(--blue-200);
  margin-bottom: 6px;
}

.content {
  padding: 32px;
}

.section {
  margin-bottom: 20px;
}

.admin-hint {
  margin: 8px 0 20px;
  color: var(--neutral-400);
  font-size: 14px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.admin-choice {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: 16px;
  text-decoration: none;
  color: var(--blue-800);
  background: var(--white);
  border: 1px solid rgba(36, 99, 200, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-choice span {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--neutral-400);
}

.admin-choice strong {
  font-size: 15px;
}

.admin-choice:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(36, 99, 200, 0.12);
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.admin-nav-link {
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  background: rgba(36, 99, 200, 0.12);
  color: var(--blue-700);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.admin-nav-link.active {
  background: var(--blue-600);
  color: var(--white);
}

.admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.inline-form {
  margin: 0;
}

.inline-form button {
  width: auto;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.card-header span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--neutral-400);
}

.card-header h3 {
  margin: 6px 0 0;
}

.table-card {
  padding: 24px;
}

.table-toolbar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 18px;
}

.table-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.table-filters label {
  margin-bottom: 6px;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.table-actions button {
  width: auto;
}

.table-wrapper {
  overflow-x: auto;
}

.incident-browser {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 20px;
  margin-top: 16px;
}

.incident-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--neutral-100);
  border-radius: 16px;
  padding: 16px;
  background: var(--white);
  max-height: 560px;
  overflow: hidden;
}

.incident-list-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
  overflow-y: auto;
}

.incident-list-header strong {
  display: block;
  font-size: 14px;
}

.incident-item {
  border-radius: 12px;
  border: 1px solid transparent;
}

.incident-item.is-active {
  border-color: rgba(36, 99, 200, 0.4);
  background: rgba(36, 99, 200, 0.08);
}

.incident-link {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 10px 12px;
  font-weight: 600;
  color: var(--blue-800);
  cursor: pointer;
}

.incident-link:hover {
  background: rgba(36, 99, 200, 0.08);
  border-radius: 10px;
}

.incident-empty {
  color: var(--neutral-400);
  font-size: 13px;
}

.incident-detail {
  border: 1px solid var(--neutral-100);
  border-radius: 16px;
  padding: 20px;
  background: var(--white);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.incident-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.incident-detail-header h4 {
  margin: 6px 0 0;
}

.incident-detail-id {
  font-weight: 600;
  color: var(--neutral-400);
}

.incident-detail-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.incident-detail-column h5 {
  margin: 0 0 12px;
  font-size: 14px;
}

.incident-detail-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.incident-detail-list div {
  display: grid;
  gap: 4px;
}

.incident-detail-list dt {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--neutral-400);
}

.incident-detail-list dd {
  margin: 0;
  font-weight: 600;
  color: var(--blue-800);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 960px;
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(36, 99, 200, 0.12);
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--neutral-100);
  vertical-align: top;
  font-size: 13px;
}

.data-table th {
  background: rgba(36, 99, 200, 0.08);
  color: var(--blue-800);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.data-table tbody tr:hover {
  background: rgba(36, 99, 200, 0.05);
}

.table-subtext {
  color: var(--neutral-400);
  font-size: 12px;
  margin-top: 4px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 12px;
  color: var(--blue-700);
  background: rgba(36, 99, 200, 0.12);
  text-transform: capitalize;
  white-space: nowrap;
}

.status-badge.is-progress {
  background: rgba(16, 185, 129, 0.15);
  color: #065f46;
}

.priority-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(15, 23, 42, 0.08);
  text-transform: capitalize;
}

.priority-chip .priority-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.priority-low {
  color: #15803d;
  background: rgba(34, 197, 94, 0.12);
}

.priority-medium {
  color: #b45309;
  background: rgba(234, 179, 8, 0.15);
}

.priority-high {
  color: #b91c1c;
  background: rgba(248, 113, 113, 0.18);
}

.priority-critical {
  color: #7f1d1d;
  background: rgba(220, 38, 38, 0.2);
}

.pill {
  background: rgba(36, 99, 200, 0.12);
  color: var(--blue-800);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
}

.dashboard {
  background: var(--neutral-50);
  border-radius: 18px;
  padding: 20px;
  box-shadow: inset 0 0 0 1px rgba(36, 99, 200, 0.15);
  margin-bottom: 24px;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.dashboard-header span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--neutral-400);
}

.dashboard-header h2 {
  margin: 6px 0 0;
  font-size: 24px;
  color: var(--blue-800);
}

.dashboard-total {
  text-align: right;
}

.dashboard-total span {
  font-size: 12px;
  color: var(--neutral-400);
}

.dashboard-total strong {
  font-size: 26px;
  display: block;
  color: var(--blue-900);
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.stat-card {
  background: var(--white);
  border-radius: 14px;
  padding: 14px 16px;
  border: 1px solid var(--neutral-100);
}

.stat-card span {
  font-size: 12px;
  color: var(--neutral-400);
}

.stat-card strong {
  display: block;
  font-size: 20px;
  margin-top: 6px;
  color: var(--blue-900);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.stat span {
  font-size: 12px;
  color: var(--neutral-400);
}

.stat strong {
  font-size: 18px;
  color: var(--blue-900);
}

.list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 220px;
  overflow-y: auto;
}

.list-item {
  background: var(--white);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--neutral-100);
}

.list-item small {
  color: var(--neutral-400);
}

.notice {
  background: rgba(36, 99, 200, 0.12);
  border-left: 4px solid var(--blue-500);
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  color: var(--blue-800);
}

.notice.success {
  background: rgba(34, 197, 94, 0.15);
  border-left-color: #16a34a;
  color: #14532d;
}

.notice.warning {
  background: rgba(234, 179, 8, 0.15);
  border-left-color: #d97706;
  color: #92400e;
}

.notice.error {
  background: rgba(239, 68, 68, 0.12);
  border-left-color: #dc2626;
  color: #7f1d1d;
}

.footer {
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--neutral-400);
}

.footer a {
  color: var(--blue-500);
  text-decoration: none;
}

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