:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  --ink: #17202a;
  --muted: #5f6c7b;
  --line: #d9e1e8;
  --surface: #ffffff;
  --soft: #f3f6f8;
  --nav: #263241;
  --nav-ink: #f7fbff;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --warn: #b45309;
  --danger: #b91c1c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--soft);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-weight: 700;
  padding: 0 16px;
}

button:hover,
button:focus {
  background: var(--accent-strong);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  margin-top: 6px;
  padding: 10px 12px;
}

label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

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

.sidebar {
  align-content: space-between;
  background: var(--nav);
  color: var(--nav-ink);
  display: grid;
  gap: 28px;
  padding: 28px 22px;
}

.sidebar h1 {
  font-size: 26px;
  line-height: 1.15;
  margin: 8px 0 0;
}

.eyebrow {
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0;
  text-transform: uppercase;
}

.sidebar .eyebrow {
  color: #9fb3c8;
}

.nav {
  display: grid;
  gap: 10px;
}

.nav button,
.user-panel button,
.page-heading button,
#back-to-tickets {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: inherit;
  text-align: left;
}

.nav button.active,
.nav button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.user-panel {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  display: grid;
  gap: 14px;
  padding-top: 18px;
}

.user-panel span,
.user-panel small {
  display: block;
}

.user-panel small {
  color: #b9c7d6;
  margin-top: 4px;
}

.main {
  padding: 30px;
}

.view {
  max-width: 1180px;
}

.hidden {
  display: none !important;
}

.alert {
  border-left: 4px solid var(--accent);
  background: #e7f6f3;
  margin-bottom: 18px;
  padding: 14px 16px;
}

.alert.error {
  background: #fff1f2;
  border-left-color: var(--danger);
}

.login-view {
  align-items: center;
  display: flex;
  min-height: calc(100vh - 60px);
}

.login-panel,
.section-block,
.form-grid,
.detail-layout {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

.login-panel {
  max-width: 420px;
  width: 100%;
}

.login-panel h2,
.page-heading h2,
.section-block h3 {
  margin: 6px 0 0;
}

.login-panel form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.page-heading {
  align-items: end;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 20px;
}

.page-heading button,
#back-to-tickets {
  border-color: var(--line);
  color: var(--ink);
}

.stats-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  margin-bottom: 18px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 92px;
  padding: 16px;
}

.stat strong {
  display: block;
  font-size: 30px;
  margin-bottom: 6px;
}

.stat span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.full {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.filters {
  display: flex;
  gap: 10px;
}

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

table {
  background: white;
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #e9eef2;
  color: #344054;
  font-size: 13px;
}

td button {
  min-height: 34px;
  padding: 0 12px;
}

.badge {
  border-radius: 999px;
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
}

.status-submitted {
  background: #eef2ff;
  color: #3730a3;
}

.status-in-progress {
  background: #ecfeff;
  color: #155e75;
}

.status-resolved {
  background: #ecfdf5;
  color: #166534;
}

.status-closed {
  background: #f3f4f6;
  color: #374151;
}

.priority-high,
.priority-critical {
  color: var(--danger);
  font-weight: 800;
}

.detail-layout {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
}

.detail-list {
  display: grid;
  gap: 10px;
}

.detail-list div {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.detail-list dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.detail-list dd {
  margin: 4px 0 0;
}

.notes {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.notes li {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  list-style: none;
  padding: 12px;
}

.support-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    align-content: start;
  }

  .stats-grid,
  .form-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .page-heading,
  .filters {
    align-items: stretch;
    flex-direction: column;
  }
}
