:root {
  color-scheme: light;
  --bg: #eef4f8;
  --panel: #ffffff;
  --panel-soft: #f7fafc;
  --text: #162033;
  --muted: #667085;
  --line: #d8e1eb;
  --line-strong: #b9c7d6;
  --accent: #0f6fae;
  --accent-dark: #0a4f7f;
  --accent-soft: #e8f3fb;
  --ok: #137a4b;
  --ok-bg: #e9f8f0;
  --bad: #b42318;
  --bad-bg: #fff1f0;
  --warning: #b7791f;
  --shadow: 0 18px 44px rgba(28, 43, 66, 0.10);
  --shadow-soft: 0 8px 22px rgba(28, 43, 66, 0.07);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(15, 111, 174, 0.13), transparent 360px),
    linear-gradient(180deg, #e4eef7 0, #f4f8fb 360px, #f8fafc 100%);
  color: var(--text);
  font: 14px/1.5 Arial, Helvetica, sans-serif;
}

main {
  width: min(1160px, calc(100% - 40px));
  margin: 28px auto 44px;
}

.app-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  margin: 0 0 28px;
  padding: 12px;
  border: 1px solid rgba(185, 199, 214, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.nav-brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding-left: 14px;
  color: #17263b;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.nav-brand::before {
  position: absolute;
  left: 0;
  width: 4px;
  height: 24px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
}

.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 4px;
  border: 1px solid rgba(216, 225, 235, 0.9);
  border-radius: 8px;
  background: #f3f7fb;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 13px;
  border-radius: 6px;
  color: #41516a;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.nav-link:hover {
  background: rgba(232, 243, 251, 0.9);
  color: var(--accent-dark);
}

.nav-link.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 111, 174, 0.24);
}

.app-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: 42px;
  line-height: 1.12;
  letter-spacing: 0;
}

code {
  color: var(--muted);
  font-size: 12px;
}

.health {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid rgba(23, 105, 170, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(28, 43, 66, 0.08);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  align-items: start;
}

section,
aside {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(216, 225, 235, 0.95);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.upload-panel,
.status {
  padding: 26px;
}

.panel-heading {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.panel-heading h2 {
  margin-bottom: 4px;
  font-size: 20px;
  line-height: 1.25;
}

.panel-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.field {
  display: grid;
  gap: 9px;
  margin-bottom: 18px;
}

label {
  color: #27364d;
  font-weight: 700;
}

input[type="file"],
input[type="text"] {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 11px 12px;
  background: var(--panel-soft);
  color: var(--text);
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

input[type="file"]:focus,
input[type="text"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(23, 105, 170, 0.14);
  outline: none;
}

input[type="file"]::file-selector-button {
  min-height: 32px;
  margin-right: 10px;
  border: 0;
  border-radius: 6px;
  padding: 7px 12px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 800;
  cursor: pointer;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.option {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 46px;
  margin: 4px 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--text);
  font-weight: 700;
}

.option input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

button {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #1478ba 0%, var(--accent) 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(15, 111, 174, 0.24);
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

button:hover {
  background: var(--accent-dark);
  box-shadow: 0 14px 28px rgba(10, 79, 127, 0.26);
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  background: #8aaee2;
  box-shadow: none;
  transform: none;
}

.status {
  display: grid;
  gap: 12px;
}

.status-box {
  min-height: 154px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--panel-soft);
  color: var(--muted);
  overflow-wrap: anywhere;
}

.status-box.ok {
  border-color: rgba(19, 122, 75, 0.25);
  background: var(--ok-bg);
  color: var(--ok);
}

.status-box.bad {
  border-color: rgba(180, 35, 24, 0.25);
  background: var(--bad-bg);
  color: var(--bad);
}

.download {
  display: none;
  width: 100%;
  text-align: center;
  border-radius: 8px;
  padding: 13px;
  background: var(--ok);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 12px 22px rgba(19, 122, 75, 0.18);
}

.download.visible {
  display: block;
}

@media (max-width: 760px) {
  main {
    width: min(100% - 20px, 1160px);
    margin: 20px auto;
  }

  .app-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .app-nav {
    align-items: stretch;
    flex-direction: column;
  }

  .nav-brand {
    text-align: center;
  }

  .nav-links {
    display: grid;
    grid-template-columns: 1fr;
    padding: 6px;
  }

  .nav-link {
    width: 100%;
  }

  h1 {
    font-size: 32px;
  }

  .workspace,
  .row {
    grid-template-columns: 1fr;
  }
}
