:root {
  --bg: #0f1117;
  --bg-surface: #1a1d27;
  --bg-surface-hover: #22263a;
  --bg-panel: #1e2130;
  --border: #2a2e3f;
  --text: #e1e4ed;
  --text-muted: #8b90a0;
  --text-dim: #5a5f72;
  --accent: #6c8cff;
  --accent-hover: #8aa4ff;
  --red: #ff6b6b;
  --red-dim: #3a1f1f;
  --green: #51cf66;
  --green-dim: #1f3a1f;
  --yellow: #ffd43b;
  --yellow-dim: #3a351f;
  --orange: #ff922b;
  --radius: 6px;
  --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

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

html {
  font-size: 14px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
  min-height: 100vh;
}

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

a:hover {
  color: var(--accent-hover);
}

/* Header */

#site_header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}

.header_inner {
  display: flex;
  align-items: center;
  gap: 32px;
  max-width: 1600px;
  margin: 0 auto;
  height: 52px;
}

#site_header h1 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

#site_header h1 a,
#site_header h1 a.header_logo_link {
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.header_logo {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

#site_header nav {
  display: flex;
  gap: 4px;
}

#site_header nav a {
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
}

#site_header nav a:hover {
  color: var(--text);
  background: var(--bg-surface-hover);
}

#site_header nav a.active {
  color: var(--text);
  background: var(--bg-surface-hover);
}

/* Flash */

.flash_notice {
  background: var(--green-dim);
  color: var(--green);
  padding: 10px 24px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.flash_notice form {
  display: inline;
}

.flash_resolve_all {
  font-size: 12px;
  flex-shrink: 0;
}

/* Main */

main {
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px;
}

/* Stats */

.stats_bar {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.stat {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 24px;
  flex: 1;
  text-align: center;
}

a.stat_link {
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, background 0.15s;
}

a.stat_link:hover {
  border-color: var(--accent);
  background: var(--bg-surface-hover);
}

.stat_number {
  font-size: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  color: var(--text);
}

.stat_label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* Controls */

.controls {
  margin-bottom: 24px;
}

.filter_form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

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

.filter_group label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.filter_group select,
.filter_group input {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 7px 10px;
  border-radius: var(--radius);
  font-size: 13px;
  font-family: var(--font-sans);
  min-width: 140px;
  height: 34px;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.filter_group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b7280'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}

.filter_group select:focus,
.filter_group input:focus {
  outline: none;
  border-color: var(--accent);
}

.search_input {
  min-width: 200px !important;
}

.filter_actions {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

input[type="submit"].button {
  line-height: 1.4;
  vertical-align: middle;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.4;
  box-sizing: border-box;
  text-decoration: none;
  vertical-align: middle;
}

.button:hover {
  background: var(--accent-hover);
  color: #fff;
}

.button_small {
  padding: 4px 10px;
  font-size: 12px;
  line-height: 1.4;
}

.button_secondary {
  background: var(--bg-surface-hover);
  color: var(--text-muted);
}

.button_secondary:hover {
  background: var(--border);
  color: var(--text);
}

.button_resolve {
  background: var(--green);
  color: #000;
}

.button_resolve:hover {
  background: #69d97b;
}

.button_copy {
  background: var(--bg-surface-hover);
  color: var(--text-muted);
}

.button_copy:hover {
  background: var(--border);
  color: var(--text);
}

/* Tables */

.errors_table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  table-layout: fixed;
}

.errors_table thead {
  background: var(--bg-panel);
}

.errors_table th {
  text-align: left;
  padding: 8px 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.errors_table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.errors_table tbody tr {
  cursor: pointer;
}

.errors_table tbody tr:hover {
  background: var(--bg-surface-hover);
}

.errors_table tbody tr.selected_row {
  background: rgba(108, 140, 255, 0.1);
  border-left: 2px solid var(--accent);
}

.errors_table tbody tr.selected_row:hover {
  background: rgba(108, 140, 255, 0.15);
}

.errors_table tbody tr:last-child td {
  border-bottom: none;
}

.resolved_row {
  opacity: 0.5;
}

.error_cell {
  overflow: hidden;
}

.error_cell .error_class {
  font-weight: 600;
  color: var(--red);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.error_class_link {
  color: var(--red);
  text-decoration: none;
}

.error_class_link:hover {
  text-decoration: underline;
}

.error_cell .error_message {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.error_cell .error_file {
  color: var(--text-dim);
  font-size: 11px;
  font-family: var(--font-mono);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app_badge {
  display: inline-block;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app_cell {
  overflow: hidden;
}

.controller_cell {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.time_cell {
  white-space: nowrap;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.time_cell .error_time_exact {
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.url_cell {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  word-break: break-all;
}

.count_cell {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.action_cell {
  white-space: nowrap;
  text-align: right;
}

.action_cell form {
  display: inline;
}

.action_cell .button + .button,
.action_cell .button + form,
.action_cell form + .button,
.action_cell form + form {
  margin-left: 4px;
}

.empty_state {
  text-align: center;
  color: var(--text-muted);
  padding: 60px 24px;
  font-size: 15px;
}

/* Error Detail */

.error_detail {
  max-width: 1200px;
}

.error_header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.error_header_info h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: -0.02em;
}

.error_detail_message {
  color: var(--text);
  font-size: 15px;
  margin-top: 8px;
  line-height: 1.6;
}

.error_meta {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.severity_badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.severity_error {
  background: var(--red-dim);
  color: var(--red);
}

.severity_warning {
  background: var(--yellow-dim);
  color: var(--yellow);
}

.severity_info {
  background: var(--green-dim);
  color: var(--green);
}

.status_badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.status_resolved {
  background: var(--green-dim);
  color: var(--green);
}

.status_unresolved {
  background: var(--red-dim);
  color: var(--red);
}

.error_uuid {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}

.error_header_actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.error_header_actions form {
  display: inline;
}

/* Panels */

.error_panels {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.panel h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-weight: 600;
}

.detail_table {
  width: 100%;
  border-collapse: collapse;
}

.detail_table th {
  text-align: left;
  padding: 6px 16px 6px 0;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  width: 140px;
  vertical-align: top;
}

.detail_table td {
  padding: 6px 0;
  font-size: 13px;
  word-break: break-all;
}

.detail_table code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg-panel);
  padding: 2px 6px;
  border-radius: 3px;
}

/* Backtrace */

.backtrace_container {
  position: relative;
}

.backtrace_container .button {
  margin-bottom: 8px;
  margin-right: 4px;
}

.backtrace {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.4;
  max-height: 500px;
  overflow-y: auto;
}

.backtrace_line {
  color: var(--text-dim);
  padding: 3px 0;
  word-break: break-all;
}

.backtrace_app {
  color: var(--text);
  font-weight: 500;
}

.backtrace_hidden {
  display: none;
}

/* Code Block */

.code_block {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Back link */

.back_link {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* Trend Chart */

.trend_panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
}

.trend_header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.trend_header h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

.trend_header_right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.trend_legend {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted);
}

.trend_legend_item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.trend_legend_swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.trend_legend_unresolved {
  background: var(--red);
}

.trend_legend_resolved {
  background: var(--green);
  opacity: 0.4;
}

.trend_chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 80px;
}

.trend_bar_wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  position: relative;
}

.trend_bar_stack {
  width: 100%;
  border-radius: 2px 2px 0 0;
  min-height: 0;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  cursor: default;
  overflow: hidden;
}

.trend_bar_unresolved {
  width: 100%;
  background: var(--red);
  transition: height 0.3s ease;
}

.trend_bar_resolved {
  width: 100%;
  background: var(--green);
  opacity: 0.4;
  transition: height 0.3s ease;
}

.trend_bar_stack:hover .trend_bar_unresolved {
  background: #ff8787;
}

.trend_bar_stack:hover .trend_bar_resolved {
  opacity: 0.55;
}

.trend_label {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.trend_count {
  font-size: 9px;
  color: var(--text-muted);
  position: absolute;
  top: -14px;
  font-variant-numeric: tabular-nums;
}

/* Button Active State */

.button_active {
  background: var(--accent) !important;
  color: #fff !important;
}

/* Bulk Toolbar */

.bulk_toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 10px 16px;
  margin-bottom: 12px;
}

.bulk_count {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.bulk_form {
  display: inline;
}

.checkbox_cell {
  width: 36px;
  text-align: center;
}

.checkbox_cell input[type="checkbox"] {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

/* Pagination */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.page_info {
  font-size: 13px;
  color: var(--text-muted);
}

.page_info_detail {
  color: var(--text-dim);
  font-size: 12px;
}

/* Resolve Modal */

.resolve_modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.resolve_modal_content {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
  max-width: 480px;
}

.resolve_modal_content h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
}

.resolve_modal_siblings {
  background: var(--yellow-dim);
  border: 1px solid rgba(255, 212, 59, 0.3);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 16px;
}

.resolve_modal_siblings .siblings_message {
  color: var(--yellow);
  font-size: 13px;
  line-height: 1.4;
}

.button_resolve_all {
  background: var(--orange);
  color: #000;
}

.button_resolve_all:hover {
  background: #ffa94d;
  color: #000;
}

.resolve_modal_field {
  margin-bottom: 16px;
}

.resolve_modal_field label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.resolve_modal_field textarea {
  width: 100%;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 10px;
  font-size: 13px;
  font-family: var(--font-sans);
  resize: vertical;
}

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

.resolve_modal_actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* Notes */

.notes_text {
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.notes_meta {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 8px;
}

/* Responsive - Tablet */

@media (max-width: 900px) {
  .stats_bar {
    flex-wrap: wrap;
  }

  .stat {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
  }

  .filter_form {
    flex-direction: column;
  }

  .filter_group select,
  .filter_group input {
    min-width: 0;
    width: 100%;
  }

  .error_header {
    flex-direction: column;
  }
}

/* Responsive - Mobile */

@media (max-width: 600px) {
  #site_header {
    padding: 0 12px;
  }

  .header_inner {
    height: 44px;
    gap: 12px;
  }

  #site_header h1 {
    font-size: 14px;
  }

  .header_logo {
    width: 24px;
    height: 24px;
  }

  #site_header h1 a,
  #site_header h1 a.header_logo_link {
    gap: 8px;
  }

  #site_header nav a {
    padding: 4px 8px;
    font-size: 12px;
  }

  main {
    padding: 12px;
  }

  .stats_bar {
    gap: 8px;
    margin-bottom: 16px;
  }

  .stat {
    padding: 10px 12px;
  }

  .stat_number {
    font-size: 22px;
  }

  .stat_label {
    font-size: 11px;
  }

  .trend_panel {
    padding: 12px;
    margin-bottom: 16px;
  }

  .trend_chart {
    height: 60px;
  }

  .trend_label {
    font-size: 9px;
  }

  .controls {
    margin-bottom: 16px;
  }

  .filter_group {
    width: 100%;
  }

  .filter_actions {
    flex-direction: row;
    width: 100%;
  }

  .filter_actions .button {
    flex: 1;
  }

  .search_input {
    min-width: 0 !important;
  }

  /* Card-style table on mobile */
  .errors_table,
  .errors_table thead,
  .errors_table tbody,
  .errors_table tr,
  .errors_table th,
  .errors_table td {
    display: block;
  }

  .errors_table thead {
    display: none;
  }

  .errors_table {
    border: none;
    background: none;
  }

  .errors_table tbody tr {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: flex-start;
  }

  .errors_table tbody tr:hover {
    background: var(--bg-surface-hover);
  }

  .errors_table td {
    padding: 0;
    border-bottom: none;
  }

  .errors_table td.checkbox_cell {
    display: none;
  }

  .errors_table td.error_cell {
    width: 100%;
    margin-bottom: 6px;
  }

  .errors_table td.app_cell {
    order: 2;
  }

  .errors_table td.controller_cell {
    display: none;
  }

  .errors_table td.time_cell {
    order: 3;
    font-size: 12px;
    color: var(--text-muted);
    margin-left: auto;
  }

  .errors_table td.time_cell .error_time_exact {
    display: none;
  }

  .errors_table td.action_cell {
    width: 100%;
    order: 4;
    margin-top: 8px;
    text-align: left;
    display: flex;
    gap: 6px;
  }

  .errors_table td.count_cell {
    order: 2;
    font-size: 12px;
  }

  .errors_table td.count_cell::before {
    content: '\00d7';
    color: var(--text-dim);
    margin-right: 2px;
  }

  .resolved_row {
    opacity: 0.6;
  }

  /* Bulk toolbar */
  .bulk_toolbar {
    display: none !important;
  }

  /* Pagination */
  .pagination {
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
  }

  .page_info {
    font-size: 12px;
  }

  /* Error detail mobile */
  .error_detail {
    max-width: 100%;
  }

  .error_header_info h2 {
    font-size: 18px;
  }

  .error_detail_message {
    font-size: 13px;
  }

  .error_meta {
    gap: 6px;
  }

  .error_uuid {
    display: none;
  }

  .error_header_actions {
    width: 100%;
  }

  .error_header_actions .button,
  .error_header_actions form {
    flex: 1;
  }

  .error_header_actions form .button {
    width: 100%;
  }

  .panel {
    padding: 12px;
    margin-bottom: 12px;
  }

  .detail_table th {
    width: 90px;
    font-size: 12px;
    padding: 4px 8px 4px 0;
  }

  .detail_table td {
    font-size: 12px;
    padding: 4px 0;
  }

  .backtrace {
    font-size: 11px;
    padding: 10px 12px;
    max-height: 300px;
  }

  .code_block {
    font-size: 11px;
    padding: 10px 12px;
  }

  .resolve_modal_content {
    margin: 12px;
    max-width: calc(100% - 24px);
  }

  .auth_container {
    padding-top: 24px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .auth_panel {
    padding: 20px;
  }

  .header_user {
    gap: 8px;
  }

  .header_user_name {
    display: none;
  }
}

/* ============================================
   Flash Alert
   ============================================ */

.flash_alert {
  background: var(--red-dim);
  color: var(--red);
  padding: 10px 24px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}

/* ============================================
   Auth Pages
   ============================================ */

.auth_container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 60px;
  min-height: calc(100vh - 52px);
}

.auth_panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  width: 100%;
  max-width: 420px;
}

.auth_panel h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 8px;
}

.auth_description {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.auth_form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.auth_field label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.auth_field input[type="email"],
.auth_field input[type="password"],
.auth_field input[type="text"] {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font-sans);
  width: 100%;
  box-sizing: border-box;
}

.auth_field input:focus {
  outline: none;
  border-color: var(--accent);
}

.auth_field_locked {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font-mono);
}

.auth_actions {
  margin-top: 4px;
}

.auth_actions .button,
.auth_actions input[type="submit"].button {
  width: 100%;
  padding: 10px;
  font-size: 14px;
}

.auth_links {
  text-align: center;
  font-size: 13px;
}

.auth_links a {
  color: var(--text-muted);
  text-decoration: none;
}

.auth_links a:hover {
  color: var(--accent);
}

.auth_errors {
  background: var(--red-dim);
  border: 1px solid var(--red);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 8px;
}

.auth_errors p {
  color: var(--red);
  font-size: 13px;
  line-height: 1.5;
}

/* ============================================
   Header User Section
   ============================================ */

.header_user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.header_user_link {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.header_user_link:hover {
  color: var(--text);
}

.header_user_name {
  color: var(--text-muted);
  font-size: 13px;
}

.header_user form {
  display: inline;
}
