:root {
  color: #32152f;
  background: #fffaf6;
  font-family: Nunito, "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --ink: #32152f;
  --muted: #806276;
  --paper: #fffaf6;
  --white: #fffefd;
  --coral: #76bde4;
  --coral-dark: #4fa8d8;
  --peach: #ffe1c0;
  --mint: #ddf4e8;
  --mint-ink: #138760;
  --lavender: #eee1f7;
  --yellow: #fff0bd;
  --blue: #dff0fb;
  --line: #ecd8c9;
  --danger: #c84449;
  --shadow: 0 22px 70px rgba(80, 40, 55, .12);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; background: var(--paper); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 10%, rgba(238, 225, 247, .9), transparent 26%),
    radial-gradient(circle at 8% 35%, rgba(255, 225, 192, .75), transparent 28%),
    var(--paper);
  font-size: 15px;
}
button, input { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .56; }
a { color: inherit; }
input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  color: var(--ink);
  background: var(--white);
  padding: 0 14px;
}
input:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(118, 189, 228, .2);
}

.page { width: min(1120px, 100%); margin: 0 auto; padding: 0 28px 52px; }
.topbar {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 22px;
  font-weight: 900;
  text-decoration: none;
}
.brand-mark {
  width: 43px;
  height: 43px;
  display: block;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(118, 189, 228, .32);
}
.status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, .72);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}
.status i { width: 9px; height: 9px; background: #e9b63f; border-radius: 50%; }
.status.ready i { background: #62bd91; }
.status.error i { background: #e86455; }
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.install-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 13px;
  color: #2f6f93;
  background: rgba(255, 255, 255, .8);
  font-size: 13px;
  font-weight: 900;
}
.eyebrow {
  display: inline-flex;
  width: max-content;
  color: #2c789d;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.05;
  letter-spacing: 0;
}
h1 em { color: var(--coral); font-style: normal; }
h2 { margin: 8px 0 8px; font-size: 1.55rem; line-height: 1.18; }
.auth-view {
  min-height: calc(100vh - 88px - 52px);
  display: grid;
  place-items: center;
  padding: 24px 0 58px;
}
.access-card {
  width: min(100%, 430px);
  padding: 24px;
  background: rgba(255, 254, 253, .94);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.access-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 20px;
  padding: 5px;
  background: #f2fbff;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.access-tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  font-weight: 900;
}
.access-tabs button.active {
  color: white;
  background: var(--coral);
  box-shadow: 0 8px 18px rgba(118, 189, 228, .28);
}
.access-form { display: grid; gap: 10px; }
.access-form p { margin: 0 0 8px; color: var(--muted); line-height: 1.5; }
.field-label {
  display: block;
  margin: 0 0 -2px;
  font-size: .86rem;
  font-weight: 900;
}
.primary-button, .secondary-button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 15px;
  padding: 0 20px;
  font-weight: 900;
  text-decoration: none;
}
.primary-button {
  border: 0;
  color: white;
  background: var(--coral);
  box-shadow: 0 8px 20px rgba(118, 189, 228, .3);
}
.primary-button:hover { background: var(--coral-dark); }
.secondary-button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--white);
}
.form-message {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 800;
}
.form-message.error { color: var(--danger); }
.form-message.ok { color: var(--mint-ink); }

.workbench { padding: 28px 0 48px; }
.workbench-header {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  background: rgba(255, 254, 253, .9);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 12px 34px rgba(80, 40, 55, .07);
}
.workbench-header h1 { margin: 6px 0 0; font-size: clamp(28px, 4vw, 42px); }
.user-pill {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 5px 6px 5px 15px;
  border-radius: 15px;
  background: var(--mint);
  font-weight: 900;
}
.user-pill button {
  min-height: 38px;
  border: 0;
  border-radius: 12px;
  padding: 0 12px;
  background: var(--white);
  color: #2f6f93;
  font-weight: 900;
}
.workbench-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
  gap: 18px;
  margin-top: 18px;
}
.upload-panel, .status-panel {
  padding: 22px;
  background: rgba(255, 254, 253, .86);
  border: 1px solid var(--line);
  border-radius: 22px;
}
.upload-panel { display: grid; gap: 18px; }
.file-drop {
  min-height: 230px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  border: 2px dashed #a9d9f2;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff8dc, #fffaf6);
  font-weight: 900;
}
.file-drop small { color: var(--muted); font-weight: 800; }
.file-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.file-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  color: white;
  background: var(--coral);
  border-radius: 18px;
  font-size: 15px;
}
.preset-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}
.preset-list legend { margin-bottom: 10px; font-size: 15px; font-weight: 900; }
.preset-card {
  min-height: 72px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}
.preset-card.active { background: var(--mint); border-color: #bde8d3; }
.preset-card.warning { background: var(--yellow); }
.preset-card b, .preset-card small { display: block; }
.preset-card small { margin-top: 4px; color: var(--muted); font-weight: 700; }
.submit-button, .download { width: 100%; }
.status-panel { min-height: 430px; }
.empty-state {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px dashed #a9d9f2;
  border-radius: 15px;
  background: rgba(255, 250, 246, .62);
}
.empty-state p { max-width: 260px; margin: 7px 0 0; color: var(--muted); line-height: 1.55; }
.status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 15px;
}
.badge {
  width: max-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--lavender);
  font-size: 12px;
  font-weight: 900;
}
.steps {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.steps li {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 12px;
  background: #fffaf6;
  color: var(--muted);
  font-weight: 800;
}
.steps li.active { color: var(--ink); background: var(--blue); }
.steps li.done { color: #2d835b; background: var(--mint); }

@media (max-width: 760px) {
  .page { padding: 0 18px 36px; }
  .topbar { min-height: 72px; }
  .status { padding: 8px 10px; font-size: 11px; }
  .install-button { display: none; }
  .auth-view { min-height: calc(100vh - 72px - 36px); padding: 12px 0 34px; }
  .access-card { width: 100%; padding: 18px; }
  h1 { font-size: clamp(28px, 10vw, 38px); }
  .workbench-grid { grid-template-columns: 1fr; }
  .workbench-header { align-items: flex-start; flex-direction: column; }
  .user-pill { width: 100%; justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
