:root {
  --bg: #f6f7fb;
  --ink: #1c2430;
  --muted: #657083;
  --line: #dfe5ef;
  --red: #e23d4f;
  --amber: #f6b44b;
  --green: #29a36a;
  --blue: #2567d8;
  font-family: "Segoe UI", Tahoma, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, #fff0f1, transparent 32%), linear-gradient(135deg, #f8fbff, #f2f4f8);
  color: var(--ink);
}
.phone-shell { max-width: 560px; margin: 0 auto; padding: 22px 14px 36px; }
.desktop-shell { max-width: 1180px; margin: 0 auto; padding: 28px 18px 44px; }
.panel {
  background: rgba(255,255,255,.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(25,38,66,.10);
  padding: 20px;
}
.wide { margin-bottom: 18px; }
.hidden { display: none; }
.brand-mark {
  width: 58px; height: 58px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--red), var(--amber));
  color: white; border-radius: 8px; font-weight: 800; margin-bottom: 14px;
}
.eyebrow { margin: 0 0 4px; color: var(--blue); font-size: 13px; font-weight: 700; }
h1 { margin: 0 0 18px; font-size: clamp(26px, 7vw, 42px); letter-spacing: 0; }
h2 { margin: 0 0 14px; font-size: 22px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
label { display: grid; gap: 7px; margin: 13px 0; color: var(--muted); font-weight: 700; }
input, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 13px 14px;
  font: inherit; color: var(--ink); background: #fff;
}
select {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 13px 14px;
  font: inherit; color: var(--ink); background: #fff;
}
textarea { resize: vertical; }
button, .secondary {
  border: 0; border-radius: 8px; min-height: 46px; padding: 0 16px; font: inherit; font-weight: 800;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
.primary { width: 100%; background: linear-gradient(135deg, var(--red), #ff7043); color: white; }
.confirm-entry {
  width: 100%; background: linear-gradient(135deg, #14895d, var(--green)); color: white;
}
.ghost { background: #eef3fb; color: var(--blue); }
.secondary { background: #edf8f2; color: var(--green); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.actions .primary { width: auto; }
.full-link { width: 100%; margin: 8px 0 10px; }
.msg { min-height: 24px; color: #bd2b3b; font-weight: 700; }
.msg.good { color: var(--green); }
.create-shop-link {
  align-items: center; border: 1px solid #f3b2b9; border-radius: 8px; color: var(--red);
  display: flex; font-weight: 800; justify-content: center; min-height: 46px;
  margin-top: 8px; text-decoration: none;
}
.create-shop-link:hover { background: #fff4f5; }
.login-links { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-top: 10px; }
.sub-link { display: inline-block; color: var(--blue); font-weight: 700; text-decoration: none; }
.admin-link { color: var(--red); }
.password-wrap { position: relative; width: 100%; }
.password-wrap input { padding-right: 56px; }
.password-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 44px; min-height: 38px; padding: 0; background: #f2f5f9; color: var(--muted);
  font-size: 20px;
}
.password-toggle.is-visible { color: var(--blue); background: #e7f0ff; }
.login-heading { color: var(--ink); font-size: 20px; margin: 8px 0 4px; }
.login-credential {
  background: #fff; border: 2px solid #8793a5; color: var(--ink); font-weight: 700;
}
.login-credential::placeholder { color: #8a95a5; }
.login-credential:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(41,163,106,.18); outline: 0; }
.login-password .password-toggle { background: #eef2f7; color: var(--muted); }
.login-password .password-toggle.is-visible { background: #e2f2ea; color: var(--green); }
.remember-login {
  align-items: center; color: var(--muted); display: flex; font-size: 14px; gap: 8px;
  margin: 14px 0; user-select: none;
}
.remember-login input { height: 18px; padding: 0; width: 18px; }
.signup-action {
  align-items: center; background: linear-gradient(135deg, var(--red), #ff7043); border-radius: 8px; color: #fff;
  display: flex; font-weight: 800; justify-content: center; min-height: 46px; margin-top: 9px; text-decoration: none; width: 100%;
}
.signup-action:hover { background: linear-gradient(135deg, #ca3042, #f06036); }
.quick-id-panel {
  background: #f6f8fc;
  border: 1px solid #d7dfeb;
  border-radius: 8px;
  margin-top: 12px;
  padding: 14px;
}
.quick-id-panel h2 {
  color: var(--ink);
  font-size: 18px;
  margin: 0 0 10px;
}
.quick-id-panel label { margin: 10px 0; }
.quick-id-cancel {
  margin-top: 8px;
  width: 100%;
}
.shop-user-header { align-items: start; display: flex; gap: 10px; justify-content: space-between; margin-bottom: 18px; }
.shop-user-header h1 { font-size: 27px; line-height: 1.25; margin: 0 0 5px; }
.shop-code-line { color: var(--blue); font-size: 14px; font-weight: 800; margin: 0; }
.logout-corner {
  background: #eef3fb; color: var(--blue); flex-shrink: 0; font-size: 13px; min-height: 38px; padding: 0 11px;
}
.trial-signup-panel { margin-top: 12px; }
.trial-signup-panel h1 { font-size: 32px; margin-top: 9px; }
.trial-signup-panel input {
  background: #f9fbfe;
  border: 2px solid #738196;
  color: var(--ink);
  font-weight: 700;
}
.trial-signup-panel input::placeholder { color: #687588; }
.trial-signup-panel input:focus {
  background: #fff;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(41,163,106,.18);
  outline: 0;
}
.trial-signup-panel .password-toggle {
  border: 1px solid #d9e0eb;
}
.created-accounts {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 18px;
}
.created-accounts h2 {
  font-size: 18px;
  margin-bottom: 12px;
}
.created-accounts-list {
  display: grid;
  gap: 10px;
}
.created-account-card {
  background: #f5f8fc;
  border: 1px solid #ccd6e3;
  border-radius: 8px;
  padding: 12px;
}
.created-account-card p {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
  margin: 0;
}
.created-account-card strong { color: var(--blue); }
.created-account-card .confirm-entry {
  margin-top: 9px;
  min-height: 40px;
  text-decoration: none;
}
.created-accounts-empty {
  background: #f5f8fc;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  padding: 12px;
}
.back-link { color: var(--blue); display: inline-block; font-weight: 800; margin-bottom: 20px; text-decoration: none; }
.public-header {
  align-items: center; background: #fff; border-bottom: 1px solid var(--line); display: flex;
  height: 68px; justify-content: space-between; padding: 0 max(calc((100% - 1120px) / 2), 18px);
}
.wordmark { color: var(--red); font-size: 25px; font-weight: 800; text-decoration: none; }
.header-link { color: var(--blue); font-weight: 800; text-decoration: none; }
.signup-shell {
  display: grid; gap: 30px; grid-template-columns: .8fr 1fr; margin: 0 auto;
  max-width: 1120px; padding: 48px 18px 60px;
}
.signup-intro { padding-top: 22px; }
.signup-intro h1 { font-size: 46px; line-height: 1.15; margin: 10px 0 18px; }
.signup-intro > p:not(.eyebrow) { color: var(--muted); font-size: 18px; font-weight: 700; line-height: 1.6; }
.trust-lines { display: grid; gap: 10px; margin-top: 28px; }
.trust-lines span { border-left: 4px solid var(--red); color: var(--ink); font-weight: 800; padding: 9px 14px; }
.signup-panel { padding: 26px; }
.signup-grid { display: grid; gap: 0 14px; grid-template-columns: 1fr 1fr; }
.form-separator { border: 0; border-top: 1px solid var(--line); margin: 22px 0 18px; }
.account-heading { font-size: 19px; margin-bottom: 3px; }
.field-note { color: var(--muted); font-size: 14px; font-weight: 700; line-height: 1.45; margin: 4px 0 10px; }
.consent-line { align-items: start; display: flex; font-size: 14px; gap: 9px; line-height: 1.45; margin: 18px 0; }
.consent-line input { flex: 0 0 auto; height: 18px; margin-top: 1px; width: 18px; }
.website-field { left: -10000px; position: absolute; }
.public-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; font-weight: 700; padding: 22px 18px; text-align: center; }
.notice { border-left: 5px solid var(--amber); background: #fff8e8; padding: 12px; border-radius: 8px; color: #76521b; font-weight: 700; }
.file-box {
  border: 2px dashed #f0a2aa; min-height: 86px; border-radius: 8px; place-items: center; text-align: center;
  background: #fff7f8; color: var(--red);
}
.file-box input { display: none; }
.camera-panel { margin: 12px 0; }
.camera-frame {
  position: relative; min-height: 220px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--line); background: #18202b; display: grid; place-items: center;
}
.camera-frame video { width: 100%; max-height: 52vh; object-fit: cover; display: block; }
#cameraHint { position: absolute; color: #fff; font-weight: 800; text-align: center; padding: 14px; }
.camera-actions { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-top: 8px; }
.compact { width: auto; }
button:disabled { opacity: .5; cursor: not-allowed; }
.preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.preview-item { position: relative; }
.preview img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.preview-item span {
  position: absolute; top: 6px; left: 6px; min-width: 24px; height: 24px; display: grid; place-items: center;
  color: #fff; background: rgba(28,36,48,.78); border-radius: 999px; font-size: 12px; font-weight: 800;
}
.remove-photo {
  position: absolute; right: 6px; bottom: 6px; min-height: 30px; padding: 0 10px;
  border-radius: 999px; background: rgba(226,61,79,.92); color: #fff; font-size: 12px;
}
.confirm-box {
  position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center;
  background: rgba(15,22,32,.52); padding: 18px;
}
.confirm-box.hidden { display: none; }
.confirm-card {
  width: min(360px, 100%); background: #fff; border-radius: 8px; padding: 18px;
  box-shadow: 0 24px 70px rgba(0,0,0,.28);
}
.confirm-card h2 { margin-bottom: 6px; }
.confirm-card p { color: var(--muted); font-weight: 800; margin: 0 0 16px; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.photo-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 14px;
  color: var(--muted); font-weight: 800;
}
.small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1.6fr; gap: 14px; }
.pending-list { display: grid; gap: 10px; }
.pending-card { display: grid; grid-template-columns: minmax(240px, .9fr) 1.1fr; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.pending-card h3 { margin: 0 0 5px; font-size: 20px; }
.pending-card h3 span { color: var(--red); }
.pending-card p { margin: 0 0 5px; color: var(--muted); font-weight: 700; }
.pending-card small { color: var(--muted); }
.file-chips { display: flex; gap: 6px; flex-wrap: wrap; align-content: start; }
.file-chips span { background: #f3f6fa; border: 1px solid var(--line); padding: 6px 8px; border-radius: 999px; font-size: 12px; color: var(--muted); }
.empty { padding: 18px; color: var(--muted); background: #f7f9fc; border-radius: 8px; }
.download-hero h1 { max-width: 760px; }
.download-copy { color: var(--muted); font-weight: 700; max-width: 760px; }
.download-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.download-button { width: auto; min-width: 230px; text-decoration: none; }
.version-note { color: var(--muted); font-size: 13px; font-weight: 800; margin-top: 12px; }
.steps { color: var(--ink); display: grid; gap: 10px; font-weight: 700; margin: 0; padding-left: 24px; }
.download-grid { display: grid; gap: 10px; grid-template-columns: repeat(3, 1fr); }
.download-grid div { border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.download-grid strong, .download-grid span { display: block; }
.download-grid span { color: var(--muted); font-size: 14px; font-weight: 700; margin-top: 4px; }
.admin-grid { display: grid; gap: 12px; grid-template-columns: repeat(4, 1fr); }
.shop-list { display: grid; gap: 10px; }
.application-list { display: grid; gap: 12px; margin-top: 12px; }
.application-card {
  background: #fff; border: 1px solid var(--line); border-radius: 8px; display: grid;
  gap: 12px; grid-template-columns: minmax(260px, 1fr) minmax(280px, .9fr); padding: 16px;
}
.application-card h3 { margin: 0 0 7px; }
.application-card p { color: var(--muted); font-weight: 700; line-height: 1.55; margin: 0; }
.application-status { color: var(--blue); font-size: 13px; font-weight: 800; margin-bottom: 5px; }
.application-actions { align-content: start; display: grid; gap: 8px; }
.application-actions label { margin: 0; }
.application-buttons { display: flex; gap: 8px; }
.application-buttons .primary { flex: 1; width: auto; }
.danger-outline { background: #fff2f4; color: var(--red); }
.shop-card {
  background: #fff; border: 1px solid var(--line); border-radius: 8px; display: grid;
  gap: 12px; grid-template-columns: minmax(220px, .7fr) 1.3fr; padding: 14px;
}
.shop-card h3 { margin: 0 0 4px; }
.shop-card h3 span { color: var(--red); font-size: 14px; }
.shop-card p { color: var(--muted); font-weight: 800; }
.user-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.user-chips span { background: #f3f6fa; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 12px; font-weight: 800; padding: 6px 8px; }
@media (max-width: 720px) {
  .grid-2, .pending-card, .admin-grid, .shop-card, .signup-shell, .signup-grid, .application-card { grid-template-columns: 1fr; }
  .topbar { align-items: center; }
  .camera-actions { grid-template-columns: 1fr; }
  .download-grid { grid-template-columns: 1fr; }
  .signup-shell { padding-top: 24px; }
  .signup-intro { padding-top: 0; }
  .signup-intro h1 { font-size: 34px; }
}
