:root {
    --brand: #176b58;
    --brand-dark: #0f5143;
    --ink: #17211f;
    --muted: #697572;
    --line: #dde4e1;
}

body {
    color: var(--ink);
    letter-spacing: 0;
}

a { color: var(--brand); }
.brand { align-items: center; color: var(--ink); display: inline-flex; gap: .55rem; font-weight: 700; text-decoration: none; }
.brand .bi { color: var(--brand); font-size: 1.4rem; }
.navbar { min-height: 68px; }
.navbar .nav-link { border-radius: 6px; color: #47514f; padding: .55rem .8rem; }
.navbar .nav-link.active,
.navbar .nav-link:hover { background: #eef6f3; color: var(--brand-dark); }
.app-layout { display: grid; gap: 2rem; grid-template-columns: 220px minmax(0, 1fr); }
.app-sidebar { padding: 1.5rem 0; }
.sidebar-nav { display: grid; gap: .35rem; position: sticky; top: 92px; }
.sidebar-link { align-items: center; border-radius: 8px; color: #47514f; display: flex; font-weight: 500; gap: .7rem; padding: .72rem .85rem; position: relative; text-decoration: none; }
.sidebar-link:hover { background: #f3f8f6; color: var(--brand-dark); }
.sidebar-link.active { background: #eaf6f2; color: var(--brand-dark); font-weight: 700; }
.sidebar-link.active::before { background: var(--brand); border-radius: 999px; bottom: .65rem; content: ""; left: .35rem; position: absolute; top: .65rem; width: 3px; }
.sidebar-link .bi { color: var(--brand); font-size: 1.05rem; }
.app-content { min-width: 0; }
.btn { border-radius: 6px; }
.btn-primary {
    --bs-btn-bg: var(--brand);
    --bs-btn-border-color: var(--brand);
    --bs-btn-hover-bg: var(--brand-dark);
    --bs-btn-hover-border-color: var(--brand-dark);
}
.profile-avatar { align-items: center; background: #e6f2ee; border-radius: 50%; color: var(--brand); display: inline-flex; height: 30px; justify-content: center; width: 30px; }
.profile-login-button { align-items: center; display: inline-flex; justify-content: center; padding: .35rem; }
.profile-name { max-width: 190px; }
.landing-nav { align-items: center; display: flex; gap: .25rem; }
.landing-nav a { border-radius: 6px; color: #47514f; font-size: .92rem; padding: .55rem .7rem; text-decoration: none; }
.landing-nav a:hover { background: #eef6f3; color: var(--brand-dark); }
.page-heading { align-items: end; display: flex; justify-content: space-between; margin-bottom: 2rem; }
.page-heading h1 { font-size: 1.75rem; margin: 0 0 .35rem; }
.page-heading p { color: var(--muted); margin: 0; }
.connection-card,
.profile-summary,
.profile-form,
.auth-panel { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 1.5rem; }
.country-mark { align-items: center; background: #eef6f3; border-radius: 6px; color: var(--brand-dark); display: flex; font-size: .8rem; font-weight: 700; height: 42px; justify-content: center; min-width: 54px; }
.connection-meta,
.profile-details { margin: 1.5rem 0; }
.connection-meta > div,
.profile-details > div { border-top: 1px solid var(--line); display: flex; justify-content: space-between; padding: .7rem 0; }
.connection-meta dt,
.profile-details dt { color: var(--muted); font-weight: 400; }
.connection-meta dd,
.profile-details dd { font-weight: 600; margin: 0; text-align: right; }
.connection-actions { display: grid; gap: .65rem; grid-template-columns: 1fr 1fr; }
.empty-state { border: 1px dashed #b9c8c3; border-radius: 8px; padding: 4rem 1.5rem; text-align: center; }
.site-footer { background: #102f2a; color: #d8eee8; margin-top: auto; padding: 1.2rem 0; }
.site-footer-inner { align-items: flex-start; display: flex; gap: 2rem; justify-content: space-between; }
.footer-requisites { font-size: .76rem; line-height: 1.35; max-width: 860px; min-width: 0; overflow-wrap: anywhere; }
.footer-requisites-main { display: grid; gap: .25rem; }
.footer-requisites-main strong { color: #fff; font-size: .82rem; }
.footer-requisites-main span { color: #cde4de; }
.footer-requisites-links { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin-top: .7rem; }
.footer-requisites a,
.footer-credit { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.footer-credit { flex: none; font-size: .8rem; white-space: nowrap; }
.empty-icon { color: var(--brand); font-size: 2rem; margin-bottom: 1rem; }
.instruction-layout { max-width: 960px; }
.instruction-content { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 0 2rem; }
.instruction-content section { display: grid; gap: 1rem; grid-template-columns: 38px 1fr; padding: 2rem 0; scroll-margin-top: 90px; }
.instruction-content section + section { border-top: 1px solid var(--line); }
.instruction-content h2 { font-size: 1.15rem; }
.step-number { align-items: center; background: var(--brand); border-radius: 50%; color: #fff; display: flex; font-weight: 700; height: 32px; justify-content: center; width: 32px; }
.profile-layout { display: grid; gap: 1.5rem; grid-template-columns: minmax(240px, .7fr) minmax(320px, 1.3fr); }
.profile-avatar-lg { align-items: center; background: #e6f2ee; border-radius: 50%; color: var(--brand); display: flex; font-size: 2rem; height: 72px; justify-content: center; margin-bottom: 1rem; width: 72px; }
.home-hero { align-items: stretch; display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); min-height: 520px; }
.home-hero-content { align-content: center; background: #fff; border: 1px solid var(--line); border-radius: 8px; display: grid; padding: clamp(2rem, 5vw, 4.5rem); }
.home-kicker { align-items: center; color: var(--brand-dark); display: inline-flex; font-weight: 700; gap: .5rem; margin-bottom: 1rem; }
.home-hero h1 { font-size: clamp(2.1rem, 4vw, 4rem); line-height: 1.05; margin: 0 0 1.25rem; max-width: 780px; }
.home-hero p { color: var(--muted); font-size: 1.12rem; margin: 0 0 2rem; max-width: 650px; }
.home-hero-panel,
.checkout-panel,
.checkout-summary { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 1.5rem; }
.home-hero-panel { align-content: space-between; display: grid; gap: 1.25rem; }
.home-status-row { align-items: center; display: flex; font-size: .92rem; justify-content: space-between; }
.home-status-row .bi { color: var(--brand); }
.home-device { align-items: center; background: #f3f8f6; border-radius: 8px; display: flex; gap: 1rem; padding: 1.25rem; }
.home-device .bi { color: var(--brand); font-size: 2.25rem; }
.home-device strong,
.home-device span { display: block; }
.home-device span { color: var(--muted); font-size: .95rem; }
.home-metrics { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
.home-metrics div { border-top: 1px solid var(--line); padding-top: 1rem; }
.home-metrics strong,
.home-metrics span { display: block; }
.home-metrics strong { font-size: 1.6rem; }
.home-metrics span { color: var(--muted); }
.checkout-layout { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr) 320px; }
.checkout-summary h2 { font-size: 1.15rem; margin-bottom: 1rem; }
.server-options { display: grid; gap: .65rem; }
.server-option { align-items: center; background: #f8fbfa; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; display: flex; gap: .65rem; margin: 0; padding: .8rem .9rem; }
.server-option:has(input:checked) { background: #eaf6f2; border-color: #b8d9cf; color: var(--brand-dark); font-weight: 700; }
.checkout-summary dl { margin: 0; }
.checkout-summary dl > div { border-top: 1px solid var(--line); display: flex; justify-content: space-between; padding: .8rem 0; }
.checkout-summary dt { color: var(--muted); font-weight: 400; }
.checkout-summary dd { font-weight: 600; margin: 0; text-align: right; }
.checkout-summary .checkout-price dd { color: var(--ink); font-size: 1.15rem; font-weight: 700; }
.auth-page { background: #f3f6f5; min-height: 100vh; }
.auth-shell { margin: 4vh auto 0; max-width: 460px; }
.auth-panel { box-shadow: 0 16px 50px rgba(23, 33, 31, .07); padding: 2rem; }
.form-control { border-radius: 6px; min-height: 44px; }

.guest-layout { width: 100%; }
.guest-content { padding-bottom: 4rem; }
.guest-hero { align-items: center; background-image: url('/images/guest-home-hero.png'); background-position: center; background-size: cover; display: flex; min-height: 570px; overflow: hidden; padding: 4.5rem; position: relative; }
.guest-hero::before { background: rgba(255, 255, 255, .12); content: ""; inset: 0; pointer-events: none; position: absolute; }
.guest-hero-copy { max-width: 600px; min-width: 0; position: relative; width: 100%; z-index: 1; }
.guest-kicker { align-items: center; color: var(--brand-dark); display: inline-flex; font-size: .9rem; font-weight: 700; gap: .5rem; margin-bottom: 1.25rem; text-transform: uppercase; }
.guest-hero h1 { font-size: 3.6rem; font-weight: 750; line-height: 1.04; margin: 0 0 1.4rem; max-width: 680px; }
.guest-hero-copy > p { color: #3f4b48; font-size: 1.15rem; margin: 0 0 2rem; max-width: 550px; }
.guest-trust-row { display: flex; flex-wrap: wrap; gap: .7rem 1.25rem; margin-top: 2rem; }
.guest-trust-row span { align-items: center; color: #34413e; display: inline-flex; font-size: .88rem; font-weight: 600; gap: .4rem; }
.guest-trust-row .bi { color: var(--brand); }
.landing-section { padding: 5rem 0 0; scroll-margin-top: 90px; }
.landing-section-heading { margin-bottom: 2.25rem; max-width: 680px; }
.landing-section-heading > span,
.landing-offer-label { color: var(--brand); display: block; font-size: .82rem; font-weight: 700; margin-bottom: .6rem; text-transform: uppercase; }
.landing-section-heading h2,
.landing-offer h2 { font-size: 2rem; margin: 0; }
.landing-steps { display: grid; gap: 2rem; grid-template-columns: repeat(3, 1fr); }
.landing-steps article { border-top: 2px solid var(--line); min-width: 0; padding-top: 1.5rem; position: relative; }
.landing-step-icon { align-items: center; background: #eaf6f2; color: var(--brand); display: flex; font-size: 1.35rem; height: 46px; justify-content: center; margin-bottom: 1.5rem; width: 46px; }
.landing-step-number { color: #9aa6a2; font-size: .78rem; font-weight: 700; position: absolute; right: 0; top: 1.75rem; }
.landing-steps h3,
.landing-benefit-grid h3 { font-size: 1.05rem; margin: 0 0 .55rem; }
.landing-steps p,
.landing-benefit-grid p { color: var(--muted); margin: 0; }
.landing-benefit-grid { display: grid; gap: 2rem 3rem; grid-template-columns: repeat(2, 1fr); }
.landing-benefit-grid article { border-left: 3px solid #c8ddd6; padding-left: 1.25rem; }
.landing-benefit-grid article > .bi { color: var(--brand); display: block; font-size: 1.45rem; margin-bottom: 1rem; }
.landing-country-grid { display: grid; gap: .75rem; grid-template-columns: repeat(3, 1fr); }
.landing-country { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 8px; display: flex; gap: 1rem; padding: 1rem; }
.landing-country span { align-items: center; background: #eef6f3; color: var(--brand-dark); display: flex; font-size: 1.1rem; height: 38px; justify-content: center; line-height: 1; overflow: hidden; position: relative; width: 48px; }
.landing-country span img { height: 24px; object-fit: cover; position: absolute; width: 32px; }
.landing-offer { align-items: center; background: #153d35; color: #fff; display: flex; gap: 2rem; justify-content: space-between; margin-top: 5rem; padding: 2.5rem 3rem; }
.landing-offer h2 { color: #fff; }
.landing-offer p { color: #c9d8d4; margin: .75rem 0 0; }
.landing-offer-label { color: #8ed2bd; }
.landing-offer-action { align-items: center; display: flex; flex: none; gap: 2rem; }
.landing-offer-action div { text-align: right; }
.landing-offer-action strong,
.landing-offer-action span { display: block; }
.landing-offer-action strong { font-size: 2rem; }
.landing-offer-action span { color: #c9d8d4; font-size: .86rem; }
.landing-faq-list { border-top: 1px solid var(--line); }
.landing-faq-list details { border-bottom: 1px solid var(--line); }
.landing-faq-list summary { cursor: pointer; font-size: 1.02rem; font-weight: 650; list-style: none; padding: 1.25rem 2.5rem 1.25rem 0; position: relative; }
.landing-faq-list summary::-webkit-details-marker { display: none; }
.landing-faq-list summary::after { color: var(--brand); content: "+"; font-size: 1.5rem; font-weight: 400; position: absolute; right: .25rem; top: .9rem; }
.landing-faq-list details[open] summary::after { content: "−"; }
.landing-faq-list p { color: var(--muted); margin: -.25rem 0 1.25rem; max-width: 760px; }

@media (max-width: 767.98px) {
    .navbar-collapse { padding: 1rem 0; }
    .connection-actions { grid-template-columns: 1fr; }
    .app-layout { gap: 0; grid-template-columns: 1fr; }
    .app-sidebar { border-bottom: 1px solid var(--line); border-right: 0; margin: 0 -0.75rem; overflow-x: auto; padding: .75rem; }
    .sidebar-nav { display: flex; min-width: max-content; position: static; }
    .sidebar-link { white-space: nowrap; }
    .site-footer { padding: 1.35rem 0; }
    .site-footer-inner { display: grid; gap: 1rem; }
    .footer-requisites-links { display: grid; gap: .55rem; }
    .footer-credit { white-space: normal; }
    .profile-name { max-width: 220px; }
    .profile-layout,
    .home-hero,
    .checkout-layout { grid-template-columns: 1fr; }
    .page-heading { align-items: stretch; display: grid; gap: 1rem; margin-bottom: 1.5rem; }
    .page-heading .btn { width: 100%; }
    .connection-card,
    .profile-summary,
    .profile-form,
    .checkout-panel,
    .checkout-summary { padding: 1.15rem; }
    .connection-meta > div,
    .profile-details > div,
    .checkout-summary dl > div { gap: 1rem; }
    .connection-meta dd,
    .profile-details dd,
    .checkout-summary dd { min-width: 0; overflow-wrap: anywhere; }
    .home-hero { min-height: 0; }
    .home-hero h1 { font-size: 2.25rem; }
    .instruction-content { padding: 0 1.25rem; }
    .auth-shell { margin-top: 0; }
    .auth-panel { padding: 1.4rem; }
    .guest-navbar { display: flex !important; flex-basis: auto; margin-left: auto; padding: 0; }
    .guest-navbar .landing-nav { display: none; }
    .guest-hero { background-position: 68% center; margin: 0 -.75rem; min-height: 560px; padding: 2rem 1.25rem; }
    .guest-hero::before { background: rgba(255, 255, 255, .84); }
    .guest-hero-copy { max-width: calc(100vw - 2.5rem); width: calc(100vw - 2.5rem); }
    .guest-hero h1 { font-size: 2.35rem; }
    .guest-hero-copy > p { font-size: 1rem; overflow-wrap: anywhere; }
    .guest-trust-row { align-items: flex-start; flex-direction: column; }
    .landing-section { padding-top: 3.75rem; }
    .landing-section-heading h2,
    .landing-offer h2 { font-size: 1.65rem; }
    .landing-steps,
    .landing-benefit-grid,
    .landing-country-grid { grid-template-columns: 1fr; }
    .landing-offer { align-items: stretch; flex-direction: column; margin: 3.75rem -.75rem 0; padding: 2rem 1.25rem; }
    .landing-offer-action { align-items: stretch; flex-direction: column; gap: 1.25rem; }
    .landing-offer-action div { text-align: left; }
}
