:root {
    --bg: #f6fbff;
    --ink: #0d1f35;
    --muted: #5e6f85;
    --line: #d9e7f1;
    --surface: #ffffff;
    --teal: #0aa6a6;
    --teal-dark: #078989;
    --blue: #1786ff;
    --green: #20aa55;
    --red: #c93e4f;
    --shadow: 0 18px 48px rgba(25, 69, 108, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Arial, "Helvetica Neue", sans-serif;
    color: var(--ink);
    background: radial-gradient(circle at 78% 8%, #e3f8ff 0, transparent 34%), linear-gradient(180deg, #f9fdff 0, #f1f9ff 48%, #ffffff 100%);
    letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }
.wrap { width: min(1280px, calc(100% - 36px)); margin: 0 auto; }

.topbar { position: sticky; top: 0; z-index: 20; padding: 10px 0; background: rgba(246, 251, 255, .78); backdrop-filter: blur(18px); }
.nav {
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 22px;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(218,232,242,.95);
    border-radius: 8px;
    box-shadow: 0 10px 32px rgba(20, 63, 99, .08);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; }
.mark { width: 34px; height: 34px; display: grid; place-items: center; font-size: 0; }
.mark::before { content: ""; width: 27px; height: 27px; background: url("/img/favicon-main.svg") center / contain no-repeat; }
.navlinks { margin-left: auto; display: flex; align-items: center; justify-content: flex-end; gap: 10px; color: #22354b; font-size: 14px; }
.navlinks > a { padding: 10px 10px; }

.btn, button {
    min-height: 46px;
    border: 0;
    border-radius: 8px;
    padding: 0 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--teal), #18b6b2);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 14px 26px rgba(10,166,166,.18);
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.btn:hover, button:hover { transform: translateY(-1px); background: linear-gradient(135deg, var(--teal-dark), #0aa6a6); box-shadow: 0 18px 34px rgba(10,166,166,.22); }
.btn.secondary, button.secondary { background: #fff; color: var(--ink); border: 1px solid #d5e4ef; box-shadow: none; }
.btn.secondary:hover, button.secondary:hover { background: #f4fbff; }

.hero { display: grid; grid-template-columns: .88fr 1fr; column-gap: 36px; row-gap: 0; align-items: start; padding: 32px 0 14px; }
.hero-title { grid-column: 1 / -1; margin: 0 0 22px; font-size: clamp(42px, 4.5vw, 58px); line-height: 1.12; color: #10243c; }
.hero-title span { color: var(--teal); white-space: nowrap; }
.hero-copy { grid-column: 1; }
.hero-copy p { max-width: 570px; margin: 0; color: #334960; font-size: 18px; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; }
.btn-arrow::after { content: "\2192"; font-size: 20px; line-height: 1; }
.hero-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.feature-card { min-height: 132px; display: grid; grid-template-rows: auto auto auto; align-content: start; padding: 10px 10px 12px; border: 1px solid #e0edf5; border-radius: 8px; background: rgba(255,255,255,.82); box-shadow: 0 14px 34px rgba(30,74,111,.07); }
.feature-art { width: 100%; max-width: 170px; height: auto; display: block; object-fit: contain; object-position: center; border-radius: 7px; margin: 0 auto 10px; background: #f4fbff; }
.feature-card strong { display: block; min-height: 18px; margin: 0 6px 6px; font-size: 14px; white-space: nowrap; }
.feature-card span { max-width: 150px; margin: 0 6px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.hero-dashboard { grid-column: 2; align-self: start; display: flex; align-items: center; justify-content: center; padding-top: 0; }
.hero-dashboard img { width: 100%; max-width: 720px; display: block; border-radius: 8px; box-shadow: var(--shadow); }

.section-head { max-width: 780px; margin: 0 auto 14px; text-align: center; }
.section-head h2 { margin: 0; font-size: clamp(28px, 3vw, 38px); line-height: 1.15; }
.section-head p { margin: 12px 0 0; color: var(--muted); line-height: 1.6; }
section { padding: 54px 0; }
#geo { padding-top: 27px; padding-bottom: 24px; }
#tariffs { padding-top: 24px; }

.geo-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.geo-card { min-height: 150px; display: grid; align-content: end; position: relative; overflow: hidden; padding: 24px; border: 1px solid #d6e5f0; border-radius: 8px; background: #eef9fd; box-shadow: 0 14px 32px rgba(30,74,111,.08); isolation: isolate; }
.geo-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(248,253,255,.98) 0%, rgba(248,253,255,.88) 35%, rgba(248,253,255,.18) 74%); }
.geo-card::after { content: ""; position: absolute; inset: 0; z-index: -2; background-image: var(--geo-image); background-size: cover; background-position: center; opacity: .95; }
.geo-card.geo-finland { --geo-image: url('/img/geo-finland.webp'); }
.geo-card.geo-estonia { --geo-image: url('/img/geo-estonia.webp'); }
.geo-card.geo-usa { --geo-image: url('/img/geo-usa.webp'); }
.geo-card h3, .geo-card p, .geo-card .tag { position: relative; z-index: 1; }
.geo-card h3 { margin: 10px 0 4px; font-size: 22px; line-height: 1.05; }
.geo-card p { margin: 0; color: #41566d; }
.flag, .flag-mini { position: relative; display: inline-block; overflow: hidden; border: 1px solid rgba(13,31,53,.14); box-shadow: 0 2px 5px rgba(15,42,70,.08); }
.flag { z-index: 1; width: 38px; height: 25px; border-radius: 3px; }
.flag-mini { width: 22px; height: 15px; border-radius: 2px; flex: 0 0 auto; vertical-align: -2px; }
.flag-fi { background: linear-gradient(90deg, transparent 0 28%, #1f58a8 28% 43%, transparent 43%), linear-gradient(180deg, transparent 0 36%, #1f58a8 36% 58%, transparent 58%), #fff; }
.flag-ee { background: linear-gradient(180deg, #1f64bd 0 33%, #111 33% 66%, #fff 66%); }
.flag-us { background: repeating-linear-gradient(180deg, #c82334 0 7.69%, #fff 7.69% 15.38%); }
.flag-us::before { content: ""; position: absolute; left: 0; top: 0; width: 45%; height: 54%; background: #234a8f; }
.flag-nl { background: linear-gradient(180deg, #ae1c28 0 33%, #fff 33% 66%, #21468b 66%); }
.tag { width: fit-content; margin-top: 18px; padding: 8px 13px; border-radius: 8px; background: rgba(223,247,232,.92); color: #17462e; font-size: 13px; }
.center-action { display: flex; justify-content: center; margin-top: 18px; }

.tariff-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 22px; }
.tariff-card { position: relative; min-height: 290px; padding: 28px 24px; border: 1px solid #d7e6f0; border-radius: 8px; background: #fff; box-shadow: 0 14px 34px rgba(30,74,111,.08); }
.tariff-card.popular { border: 2px solid var(--teal); }
.popular-label { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); padding: 8px 18px; border-radius: 8px; background: var(--teal); color: #fff; font-size: 13px; font-weight: 800; }
.tariff-card h3 { margin: 0 0 18px; font-size: 17px; }
.price { margin: 0 0 20px; font-size: 34px; font-weight: 800; }
.price small { color: var(--muted); font-size: 14px; font-weight: 500; }
.check-list { display: grid; gap: 12px; margin: 22px 0 28px; color: #31475e; font-size: 14px; }
.check-list span::before { content: "\2713"; margin-right: 10px; color: #1ba65b; font-weight: 800; }

.benefits { display: grid; grid-template-columns: repeat(5,1fr); gap: 18px; padding: 26px 0; }
.benefit { display: flex; gap: 12px; align-items: flex-start; color: #344b63; font-size: 13px; }
.benefit strong { display: block; color: var(--ink); margin-bottom: 3px; }

.panel, .card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 28px rgba(30,74,111,.06); }
.card { padding: 24px; }
.cabinet { padding-top: 36px; }
.cabinet-grid { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 18px; align-items: start; }
.side { padding: 20px; position: sticky; top: 92px; }
.side h2 { margin: 0 0 8px; font-size: 28px; }
.meta { display: grid; gap: 10px; margin-top: 18px; }
.meta-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.meta-row strong { color: var(--ink); text-align: right; }
.main-stack { display: grid; gap: 18px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.alert { padding: 14px 16px; border-radius: 8px; margin: 16px 0; border: 1px solid var(--line); background: #fff; }
.alert.ok { border-color: rgba(12,143,101,.22); color: #0c8f65; background: #f1fbf7; }
.alert.err { border-color: rgba(196,61,61,.22); color: var(--red); background: #fff5f5; }
.grid { display: grid; gap: 16px; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.two { grid-template-columns: repeat(2, 1fr); }
form.inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
input, select, textarea { width: 100%; min-height: 48px; border: 1px solid #cadced; border-radius: 8px; padding: 10px 12px; background: rgba(255,255,255,.92); color: var(--ink); font: inherit; font-size: 14px; font-weight: 500; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(10,166,166,.12); background: #fff; }
input::placeholder, textarea::placeholder { color: rgba(96,112,134,.34); font-weight: 500; opacity: 1; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 700; }
.auth { width: min(460px, calc(100% - 32px)); margin: 72px auto; padding: 34px; background: #fff; border: 1px solid #cfe2f0; box-shadow: var(--shadow); }
.auth h1 { margin: 0 0 18px; font-size: 36px; }
.auth form { display: grid; gap: 16px; }
.auth-links { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 18px 0 0; }
.auth-links.single { justify-content: flex-end; }
.auth-links a { color: var(--teal); font-weight: 800; }
.muted { color: var(--muted); }
.content-page { padding: 34px 0; }
.content-page h1 { margin: 0 0 18px; font-size: clamp(30px, 4vw, 42px); }
.content-body { color: #334960; font-size: 16px; line-height: 1.55; }
.content-body section { padding: 0; }
.content-body section + section { margin-top: 14px; }
.content-body h2 { margin: 0 0 8px; color: var(--ink); font-size: 22px; line-height: 1.25; }
.content-body p { margin: 0 0 8px; }
.content-body p:last-child { margin-bottom: 0; }
.content-body a { color: var(--teal); font-weight: 800; }
.tickets-panel {
    display: grid;
    gap: 18px;
}
.ticket-form {
    display: grid;
    gap: 14px;
}
.ticket-form .grid {
    gap: 14px;
}
.ticket-form .span-2 {
    grid-column: 1 / -1;
}
.ticket-list {
    display: grid;
    gap: 8px;
}
.ticket-row {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) 120px 160px;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    text-decoration: none;
}
.ticket-row:hover,
.ticket-row.active {
    border-color: var(--teal);
    box-shadow: 0 14px 34px rgba(13, 153, 153, .1);
}
.ticket-detail {
    display: grid;
    gap: 14px;
    border-top: 1px solid var(--line);
    padding-top: 18px;
}
.ticket-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}
.ticket-thread {
    display: grid;
    gap: 10px;
}
.ticket-message {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 12px 14px;
    line-height: 1.5;
}
.ticket-message.manager {
    background: #f0fbfb;
    border-color: rgba(13, 153, 153, .28);
}
.ticket-message-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 8px;
}
.config-box textarea { min-height: 96px; resize: vertical; font-family: Consolas, monospace; font-size: 13px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; }

footer { padding: 36px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; background: #fff; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 18px; text-align: right; }

.cookie-consent { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 60; width: min(calc(100% - 32px), 620px); padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.96); box-shadow: 0 16px 42px rgba(15,42,70,.16); display: flex; align-items: center; gap: 10px; transform: translateX(-50%); transition: opacity .18s ease, transform .18s ease; backdrop-filter: blur(12px); }
.cookie-consent.is-hiding { opacity: 0; transform: translate(-50%, 12px); }
.cookie-consent__icon { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 8px; background: #eef8fb; color: var(--teal); display: inline-flex; align-items: center; justify-content: center; }
.cookie-consent__icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.cookie-consent__body { min-width: 0; flex: 1 1 auto; }
.cookie-consent__title { margin-bottom: 1px; color: var(--ink); font-size: 13px; font-weight: 800; line-height: 1.25; }
.cookie-consent__text { color: var(--muted); font-size: 12px; line-height: 1.35; }
.cookie-consent__text a { color: var(--teal); font-weight: 800; }
.cookie-consent__button { min-height: 32px; padding: 6px 12px; border: 1px solid var(--teal); border-radius: 8px; background: var(--teal); color: #fff; font-size: 13px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.cookie-consent__button:hover { background: var(--teal-dark); border-color: var(--teal-dark); }

@media (max-width: 1100px) {
    .hero { grid-template-columns: 1fr; row-gap: 24px; }
    .hero-title, .hero-copy, .hero-dashboard { grid-column: 1; }
    .hero-dashboard { justify-content: flex-start; }
    .hero-dashboard img { max-width: 760px; }
    .tariff-grid { grid-template-columns: repeat(2,1fr); }
    .benefits { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 820px) {
    .wrap { width: min(100% - 28px, 1280px); }
    .topbar { position: static; padding: 8px 0; }
    .nav { min-height: 0; flex-direction: column; align-items: stretch; gap: 14px; padding: 16px; }
    .brand { justify-content: center; font-size: 24px; }
    .navlinks { width: 100%; margin-left: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .navlinks form { display: block; }
    .navlinks .btn, .navlinks button { width: 100%; min-height: 48px; margin: 0; }
    .hero { padding: 28px 0 12px; row-gap: 22px; }
    .hero-title { margin-bottom: 0; font-size: clamp(34px, 9vw, 52px); line-height: 1.1; }
    .hero-title span { white-space: normal; }
    .hero-copy p { max-width: none; font-size: 17px; line-height: 1.55; }
    .hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
    .hero-actions .btn { width: 100%; }
    .hero-dashboard img { max-width: 100%; }
    .geo-cards, .cabinet-grid, .grid.three, .grid.two { grid-template-columns: 1fr; }
    .ticket-form .span-2 { grid-column: 1; }
    .ticket-row { grid-template-columns: 1fr; gap: 6px; }
    .ticket-head { display: grid; }
    .tariff-grid { grid-template-columns: repeat(2,1fr); }
    .side { position: static; }
    .card { padding: 20px; }
    .auth { margin: 34px auto; padding: 24px; }
    table { display: block; overflow-x: auto; white-space: nowrap; }
}

@media (max-width: 620px) {
    .wrap { width: calc(100% - 24px); }
    .hero-actions, .tariff-grid, .benefits { grid-template-columns: 1fr; }
    .hero { padding-top: 24px; }
    .hero-title { font-size: clamp(36px, 12vw, 44px); }
    .hero-features { grid-template-columns: 1fr; gap: 12px; margin-top: 22px; }
    .feature-card { min-height: 0; grid-template-columns: 118px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 10px; }
    .feature-art { grid-row: 1 / 3; max-width: 118px; margin: 0; }
    .feature-card strong { margin: 0 0 4px; font-size: 15px; white-space: normal; }
    .feature-card span { max-width: none; margin: 0; font-size: 13px; }
    section { padding: 34px 0; }
    #geo { padding-top: 20px; padding-bottom: 18px; }
    .geo-card { min-height: 138px; padding: 20px; }
    .tariff-card { min-height: 0; padding: 24px 20px; }
    .footer-row { align-items: flex-start; flex-direction: column; }
    .footer-links { justify-content: flex-start; gap: 12px 16px; text-align: left; }
    .cookie-consent { left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); width: auto; max-height: calc(100vh - 24px); display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: start; padding: 12px; transform: none; overflow: auto; }
    .cookie-consent.is-hiding { transform: translateY(12px); }
    .cookie-consent__button { grid-column: 1 / -1; width: 100%; min-height: 42px; }
}

@media (max-width: 420px) {
    .nav { padding: 14px; }
    .hero-title { font-size: 36px; }
    .hero-copy p { font-size: 16px; }
    .feature-card { grid-template-columns: 106px minmax(0, 1fr); }
    .feature-art { max-width: 106px; }
    .price { font-size: 30px; }
    .meta-row { flex-direction: column; gap: 4px; }
    .meta-row strong { text-align: left; overflow-wrap: anywhere; }
}
