:root {
  --ink: #061b3a;
  --ink-soft: #18365c;
  --blue: #0b74b8;
  --blue-soft: #dfeff9;
  --gold: #bf9657;
  --paper: #ffffff;
  --mist: #f8fbfd;
  --line: #d6e4ef;
  --muted: #637287;
  --danger: #9f1d1d;
  --success: #176b3a;
  --shadow: 0 24px 70px rgba(6, 27, 58, .12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(130deg, #f2f8fc, #ffffff 44%, #e6f3fb);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: inherit;
}

.panel-header {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 48px;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid rgba(214, 228, 239, .9);
  backdrop-filter: blur(16px);
}

.panel-brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  color: var(--ink);
  text-decoration: none;
}

.panel-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.panel-nav a,
.button,
button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 7px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.panel-nav a {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--line);
}

.button-secondary {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--line);
}

.button-danger {
  color: var(--paper);
  background: var(--danger);
  border-color: var(--danger);
}

.panel-shell {
  width: min(calc(100% - 48px), 1120px);
  margin: 0 auto;
  padding: 48px 0 72px;
}

.panel-page-wide .panel-shell {
  width: min(calc(100% - 48px), 1380px);
}

.panel-card {
  padding: 34px;
  background: rgba(255, 255, 255, .9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 28px;
  align-items: start;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0 0 18px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 1.12;
}

h1 {
  font-size: 42px;
}

h2 {
  font-size: 28px;
}

p {
  margin-top: 0;
  color: var(--ink-soft);
}

.muted {
  color: var(--muted);
}

.form-grid {
  display: grid;
  gap: 18px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

input,
textarea,
select {
  width: 100%;
  min-height: 50px;
  padding: 13px 14px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
}

textarea {
  resize: vertical;
}

input[type="file"] {
  padding: 12px;
}

.hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.form-note {
  margin: -8px 0 0;
  font-size: 15px;
  font-weight: 700;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.check-row input {
  width: 20px;
  min-height: 20px;
  margin-top: 3px;
}

.dropzone {
  position: relative;
  display: grid;
  min-height: 220px;
  place-items: center;
  gap: 8px;
  padding: 34px;
  text-align: center;
  background: linear-gradient(145deg, rgba(255, 255, 255, .96), rgba(223, 239, 249, .64));
  border: 2px dashed rgba(11, 116, 184, .42);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.dropzone:hover,
.dropzone.is-dragover {
  border-color: var(--blue);
  background: linear-gradient(145deg, rgba(255, 255, 255, 1), rgba(223, 239, 249, .92));
  transform: translateY(-1px);
}

.dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzone-icon {
  display: inline-flex;
  width: 62px;
  height: 62px;
  align-items: center;
  justify-content: center;
  color: var(--paper);
  background: var(--blue);
  border-radius: 50%;
  font-size: 40px;
  line-height: 1;
}

.dropzone strong {
  color: var(--ink);
  font-size: 22px;
  letter-spacing: 0;
  text-transform: none;
}

.dropzone em {
  color: var(--muted);
  font-style: normal;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.selected-files {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.selected-files li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, .82);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.selected-files em {
  color: var(--muted);
  font-style: normal;
  white-space: nowrap;
}

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

.file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.file-actions form {
  margin: 0;
}

.file-actions .button,
.file-actions button {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 14px;
}

.flash {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  font-weight: 700;
}

.flash-success {
  color: var(--success);
  border-color: rgba(23, 107, 58, .25);
}

.flash-error {
  color: var(--danger);
  border-color: rgba(159, 29, 29, .25);
}

.form-grid + .form-note {
  margin-top: 18px;
}

.activation-account {
  overflow-wrap: anywhere;
}

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.file-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.file-table th,
.file-table td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.file-table th {
  color: var(--ink);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.file-table tr:last-child td {
  border-bottom: 0;
}

.status-pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 10px;
  color: var(--ink);
  background: var(--blue-soft);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.empty-state {
  padding: 28px;
  color: var(--muted);
  background: rgba(255, 255, 255, .72);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.panel-grid > *,
.admin-grid > * {
  min-width: 0;
}

.selected-files li > span {
  overflow-wrap: anywhere;
}

.file-table td:first-child {
  min-width: 180px;
  max-width: 420px;
  overflow-wrap: anywhere;
}

.file-table td:nth-child(2) {
  min-width: 100px;
  max-width: 260px;
  overflow-wrap: anywhere;
}

.file-table button,
.file-table .button {
  white-space: nowrap;
}

.selected-files li > span {
  min-width: 0;
}

.status-blocked {
  color: var(--danger);
  background: #fff0f0;
}

.status-saved {
  color: var(--success);
  background: #e9f5ed;
}

.upload-receipt {
  margin-bottom: 28px;
  padding: 22px 24px;
  border-left: 4px solid var(--success);
  background: #f1faf4;
  overflow-wrap: anywhere;
}

.upload-receipt-errors {
  border-color: var(--danger);
  background: #fff6f6;
}

.upload-receipt h2 {
  font-family: inherit;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
}

.upload-receipt h3 {
  font-size: 17px;
}

.upload-receipt-list {
  display: grid;
  gap: 12px;
  list-style: none;
  padding: 0;
}

.upload-receipt-list li {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.upload-receipt-list strong {
  min-width: 0;
}

.upload-error-list {
  padding-left: 20px;
}

.upload-progress {
  margin: 0;
  font-weight: 700;
}

.upload-progress-error {
  color: var(--danger);
}

button:disabled {
  opacity: .65;
  cursor: wait;
}

@media (max-width: 820px) {
  .panel-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 24px;
  }

  .panel-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .panel-card {
    padding: 24px;
  }

  h1 {
    font-size: 34px;
  }
}
