/* WinP — design tokens & shared components */
:root {
  --navy-900: #071435;
  --navy-800: #0b1d4a;
  --navy-700: #132a66;
  --navy-600: #1d3a85;
  --lime: #b6f23a;
  --lime-600: #96d21c;
  --green: #1f9d55;
  --green-700: #157a40;
  --green-50: #eaf8ef;
  --amber: #e0a21b;
  --amber-50: #fdf5e1;
  --red: #d93b3b;
  --red-50: #fdecec;
  --blue: #2b4c9b;
  --blue-50: #ebf0fb;
  --violet: #8b5cf6;

  --bg: #f3f6fb;
  --surface: #ffffff;
  --line: #e3e8f2;
  --line-2: #eef2f8;
  --text: #0f1b3d;
  --text-2: #43507a;
  --muted: #7482a3;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(11, 29, 74, .06), 0 4px 16px rgba(11, 29, 74, .06);
  --shadow-lg: 0 20px 50px rgba(7, 20, 53, .22);
  --font: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--text); background: var(--bg); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
.tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent; font: 600 14px var(--font); cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s, box-shadow .15s; }
.btn:active { transform: translateY(1px); }
.btn .icon { width: 16px; height: 16px; }
.btn-primary { background: var(--navy-800); color: #fff; }
.btn-primary:hover { background: var(--navy-700); }
.btn-lime { background: var(--lime); color: var(--navy-900); }
.btn-lime:hover { background: #c6f75c; box-shadow: 0 6px 18px rgba(182, 242, 58, .35); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-700); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: #c9d2e4; background: #fafbfe; }
.btn-danger { background: var(--surface); border-color: #f3c4c4; color: var(--red); }
.btn-danger:hover { background: var(--red-50); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-icon { width: 34px; padding: 0; height: 34px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--text-2); }
.input, select.input, textarea.input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: 14px var(--font); color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s; }
textarea.input { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; }
.input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(31, 157, 85, .15); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.b-green { background: var(--green-50); color: var(--green-700); }
.b-amber { background: var(--amber-50); color: #9a6a00; }
.b-red { background: var(--red-50); color: #b42323; }
.b-blue { background: var(--blue-50); color: var(--blue); }
.b-gray { background: #eef1f6; color: var(--text-2); }

/* Toast */
.toast-wrap { position: fixed; right: 20px; bottom: 20px; z-index: 1000; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--navy-900); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 500; animation: toastIn .25s ease-out; max-width: 360px; }
.toast .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); flex: none; }
.toast.error .dot { background: #ff6b6b; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }
