:root {
  --bg: #f5f5f2;
  --paper: #ffffff;
  --paper-2: #f8f8f6;
  --ink: #171717;
  --muted: #686868;
  --line: #ddddda;
  --soft: #eeeeeb;
  --shadow: 0 18px 50px rgba(20, 20, 20, .08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

.shell {
  width: min(1360px, 100%);
  margin: 0 auto;
  padding: 40px;
}

.workspace {
  display: grid;
  grid-template-columns: 430px 1fr;
  gap: 24px;
  align-items: start;
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.upload-panel { padding: 32px; position: sticky; top: 24px; }
.result-panel { padding: 28px; min-height: 760px; }

.brand {
  display: inline-flex;
  height: 34px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .14em;
}

h1, h2 { margin: 0; letter-spacing: 0; }
h1 { margin-top: 26px; font-size: 48px; line-height: 1.02; }
h2 { font-size: 30px; }

.lead {
  color: var(--muted);
  line-height: 1.55;
  font-size: 16px;
  margin: 18px 0 28px;
}

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

.dropzone {
  display: grid;
  place-items: center;
  min-height: 290px;
  padding: 22px;
  border: 1px dashed #bdbdb8;
  border-radius: 24px;
  background: var(--paper-2);
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-title { font-size: 22px; font-weight: 800; }
.drop-subtitle { margin-top: 8px; color: var(--muted); line-height: 1.4; }

#preview {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
}

.dropzone.has-preview #preview { display: block; }
.dropzone.has-preview .drop-title,
.dropzone.has-preview .drop-subtitle { display: none; }

.field { display: grid; gap: 8px; }
.field label, .check { color: var(--muted); font-size: 14px; }

select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
  font-size: 15px;
}

input[type="password"] {
  width: 100%;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  padding: 0 16px;
  font-size: 16px;
  outline: none;
}

input[type="password"]:focus {
  border-color: #171717;
  box-shadow: 0 0 0 4px rgba(23, 23, 23, .08);
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
}

button, .secondary {
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--ink);
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
}

.primary {
  background: var(--ink);
  color: #fff;
}

.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
}

.ghost {
  background: #fff;
  color: var(--ink);
  padding: 0 16px;
}

.result-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 22px;
}

.eyebrow {
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: .14em;
  font-weight: 800;
  margin-bottom: 8px;
}

.badge {
  border: 1px solid var(--line);
  background: var(--paper-2);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.empty {
  min-height: 620px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper-2);
}

.face-map {
  width: 260px;
  height: 300px;
  color: #343434;
  opacity: .8;
}

.result-content { display: grid; gap: 18px; }
.hidden { display: none !important; }

.report-card {
  width: 100%;
  border-radius: 22px;
  border: 1px solid var(--line);
  box-shadow: 0 10px 34px rgba(0,0,0,.08);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.login-body {
  display: grid;
  place-items: center;
  padding: 28px;
}

.login-shell {
  width: min(520px, 100%);
}

.login-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow);
  padding: 38px;
}

.login-card h1 {
  font-size: 44px;
}

.form-message {
  min-height: 22px;
  margin: -2px 0 0;
  color: #8a1f1f;
  font-size: 14px;
  font-weight: 700;
}

@media (max-width: 980px) {
  .shell { padding: 18px; }
  .workspace { grid-template-columns: 1fr; }
  .upload-panel { position: static; }
  h1 { font-size: 38px; }
  .login-card { padding: 28px; }
  .login-card h1 { font-size: 36px; }
}
