:root {
  --ink: #172033;
  --muted: #5b667a;
  --line: #d8deea;
  --bg: #f4f7fb;
  --white: #fff;
  --action: #5138a5;
  --action-soft: #ede8ff;
  --accent: #0f7a6b;
  --warn: #8a4b00;
  --warn-bg: #fff4df;
  --danger: #9f2218;
  --danger-bg: #fdeceb;
  --ok: #0f7a4b;
  --ok-bg: #e7f6ee;
  --shadow: 0 12px 30px rgba(23, 32, 51, .08);
  --font: "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 16px; line-height: 1.5; }
a { color: var(--action); }
img { max-width: 100%; }
.wrap { width: min(1080px, calc(100% - 32px)); margin: 0 auto; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; }
.brand { font-weight: 750; letter-spacing: -.04em; font-size: 22px; color: var(--ink); text-decoration: none; }
.brand span { color: var(--action); }
.nav-links { display: flex; gap: 18px; align-items: center; }
.nav-links a { color: var(--ink); text-decoration: none; font-size: 15px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; padding: 11px 16px; font: inherit; font-weight: 650; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--action); color: white; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-danger { background: var(--danger); color: white; }
.btn-small { padding: 7px 10px; font-size: 14px; }
.hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 36px; align-items: center; padding: 18px 0 48px; }
.hero h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.05; letter-spacing: -.045em; margin: 0 0 14px; }
.lede { font-size: 18px; color: #334; margin: 0 0 18px; }
.kicker { color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.panel { background: var(--ink); color: white; border-radius: 18px; padding: 22px; }
.panel ol { margin: 12px 0 0; padding-left: 18px; }
.panel li { margin: 8px 0; }
.section { padding: 10px 0 42px; }
.section h2 { font-size: 30px; letter-spacing: -.03em; margin: 0 0 8px; }
.grid-3, .grid-2 { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: 1fr 1fr; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.card h3 { margin: 0 0 8px; font-size: 18px; }
.price { font-size: 32px; letter-spacing: -.04em; margin: 8px 0; }
.price small { font-size: 14px; color: var(--muted); letter-spacing: 0; }
.muted { color: var(--muted); }
.note { background: var(--warn-bg); color: var(--warn); border-radius: 12px; padding: 12px 14px; }
.oknote { background: var(--ok-bg); color: var(--ok); border-radius: 12px; padding: 12px 14px; }
.errnote { background: var(--danger-bg); color: var(--danger); border-radius: 12px; padding: 12px 14px; }
.site-footer { border-top: 1px solid var(--line); padding: 22px 0 40px; color: var(--muted); font-size: 14px; }
.app-shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.side { background: var(--ink); color: white; padding: 20px 14px; }
.side a { display: block; color: rgba(255,255,255,.86); text-decoration: none; padding: 9px 12px; border-radius: 8px; margin: 2px 0; }
.side a.active, .side a:hover { background: rgba(255,255,255,.1); color: white; }
.main { padding: 22px; }
.table-wrap { overflow: auto; background: white; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 700; }
label { display: block; font-size: 13px; font-weight: 650; margin: 10px 0 4px; }
input, select, textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 14px 0; }
.stat { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.stat b { display: block; font-size: 26px; letter-spacing: -.03em; }
.badge { display: inline-block; border-radius: 999px; padding: 2px 8px; font-size: 12px; font-weight: 700; background: #eef1f6; }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.bad { background: var(--danger-bg); color: var(--danger); }
.clock-app { width: min(460px, calc(100% - 28px)); margin: 24px auto; }
.clock-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { min-height: 110px; border-radius: 16px; border: 1px solid var(--line); background: white; font: inherit; font-weight: 750; cursor: pointer; }
.tile.in { color: var(--ok); }
.tile.out { color: var(--danger); }
video, canvas { width: 100%; border-radius: 12px; background: #111; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
@media (max-width: 860px) {
  .hero, .grid-3, .grid-2, .app-shell, .stats, .form-grid { grid-template-columns: 1fr; }
  .side { padding: 12px; }
  .nav-links { gap: 10px; }
}
@page { margin: 14mm; }
@media print {
  .side, .topbar, .no-print { display: none !important; }
  .app-shell { display: block; }
  body { background: white; }
}
