/* DTEM Cards — брандиране */
:root {
  --navy: #15294a;
  --navy2: #21436e;
  --teal: #16c2a3;
  --ink: #1d2240;
  --gray: #6b7290;
  --bg: #f4f6fb;
  --card: #ffffff;
  --danger: #d64545;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 15px; line-height: 1.5;
}
a { color: var(--navy2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Навигация */
.topnav {
  background: linear-gradient(90deg, var(--navy), var(--navy2));
  color: #fff; display: flex; align-items: center; gap: 18px;
  padding: 10px 22px; flex-wrap: wrap;
}
.topnav .brand { font-weight: 800; font-size: 17px; letter-spacing: .5px; color: #fff; display: flex; align-items: center; gap: 8px; }
.topnav .brand .dot { color: var(--teal); }
.topnav a { color: #dfe7f5; font-weight: 500; }
.topnav a.active, .topnav a:hover { color: #fff; text-decoration: none; }
.topnav .spacer { flex: 1; }
.topnav .role { background: rgba(255,255,255,.12); border-radius: 20px; padding: 2px 12px; font-size: 13px; }

.container { max-width: 1080px; margin: 26px auto; padding: 0 18px; }
h1 { font-size: 24px; margin: 0 0 4px; }
h2 { font-size: 18px; margin: 26px 0 10px; }
.sub { color: var(--gray); margin-bottom: 22px; }

/* Карти/панели */
.panel { background: var(--card); border-radius: 12px; padding: 20px; box-shadow: 0 1px 4px rgba(21,41,74,.08); margin-bottom: 18px; }
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

.stat { background: var(--card); border-radius: 12px; padding: 16px 18px; box-shadow: 0 1px 4px rgba(21,41,74,.08); }
.stat .num { font-size: 28px; font-weight: 800; color: var(--navy); }
.stat .lbl { color: var(--gray); font-size: 13px; }

/* Таблици */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--gray); padding: 8px 10px; border-bottom: 2px solid #e7ebf4; }
td { padding: 9px 10px; border-bottom: 1px solid #eef1f8; vertical-align: middle; }
tr:hover td { background: #f8fafd; }

/* Форми */
label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 4px; color: var(--ink); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=color], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid #d4dae8; border-radius: 8px; font-size: 14px; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--teal); border-color: var(--teal); }
.btn {
  display: inline-block; background: var(--teal); color: #fff; border: 0; border-radius: 8px;
  padding: 10px 20px; font-size: 14px; font-weight: 700; cursor: pointer; margin-top: 14px;
}
.btn:hover { filter: brightness(.95); text-decoration: none; }
.btn.secondary { background: var(--navy2); }
.btn.danger { background: var(--danger); }
.btn.small { padding: 5px 12px; font-size: 13px; margin-top: 0; }
.btn.ghost { background: transparent; color: var(--navy2); border: 1px solid #c9d2e4; }

/* Статуси и значки */
.badge { display: inline-block; border-radius: 20px; padding: 2px 11px; font-size: 12px; font-weight: 700; }
.badge.active { background: #e2f8f2; color: #0d8a73; }
.badge.suspended { background: #fdeaea; color: var(--danger); }
.badge.live { background: #e2f8f2; color: #0d8a73; }
.badge.preview { background: #fff4dc; color: #9a7307; }
.badge.requested { background: #fff4dc; color: #9a7307; }
.badge.sent { background: #e2f8f2; color: #0d8a73; }
.badge.type { background: #e9eefb; color: var(--navy2); }
.badge.done { background: #e2f8f2; color: #0d8a73; }

.alert { border-radius: 8px; padding: 11px 14px; margin: 12px 0; font-weight: 600; }
.alert.error { background: #fdeaea; color: var(--danger); }
.alert.ok { background: #e2f8f2; color: #0d8a73; }

/* Wallet карта (преглед) */
.wallet-card {
  width: 340px; max-width: 100%; border-radius: 16px; padding: 18px 20px 20px;
  box-shadow: 0 8px 24px rgba(21,41,74,.25); color: #fff; position: relative;
}
.wallet-card .wc-top { display: flex; align-items: center; gap: 10px; }
.wallet-card .wc-logo {
  width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px; overflow: hidden;
}
.wallet-card .wc-logo img { width: 100%; height: 100%; object-fit: cover; }
.wallet-card .wc-bizname { font-weight: 700; font-size: 15px; }
.wallet-card .wc-typelabel { font-size: 11px; opacity: .8; text-transform: uppercase; letter-spacing: .5px; }
.wallet-card .wc-value { font-size: 30px; font-weight: 800; margin: 14px 0 2px; }
.wallet-card .wc-name { font-size: 14px; opacity: .9; }
.wallet-card .wc-serial { font-size: 11px; opacity: .75; margin-top: 12px; letter-spacing: 1px; }
.wallet-card .wc-stamps { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0 4px; }
.wallet-card .wc-stamp {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255,255,255,.65);
  display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.wallet-card .wc-stamp.filled { background: var(--teal); border-color: var(--teal); }
.wallet-card .wc-qr { margin-top: 14px; background: #fff; border-radius: 10px; padding: 8px; width: fit-content; }
.wallet-card .wc-qr img, .wallet-card .wc-qr canvas { display: block; width: 120px; height: 120px; }

/* Setup doctor */
.doctor li { list-style: none; padding: 3px 0; }
.doctor .ok::before { content: '✅ '; }
.doctor .miss::before { content: '⬜ '; }
.doctor { padding-left: 0; margin: 8px 0; color: var(--gray); font-size: 14px; }

/* Вход */
.login-wrap { max-width: 400px; margin: 70px auto; padding: 0 18px; }
.login-logo { text-align: center; margin-bottom: 18px; }
.login-logo .mark { font-size: 30px; font-weight: 800; color: var(--navy); }
.login-logo .mark span { color: var(--teal); }
.login-logo .slogan { color: var(--gray); font-size: 13px; }

/* Скенер */
.scan-result { border-left: 5px solid var(--teal); }
.scan-result.rejected { border-left-color: var(--danger); }

.mono { font-family: ui-monospace, Consolas, monospace; }
.muted { color: var(--gray); font-size: 13px; }
.mt0 { margin-top: 0; }
.flex { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.qr-block { text-align: center; }
.qr-block img { width: 200px; height: 200px; border: 1px solid #e2e7f2; border-radius: 10px; }

@media (max-width: 640px) {
  .container { margin: 14px auto; }
  .topnav { gap: 10px; padding: 10px 14px; }
}

/* ── Landing страница ── */
.hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 70%, #2a5a8f 100%); color: #fff; padding: 64px 18px 72px; text-align: center; }
.hero .mark { font-size: 34px; font-weight: 800; letter-spacing: 1px; margin-bottom: 18px; }
.hero .mark span { color: var(--teal); }
.hero h1 { font-size: 34px; line-height: 1.2; margin: 0 0 16px; color: #fff; }
.hero .lead { max-width: 640px; margin: 0 auto 26px; color: #dfe7f5; font-size: 17px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .btn.ghost.light { color: #fff; border-color: rgba(255,255,255,.45); }
h2.center, .center h2 { text-align: center; }
.center { text-align: center; }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.steps .step { text-align: center; }
.step-num { width: 40px; height: 40px; margin: 0 auto 10px; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 800; font-size: 18px; display: flex; align-items: center; justify-content: center; }
.step h3 { margin: 6px 0 8px; font-size: 16px; }
.types .type { text-align: center; padding: 16px 12px; }
.types .type b { display: block; color: var(--navy); margin-bottom: 4px; }
.types .type span { color: var(--gray); font-size: 13px; }
.benefits b { color: var(--navy); }
.benefits p { margin: 6px 0 0; color: var(--gray); }
.contact { margin-top: 30px; padding: 34px 20px; }
.site-footer { text-align: center; color: var(--gray); font-size: 13px; padding: 26px 0 34px; }
.site-footer a { color: var(--gray); }
