:root {
  color-scheme: dark;
  --bg: #06101f;
  --panel: rgba(12, 28, 49, .84);
  --line: rgba(157, 190, 223, .14);
  --muted: #95a9bf;
  --text: #f4f8fc;
  --accent: #47d6c4;
  --accent-2: #65a8ff;
  --success: #58df9c;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(43, 107, 174, .20), transparent 34rem),
    radial-gradient(circle at 92% 44%, rgba(31, 149, 137, .14), transparent 30rem),
    linear-gradient(150deg, #06101f 0%, #08182a 52%, #071321 100%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .21;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

.topbar, main, footer { width: min(1180px, calc(100% - 40px)); margin-inline: auto; position: relative; z-index: 1; }
.topbar { height: 88px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: 13px; align-items: center; color: var(--text); text-decoration: none; font-size: 23px; font-weight: 720; letter-spacing: -.6px; }
.brand strong { color: var(--accent); font-weight: 720; }
.brand-mark { width: 34px; height: 34px; display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 3px; transform: skew(-10deg); }
.brand-mark i { display: block; border-radius: 3px 3px 1px 1px; background: linear-gradient(to top, var(--accent-2), var(--accent)); }
.brand-mark i:nth-child(1) { height: 48%; opacity: .68; }
.brand-mark i:nth-child(2) { height: 74%; opacity: .84; }
.brand-mark i:nth-child(3) { height: 100%; }
.service-state { color: #c5d5e5; font-size: 13px; padding: 9px 13px; background: rgba(34, 68, 91, .35); border: 1px solid var(--line); border-radius: 999px; }
.service-state span, .ok { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(88, 223, 156, .10), 0 0 14px rgba(88, 223, 156, .55); }
.service-state > span:last-child { width: auto; height: auto; margin: 0; border-radius: 0; background: transparent; box-shadow: none; }
.top-actions { display: flex; align-items: center; gap: 14px; }
.language { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: rgba(34, 68, 91, .25); }
.lang-button { padding: 6px 9px; border: 0; border-radius: 999px; color: var(--muted); background: transparent; cursor: pointer; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.lang-button:hover { color: var(--text); }
.lang-button.is-active { color: #031713; background: var(--accent); }

main { padding: 74px 0 48px; }
.hero { max-width: 790px; margin-bottom: 46px; }
.eyebrow, .card-label { color: var(--accent); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.8px; }
h1 { margin: 13px 0 17px; font-size: clamp(42px, 7vw, 72px); line-height: .99; letter-spacing: -3.3px; }
.hero p { max-width: 710px; margin: 0; color: var(--muted); font-size: clamp(16px, 2vw, 19px); line-height: 1.65; }

.portal-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr); gap: 22px; }
.action-area { display: flex; flex-direction: column; gap: 22px; }
.action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.action-card, .login-card, .status-panel { border: 1px solid var(--line); background: linear-gradient(145deg, rgba(17, 39, 65, .90), rgba(9, 25, 43, .88)); box-shadow: 0 22px 70px rgba(0, 0, 0, .20); backdrop-filter: blur(15px); }
.action-card { position: relative; overflow: hidden; border-radius: 22px; padding: 28px; display: flex; align-items: flex-start; gap: 21px; transition: transform .2s ease, border-color .2s ease; }
.action-card:hover { transform: translateY(-2px); border-color: rgba(71, 214, 196, .35); }
.action-card.featured { min-height: 184px; align-items: center; background: linear-gradient(135deg, rgba(19, 54, 83, .95), rgba(11, 36, 56, .93)); }
.action-card.featured::after { content: ""; position: absolute; width: 260px; height: 260px; right: -100px; top: -155px; border-radius: 50%; background: var(--accent); opacity: .07; }
.action-card h2, .login-card h2, .status-panel h2 { margin: 7px 0 8px; font-size: 22px; letter-spacing: -.6px; }
.action-card p, .login-head p { color: var(--muted); margin: 0; line-height: 1.55; font-size: 14px; }
.action-card.compact { min-height: 150px; }
.icon { flex: 0 0 48px; width: 48px; height: 48px; border: 1px solid rgba(91, 178, 245, .23); background: rgba(78, 159, 225, .09); border-radius: 14px; position: relative; }
.icon::before, .icon::after { content: ""; position: absolute; }
.icon-ticket::before { width: 21px; height: 15px; left: 12px; top: 15px; border: 2px solid var(--accent); border-radius: 3px; }
.icon-ticket::after { width: 9px; height: 2px; left: 18px; top: 22px; background: var(--accent); box-shadow: 0 5px 0 rgba(71,214,196,.55); }
.icon-status::before { width: 20px; height: 20px; border: 2px solid var(--accent-2); border-radius: 50%; left: 12px; top: 12px; }
.icon-status::after { width: 7px; height: 5px; left: 21px; top: 18px; border-left: 2px solid var(--accent-2); border-bottom: 2px solid var(--accent-2); transform: rotate(-45deg); }
.icon-book::before { width: 21px; height: 22px; left: 12px; top: 12px; border: 2px solid var(--accent-2); border-radius: 3px 7px 7px 3px; }
.icon-book::after { height: 18px; left: 20px; top: 15px; border-left: 1px solid rgba(101,168,255,.55); }
.arrow { position: absolute; right: 28px; top: 50%; transform: translateY(-50%); color: var(--accent); font-size: 28px; }

.login-card { border-radius: 22px; padding: 28px; }
.login-head { display: flex; align-items: center; gap: 15px; margin-bottom: 24px; }
.login-head h2 { margin-top: 0; }
.shield { width: 43px; height: 48px; clip-path: polygon(50% 0, 92% 16%, 85% 72%, 50% 100%, 15% 72%, 8% 16%); background: linear-gradient(155deg, rgba(71,214,196,.95), rgba(78,133,232,.75)); position: relative; }
.shield::after { content: ""; position: absolute; inset: 3px; clip-path: inherit; background: #102b43; }
.login-form { display: grid; }
.login-form label, .label-row { color: #cbd8e6; font-size: 12px; font-weight: 700; }
.label-row { display: flex; justify-content: space-between; align-items: center; }
.label-row span { color: var(--accent); font-weight: 600; }
.login-form input { width: 100%; margin: 8px 0 18px; padding: 14px 15px; border: 1px solid rgba(154,184,214,.18); border-radius: 11px; color: var(--text); background: rgba(3, 14, 27, .55); outline: none; font: inherit; }
.login-form input:focus { border-color: rgba(71,214,196,.58); box-shadow: 0 0 0 3px rgba(71,214,196,.07); }
.login-form button { border: 0; border-radius: 11px; padding: 14px 16px; color: #031713; background: linear-gradient(100deg, #55e2cf, #64b6f5); font-weight: 800; cursor: default; font-size: 14px; }
.privacy { color: #71869c; text-align: center; font-size: 11px; margin: 11px 0 0; }

.status-panel { margin-top: 22px; padding: 25px 28px; border-radius: 22px; display: grid; grid-template-columns: .72fr 1.6fr auto; gap: 28px; align-items: center; }
.status-panel h2 { margin-bottom: 0; }
.systems { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.systems > div { padding: 12px; display: flex; align-items: center; border-left: 1px solid var(--line); }
.systems .ok { flex: 0 0 auto; }
.systems p { margin: 0; display: grid; gap: 3px; }
.systems strong { font-size: 12px; }
.systems small, .updated { color: var(--muted); font-size: 11px; }
.updated { white-space: nowrap; }

footer { padding: 26px 0 32px; border-top: 1px solid var(--line); color: #72869b; display: flex; justify-content: space-between; gap: 15px; font-size: 12px; }

@media (max-width: 920px) {
  .portal-grid { grid-template-columns: 1fr; }
  .login-card { grid-row: 1; }
  .status-panel { grid-template-columns: 1fr; }
  .systems { grid-template-columns: repeat(3, 1fr); }
  .updated { display: none; }
}

@media (max-width: 640px) {
  .topbar, main, footer { width: min(100% - 28px, 1180px); }
  .topbar { height: 74px; }
  .service-state { font-size: 0; padding: 10px; }
  .service-state > span:first-child { margin: 0; }
  .service-state > span:last-child { display: none; }
  .top-actions { gap: 8px; }
  main { padding-top: 49px; }
  h1 { letter-spacing: -2px; }
  .hero { margin-bottom: 32px; }
  .action-row, .systems { grid-template-columns: 1fr; }
  .action-card, .login-card, .status-panel { border-radius: 18px; padding: 22px; }
  .action-card.featured { min-height: 165px; }
  .action-card.compact { min-height: auto; }
  .arrow { display: none; }
  .systems > div { border-left: 0; border-top: 1px solid var(--line); padding-inline: 0; }
  footer { flex-direction: column; }
}
