:root {
  --bg: #05070b;
  --panel: #0d131d;
  --panel2: #111a27;
  --border: #1f2b3d;
  --text: #e8eef8;
  --muted: #8997aa;
  --muted2: #b3bfd0;
  --accent: #8ab4ff;
  --ok: #62e6ad;
  --danger: #ff6b7a;
  --shadow: 0 28px 90px rgba(0,0,0,.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 30% -10%, rgba(80,115,180,.24), transparent 34rem),
    linear-gradient(180deg, #070a10, #05070b);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  color: #07101d;
  background: var(--accent);
  font-weight: 800;
  cursor: pointer;
}

button.secondary {
  border: 1px solid #2b3a50;
  color: var(--text);
  background: rgba(255,255,255,.04);
}

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

.layout {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 32px 0;
}

.auth-card,
.dashboard,
.panel,
.metrics article {
  border: 1px solid var(--border);
  background: rgba(13,19,29,.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.auth-card {
  width: min(430px, 100%);
  padding: 32px;
  border-radius: 26px;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 30px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid #2b3a50;
  border-radius: 14px;
  color: var(--accent);
  background: #070b11;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.brand h1 {
  font-size: 22px;
}

.brand p,
.message,
.eyebrow,
.panel header span,
.metrics span {
  color: var(--muted);
}

.form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted2);
  font-size: 13px;
}

input {
  height: 46px;
  width: 100%;
  padding: 0 14px;
  border: 1px solid #273449;
  border-radius: 12px;
  outline: none;
  color: var(--text);
  background: #070b11;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(138,180,255,.12);
}

.message {
  min-height: 20px;
  font-size: 13px;
}

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

.message.success {
  color: var(--ok);
}

.dashboard {
  width: 100%;
  padding: 28px;
  border-radius: 28px;
}

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

.dashboard-header {
  margin-bottom: 20px;
}

.eyebrow {
  margin-bottom: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .14em;
}

.dashboard-header h2 {
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -.05em;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.metrics article {
  padding: 18px;
  border-radius: 20px;
}

.metrics span {
  display: block;
  margin-bottom: 12px;
  font-size: 13px;
}

.metrics strong {
  font-size: 30px;
  letter-spacing: -.04em;
}

.panel {
  padding: 20px;
  border-radius: 22px;
  margin-top: 14px;
  box-shadow: none;
}

.panel header {
  margin-bottom: 16px;
}

.upload-form {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 12px;
}

.file-list,
.audit-list {
  display: grid;
  gap: 10px;
}

.file-row,
.audit-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 14px;
  background: #0a0f17;
}

.file-row small,
.audit-row small {
  color: var(--muted);
}

.file-name {
  overflow-wrap: anywhere;
}

.hidden {
  display: none;
}

@media (max-width: 760px) {
  .metrics,
  .upload-form,
  .file-row,
  .audit-row {
    grid-template-columns: 1fr;
  }

  .dashboard-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
