:root {
  --bg: #f5f6f8; --panel: #ffffff; --text: #16181d; --muted: #6b7280;
  --line: #dfe3e8; --accent: #1f6feb; --danger: #b42318;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #14161a; --panel: #1c1f25; --text: #e8eaed; --muted: #9aa1ab;
          --line: #2a2f38; --accent: #4c8dff; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
       font: 16px/1.5 -apple-system, "Segoe UI", Roboto, sans-serif; }
.top { display: flex; justify-content: space-between; align-items: center;
       padding: 14px 16px; background: var(--panel); border-bottom: 1px solid var(--line); }
.brand { font-weight: 600; letter-spacing: .02em; }
.exit { color: var(--muted); text-decoration: none; font-size: 14px; }
main { max-width: 560px; margin: 0 auto; padding: 20px 16px 60px; }
h1 { font-size: 22px; margin: 8px 0 12px; }
.hint { color: var(--muted); font-size: 14px; }
a { color: var(--accent); }
.alert { background: #fdecea; color: var(--danger); border-radius: 10px;
         padding: 10px 14px; margin-bottom: 16px; font-size: 14px; }
.alert p { margin: 4px 0; }
.form { display: flex; flex-direction: column; gap: 16px; margin-top: 18px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
input[type=text], input[type=tel], input[type=file], select {
  font-size: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); color: var(--text); width: 100%; }
button { font-size: 16px; padding: 14px; border: 0; border-radius: 10px;
         background: var(--accent); color: #fff; font-weight: 600; cursor: pointer; }
button.ghost { background: transparent; color: var(--danger); font-weight: 500; padding: 8px 0; }
.consents { border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.consents legend { font-size: 13px; color: var(--muted); padding: 0 6px; }
.check { flex-direction: row; align-items: flex-start; gap: 10px;
         color: var(--text); font-size: 14px; margin: 10px 0; }
.check input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.tiles { display: grid; gap: 12px; margin-top: 20px; }
.tile { display: flex; justify-content: space-between; align-items: center;
        background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
        padding: 16px; text-decoration: none; color: var(--text); font-weight: 500; }
.tile.disabled { color: var(--muted); pointer-events: none; }
.tile span { font-size: 12px; color: var(--muted); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
        padding: 16px; margin-bottom: 14px; }
.card-head { font-weight: 600; margin-bottom: 4px; }
.row { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.row input, .row select { flex: 1 1 120px; }
.row button { flex: 1 1 100%; }

h2 { font-size: 17px; margin: 28px 0 8px; }
.grid { width: 100%; border-collapse: collapse; background: var(--panel);
        border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 14px; }
.grid th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px;
           padding: 10px 12px; border-bottom: 1px solid var(--line); }
.grid td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.grid tr:last-child td { border-bottom: 0; }
.grid .num { text-align: right; white-space: nowrap; }
.grid .warn { color: #b42318; font-weight: 600; }
.grid .total td { font-weight: 600; background: rgba(127,127,127,.06); }
.sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.grid form { display: inline; }
.grid button.ghost { padding: 0; font-size: 13px; }
input[type=date] { font-size: 16px; padding: 12px; border: 1px solid var(--line);
                   border-radius: 10px; background: var(--panel); color: var(--text); width: 100%; }
