:root{
    --bg:#f4f7fb;
    --panel:#ffffff;
    --text:#16202f;
    --muted:#5f6d7e;
    --line:#d8e0ea;
    --brand:#1d3557;
    --brand-2:#2f5f98;
    --accent:#d96c3f;
}

*{box-sizing:border-box}

body{
    margin:0;
    font-family:Arial,sans-serif;
    background:linear-gradient(180deg,#eef3f9 0%,#f8fafc 100%);
    color:var(--text);
}

.site-top{
    position:sticky;
    top:0;
    background:#dde3ea;
    color:#1d3557;
    min-height:50px;
    padding:0 24px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
    z-index:1000;
    border-bottom:1px solid #c6d0da;
}

.site-top a{transition:color .15s ease}

.wrap{
    max-width:var(--public-wrap-max-width);
    margin:20px auto 0;
    padding:0 20px;
}

.top-shell{
    display:flex;
    align-items:center;
    gap:20px;
    flex:1;
}

.top-panel{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    flex:1;
}

.top-left{
    display:flex;
    align-items:center;
    gap:28px;
}

.logo{
    display:inline-flex;
    align-items:center;
    gap:12px;
    color:#1d3557;
    text-decoration:none;
    min-width:0;
    transition:transform .18s ease, filter .18s ease;
}

.logo:hover,
.logo:hover .logo-stack,
.logo:hover .logo-text,
.logo:hover .logo-subtext{
    text-decoration:none !important;
}

.logo:hover{
    transform:translateY(-1px);
    filter:brightness(1.05) saturate(1.04);
}

.logo:hover .logo-mark{
    filter:drop-shadow(0 10px 18px rgba(28,70,120,.18));
}

.logo-mark{
    width:40px;
    height:40px;
    object-fit:contain;
    display:block;
    flex:0 0 auto;
}

.logo-stack{
    display:grid;
    grid-template-rows:auto auto;
    align-items:start;
    gap:3px;
    min-width:0;
    width:208px;
}

.logo-text{
    display:block;
    width:100%;
    font-family:"Segoe UI Variable Display","Arial Nova","Segoe UI",sans-serif;
    font-size:21px;
    font-weight:900;
    letter-spacing:.03em;
    text-transform:uppercase;
    line-height:1;
    background:linear-gradient(135deg,#10263d 0%,#1c4678 48%,#2f6cb3 100%);
    -webkit-background-clip:text;
    background-clip:text;
    color:transparent;
    text-shadow:0 1px 0 rgba(255,255,255,.36),0 6px 16px rgba(19,50,83,.12);
    white-space:nowrap;
    transform:skewX(-5deg);
}

.logo-subtext{
    display:block;
    width:100%;
    font-family:"Segoe UI",Arial,sans-serif;
    font-size:9px;
    font-weight:700;
    letter-spacing:.16em;
    text-transform:uppercase;
    color:#476787;
    white-space:nowrap;
    line-height:1;
}

.burger{
    display:none;
    align-items:center;
    justify-content:center;
    width:42px;
    height:42px;
    border:1px solid #cfd7e1;
    border-radius:12px;
    background:transparent;
    color:#1d3557;
    cursor:pointer;
    padding:0;
}

.burger span,
.burger::before,
.burger::after{
    content:"";
    display:block;
    width:18px;
    height:2px;
    background:#1d3557;
    border-radius:999px;
    transition:transform .2s ease, opacity .2s ease;
}

.burger span{position:relative}
.burger::before{position:absolute;transform:translateY(-6px)}
.burger::after{position:absolute;transform:translateY(6px)}
.burger.is-open span{opacity:0}
.burger.is-open::before{transform:rotate(45deg)}
.burger.is-open::after{transform:rotate(-45deg)}

.top-nav{
    display:flex;
    align-items:center;
    gap:18px;
}

.menu-item{position:relative}

.menu-link{
    display:inline-block;
    color:#1d3557;
    text-decoration:none;
    font-size:16px;
    padding:14px 0;
    transition:.15s ease;
}

.menu-link:hover{
    color:#355d94;
    text-decoration:underline;
    text-underline-offset:4px;
    text-decoration-thickness:1.5px;
}

.dropdown{
    position:absolute;
    top:100%;
    left:0;
    min-width:340px;
    padding:10px;
    background:#fff;
    border:1px solid var(--line);
    border-radius:16px;
    box-shadow:0 16px 34px rgba(31,52,84,.12);
    display:none;
    z-index:10;
}

.dropdown a{
    display:block;
    padding:10px 12px;
    border-radius:10px;
    color:var(--brand);
    text-decoration:none;
    line-height:1.4;
    transition:.15s ease;
}

.dropdown a:hover{
    background:#f4f7fb;
    color:#15304e;
}

.menu-item:hover .dropdown{display:block}

.top-actions{
    display:flex;
    gap:12px;
    flex-wrap:nowrap;
}

.btn-outline,
.btn-solid,
button.btn-solid{
    display:inline-block;
    padding:12px 18px;
    border-radius:5px;
    text-decoration:none;
    transition:transform .15s ease, box-shadow .15s ease, color .15s ease, border-color .15s ease;
}

.top-actions .btn-outline,
.top-actions .btn-solid{
    padding:6px 9px;
    border-radius:5px;
}

.btn-outline{
    background:#fff;
    border:1px solid #2d4f88;
    color:#2d4f88;
    box-shadow:0 8px 18px rgba(29,53,87,.08);
}

.btn-outline:hover{
    color:#18345d;
    border-color:#18345d;
    transform:translateY(-1px);
    box-shadow:0 14px 24px rgba(29,53,87,.12);
}

.btn-solid{
    background:linear-gradient(135deg,#2f5f98 0%,#3b5bdb 100%);
    border:1px solid #2f5f98;
    color:#fff;
    box-shadow:0 12px 24px rgba(47,95,152,.22);
    cursor:pointer;
}

.btn-solid:hover{
    color:#eef4ff;
    transform:translateY(-1px);
    box-shadow:0 18px 30px rgba(47,95,152,.28);
}

.btn-solid-green,
button.btn-solid-green{
    background:linear-gradient(135deg,#0f5a43 0%,#177257 55%,#23906c 100%);
    border:1px solid #155e49;
    color:#fff;
    box-shadow:0 12px 24px rgba(23,114,87,.24);
}

.btn-solid-green:hover,
button.btn-solid-green:hover{
    color:#f3fff9;
    box-shadow:0 18px 30px rgba(23,114,87,.3);
}

.hero{padding:54px 0 34px}

.hero-card{
    background:
        radial-gradient(circle at top right, rgba(47,95,152,.16), rgba(47,95,152,0) 35%),
        linear-gradient(180deg,#ffffff 0%,#f6f9fc 100%);
    border:1px solid var(--line);
    border-radius:28px;
    padding:54px 48px;
    box-shadow:0 18px 48px rgba(31,52,84,.08);
}

.hero h1{
    margin:0 0 16px;
    font-size:44px;
    line-height:1.1;
    color:var(--brand);
}

.hero p{
    margin:0 0 26px;
    font-size:22px;
    line-height:1.5;
    color:var(--muted);
    max-width:760px;
}

.hero-actions{
    display:flex;
    gap:14px;
}

.hero-note{
    margin-top:18px;
    font-size:14px;
    color:var(--muted);
}

.section{padding:12px 0 22px}

.section-card,
.help-box{
    background:var(--panel);
    border:1px solid var(--line);
    border-radius:24px;
    padding:30px 28px;
    box-shadow:0 10px 30px rgba(31,52,84,.05);
}

.help-box{margin-bottom:20px}

.section h2{
    margin:0 0 18px;
    font-size:30px;
    color:var(--brand);
}

.grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:18px;
}

.grid-4{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:18px;
}

.item{
    padding:18px 18px 16px;
    border:1px solid #e3e9f1;
    border-radius:18px;
    background:linear-gradient(180deg,#fff 0%,#fbfcfe 100%);
}

.item-title{
    margin:0 0 10px;
    font-size:18px;
    font-weight:700;
    color:#19314f;
}

.item-text{
    margin:0;
    color:var(--muted);
    line-height:1.55;
}

.item-text + .item-text{margin-top:10px}

.price{
    font-size:26px;
    font-weight:700;
    color:var(--brand);
    margin:10px 0 12px;
}

.limit-list{
    margin:0 0 18px;
    padding-left:18px;
    color:var(--muted);
    line-height:1.65;
}

.tariff-pay-form{margin:0}

.service-list{
    display:grid;
    grid-template-columns:1fr;
    gap:16px;
}

.service-item{
    padding:20px;
    border:1px solid #e3e9f1;
    border-radius:18px;
    background:linear-gradient(180deg,#fff 0%,#fbfcfe 100%);
}

.service-head{
    display:flex;
    justify-content:space-between;
    gap:14px;
    align-items:flex-start;
    margin-bottom:10px;
}

.service-title{
    margin:0;
    font-size:20px;
    font-weight:700;
    color:#19314f;
}

.service-price{
    font-weight:700;
    color:var(--accent);
    white-space:nowrap;
}

.service-cta{margin-top:14px}

.form-stack{
    display:flex;
    flex-direction:column;
    gap:14px;
    max-width:760px;
}

.form-stack textarea{
    width:100%;
    padding:12px;
    border:1px solid #ccd6e2;
    border-radius:14px;
    font:inherit;
    resize:vertical;
}

.flash-success-public{
    background:#e6fcf5;
    color:#087f5b;
    padding:12px 14px;
    border-radius:12px;
    margin-bottom:14px;
}

.flash-error-public{
    background:#fff5f5;
    color:#c92a2a;
    padding:12px 14px;
    border-radius:12px;
    margin-bottom:14px;
}

.contact-intro{margin:0 0 16px}

.contact-email{margin:16px 0 0}

.contact-phone{margin:8px 0 0}

.contact-link{
    color:#2f5f98;
    text-decoration:none;
}

.legal-note{
    margin-top:10px;
    line-height:1.5;
    color:#7b8794;
    font-size:12px;
}

.footer{padding:28px 0 40px}

.footer-meta{
    margin-bottom:10px;
    line-height:1.55;
    color:#64748b;
}

.footer-links{
    display:flex;
    gap:18px;
    flex-wrap:wrap;
}

.footer-links a{
    color:var(--brand-2);
    text-decoration:none;
}

.footer-links a:hover{color:#183b66}

.help-title{
    margin:0;
    font-size:34px;
    color:var(--brand);
}

.help-nav{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-top:16px;
}

.help-btn{
    display:inline-block;
    padding:10px 14px;
    border-radius:12px;
    text-decoration:none;
    border:1px solid #2447a5;
    color:#2447a5;
    background:#fff;
    transition:color .15s ease,border-color .15s ease;
}

.help-btn:hover{
    color:#1a3378;
    border-color:#1a3378;
}

.help-btn.active{
    background:#3b5bdb;
    border-color:#3b5bdb;
    color:#fff;
}

.help-content{
    line-height:1.7;
    color:#334155;
}

.help-content p,
.help-content li{
    font-size:17px;
    line-height:1.7;
}

.help-content h2{
    margin-top:0;
    color:var(--brand);
}

.public-panel{
    background:var(--panel);
    border:1px solid var(--line);
    border-radius:24px;
    box-shadow:0 10px 30px rgba(31,52,84,.05);
}

.article-hero{
    padding:34px 30px;
    margin-bottom:20px;
}

.article-hero h1{
    margin:0 0 14px;
    font-size:42px;
    line-height:1.12;
    color:var(--brand);
}

.article-hero p{
    margin:0;
    font-size:18px;
    line-height:1.6;
    color:var(--muted);
}

.article-content{
    padding:32px 30px;
}

.article-content h2{
    margin:28px 0 14px;
    font-size:28px;
    color:var(--brand);
}

.article-content h2:first-child{margin-top:0}

.article-content p,
.article-content li{
    font-size:18px;
    line-height:1.7;
    color:#223246;
}

.article-content ul,
.article-content ol{
    padding-left:24px;
}

.article-footer-links{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:14px;
    margin-top:22px;
}

.article-footer-links a{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    min-height:64px;
    padding:16px 18px;
    border:1px solid #dbe6f2;
    border-radius:16px;
    background:linear-gradient(180deg,#ffffff 0%,#f7fbff 100%);
    box-shadow:0 8px 20px rgba(31,52,84,.06);
    color:#214c80;
    text-decoration:none;
    font-weight:600;
    line-height:1.4;
    transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease, color .15s ease;
}

.article-footer-links a::after{
    content:"→";
    flex:0 0 auto;
    font-size:18px;
    color:#4d76a8;
}

.article-footer-links a:hover{
    color:#173b66;
    border-color:#bfd2ea;
    box-shadow:0 14px 28px rgba(31,52,84,.10);
    transform:translateY(-1px);
}

.note{
    padding:18px 20px;
    border-radius:18px;
}

.note-warm{
    background:#fff7f1;
    border:1px solid #f0d2c3;
    color:#7b4a2a;
}

.note-blue{
    background:#f1f7ff;
    border:1px solid #cddcf2;
    color:#244568;
}

.note-green{
    background:#f3fbf5;
    border:1px solid #d2ead9;
    color:#21553b;
}

.feature-list{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:16px;
    margin-top:16px;
}

.feature-card{
    border:1px solid var(--line);
    border-radius:18px;
    padding:18px 18px;
    background:#fbfcfe;
}

.feature-card h3{
    margin:0 0 10px;
    font-size:20px;
    color:var(--brand);
}

.panel-actions{
    display:flex;
    gap:14px;
    flex-wrap:wrap;
    margin-top:20px;
}

.auth-box{
    width:100%;
    max-width:400px;
    margin:0 auto;
}

.auth-shell{
    min-height:calc(100vh - 140px);
    display:flex;
    align-items:center;
    justify-content:center;
    padding:28px 0 36px;
}

.auth-box h1{
    margin:0 0 18px;
    color:#18345d;
}

.auth-form{
    display:flex;
    flex-direction:column;
}

.auth-actions{
    display:flex;
    flex-direction:column;
    gap:10px;
    align-items:stretch;
    margin-top:10px;
}

.auth-flash{margin-bottom:14px}

.auth-mini-gap{
    margin-top:-6px;
    margin-bottom:12px;
}

.auth-links-note{
    margin-top:14px;
    line-height:1.6;
}

.auth-link-muted{
    color:#2f5f98;
    text-decoration:none;
}

.auth-extra-action{margin-top:8px}

.legal-public-box{
    max-width:980px;
    margin:0 auto;
}

.legal-public-meta{
    margin-bottom:16px;
    color:#64748b;
    font-size:13px;
}

.legal-document{
    color:#1f2937;
    line-height:1.76;
    text-align:left;
}

.data-text-title{
    margin:0 0 20px;
    font-size:32px;
    line-height:1.2;
    font-weight:800;
    color:#1d3557;
}

.data-text-section,
.data-text-paragraph{margin:0 0 12px}

.data-text-section{
    font-size:16px;
    color:#17324d;
}

.data-text-paragraph{font-size:15px}

.data-text-gap{height:10px}

body.admin-body{
    font-family:Arial,sans-serif;
    background:#f6f8fc;
    margin:0;
    color:#1f2937;
}

.top{
    position:sticky;
    top:0;
    background:#dde3ea;
    color:#1d3557;
    height:50px;
    padding:0 24px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    z-index:1000;
    border-bottom:1px solid #c6d0da;
}

.top-brand{
    display:inline-flex;
    align-items:center;
    gap:10px;
    color:#1d3557;
    text-decoration:none;
    min-width:0;
    transition:transform .18s ease, filter .18s ease;
}

.top-brand:hover,
.top-brand:hover .top-brand-stack,
.top-brand:hover .top-brand-text,
.top-brand:hover .top-brand-subtext{
    text-decoration:none !important;
}

.top-brand:hover{
    transform:translateY(-1px);
    filter:brightness(1.05) saturate(1.04);
}

.top-brand:hover .top-brand-mark{
    filter:drop-shadow(0 10px 18px rgba(28,70,120,.18));
}

.top-brand-mark{
    width:40px;
    height:40px;
    object-fit:contain;
    display:block;
    flex:0 0 auto;
}

.top-brand-stack{
    display:grid;
    grid-template-rows:auto auto;
    align-items:start;
    gap:3px;
    min-width:0;
    width:208px;
}

.top-brand-text{
    display:block;
    width:100%;
    font-family:"Segoe UI Variable Display","Arial Nova","Segoe UI",sans-serif;
    font-size:21px;
    font-weight:900;
    letter-spacing:.03em;
    text-transform:uppercase;
    line-height:1;
    background:linear-gradient(135deg,#10263d 0%,#1c4678 48%,#2f6cb3 100%);
    -webkit-background-clip:text;
    background-clip:text;
    color:transparent;
    text-shadow:0 1px 0 rgba(255,255,255,.36),0 6px 16px rgba(19,50,83,.12);
    white-space:nowrap;
    transform:skewX(-5deg);
}

.top-brand-subtext{
    display:block;
    width:100%;
    font-family:"Segoe UI",Arial,sans-serif;
    font-size:9px;
    font-weight:700;
    letter-spacing:.16em;
    text-transform:uppercase;
    color:#476787;
    white-space:nowrap;
    line-height:1;
}

.top a{
    color:#1d3557;
    text-decoration:none;
    text-underline-offset:3px;
    margin-left:14px;
    transition:color .15s ease, text-decoration-color .15s ease;
}

.top a:hover{
    color:#355d94;
    text-decoration:underline;
    text-decoration-color:currentColor;
}

.top form{display:inline;margin:0}

.top a.link-rag{color:#4b5563}
.top a.link-rag:hover{color:#374151}
.top a.link-admin{color:#1f6a30}
.top a.link-admin:hover{color:#174f24}

.top-user{
    display:inline-block;
    margin-left:28px;
    color:#1d3557;
}

.top-user-link{
    display:inline-block;
    margin-left:28px;
    color:#1d3557;
    text-decoration:none;
    text-underline-offset:3px;
    transition:color .15s ease, text-decoration-color .15s ease;
}

.top-user-link:hover{
    color:#355d94;
    text-decoration:underline;
    text-decoration-color:currentColor;
}

.top-logout-form{display:inline-block;margin-left:14px}

.top-logout-btn{
    padding:0;
    border:none;
    background:transparent;
    color:#1d3557;
    cursor:pointer;
    font:inherit;
    line-height:inherit;
    text-decoration:none;
    text-underline-offset:3px;
    transition:color .15s ease, text-decoration-color .15s ease;
    box-shadow:none;
}

.top-logout-btn:hover{
    color:#355d94;
    text-decoration:underline;
    text-decoration-color:currentColor;
    transform:none;
}

.wrap-admin{
    max-width:1280px;
    margin:20px auto;
    padding:0 16px;
}

.box{
    background:#fff;
    border-radius:16px;
    padding:18px;
    margin-bottom:20px;
    box-shadow:0 8px 24px rgba(0,0,0,.06);
}

.nav a{
    display:inline-block;
    margin:0 8px 8px 0;
    padding:10px 14px;
    border-radius:5px;
    text-decoration:none;
    background:#edf2ff;
    color:#1c3faa;
    transition:color .15s ease, transform .15s ease;
}

.nav a:hover{
    color:#456fcf;
    transform:translateY(-1px);
}

.grid-admin{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:20px;
}

input[type=text],
input[type=password],
input[type=email],
input[type=datetime-local],
textarea,
select,
input[type=file]{
    width:100%;
    padding:10px;
    border:1px solid #ccc;
    border-radius:5px;
    box-sizing:border-box;
    margin-top:6px;
    margin-bottom:12px;
}

textarea{min-height:160px}

button,
.btn{
    display:inline-block;
    padding:10px 14px;
    border:1px solid #2f5f98;
    border-radius:5px;
    background-color:#3b5bdb;
    background-image:linear-gradient(135deg,#2b5d98 0%,#3c69df 55%,#4a57d8 100%);
    color:#fff;
    cursor:pointer;
    text-decoration:none;
    transition:transform .15s ease, box-shadow .15s ease, color .15s ease, border-color .15s ease;
    box-shadow:0 10px 20px rgba(47,95,152,.18);
}

button:hover,
.btn:hover{
    color:#eef4ff;
    transform:translateY(-1px);
    box-shadow:0 16px 26px rgba(47,95,152,.24);
}

.btn-gray{
    border-color:#5f6d7e;
    background-color:#718096;
    background-image:linear-gradient(135deg,#5f6d7e 0%,#73859a 55%,#8294a8 100%);
}

.btn-green{
    border-color:#155e49;
    background-color:#1f7a5c;
    background-image:linear-gradient(135deg,#0f5a43 0%,#177257 55%,#23906c 100%);
}

.btn-red{
    border-color:#a61e1e;
    background-color:#c92a2a;
    background-image:linear-gradient(135deg,#a61e1e 0%,#c92a2a 55%,#df4b4b 100%);
}

.btn-purple{
    border-color:#5d3bb2;
    background-color:#7353d8;
    background-image:linear-gradient(135deg,#5d3bb2 0%,#7a4de0 55%,#9662ef 100%);
}

.btn-purple:hover{
    color:#f6f1ff;
    box-shadow:0 16px 26px rgba(93,59,178,.28);
}

.btn-blue{
    border-color:#2f5f98;
    background-color:#3b5bdb;
    background-image:linear-gradient(135deg,#2b5d98 0%,#3c69df 55%,#4a57d8 100%);
}

.btn-filter{
    background:#fff;
    background-image:none;
    border:1px solid #2447a5;
    color:#2447a5;
    font-weight:400;
    box-shadow:0 8px 18px rgba(29,53,87,.06);
}

.btn-filter:hover{
    background:#fff;
    background-image:none;
    color:#1a3378;
    border-color:#1a3378;
    box-shadow:0 12px 22px rgba(29,53,87,.09);
}

.btn-outline{
    background:#fff;
    background-image:none;
    border:1px solid #2447a5;
    color:#2447a5;
    font-weight:400;
    box-shadow:0 8px 18px rgba(29,53,87,.06);
}

.btn-outline:hover{
    background:#fff;
    background-image:none;
    color:#1a3378;
    border-color:#1a3378;
    box-shadow:0 12px 22px rgba(29,53,87,.09);
}

.btn-outline.btn-gray{
    background:#fff;
    background-image:none;
    border:1px solid #4b5563;
    color:#4b5563;
}

.btn-outline.btn-gray:hover{
    background:#fff;
    background-image:none;
    color:#374151;
    border-color:#374151;
}

.btn-outline.btn-green{
    background:#fff;
    background-image:none;
    border:1px solid #1f6a30;
    color:#1f6a30;
}

.btn-outline.btn-green:hover{
    background:#fff;
    background-image:none;
    color:#174f24;
    border-color:#174f24;
}

.btn-outline.btn-red{
    background:#fff;
    background-image:none;
    border:1px solid #9f1d1d;
    color:#9f1d1d;
}

.btn-outline.btn-red:hover{
    background:#fff;
    background-image:none;
    color:#7f1717;
    border-color:#7f1717;
}

.auth-actions .auth-btn,
.auth-actions button.auth-btn{
    display:flex;
    width:100%;
    min-height:46px;
    align-items:center;
    justify-content:center;
    text-align:center;
    padding:12px 16px;
    border-radius:5px;
    text-decoration:none;
    font-weight:600;
    font-size:15px;
    letter-spacing:.01em;
    box-sizing:border-box;
    transition:transform .15s ease, box-shadow .15s ease, color .15s ease, border-color .15s ease;
}

.auth-actions .auth-btn:hover,
.auth-actions button.auth-btn:hover{transform:translateY(-1px)}

.auth-actions .auth-btn-register,
.auth-actions button.auth-btn-register{
    background-color:#3b5bdb;
    background-image:linear-gradient(135deg,#2b5d98 0%,#3c69df 55%,#4a57d8 100%);
    border:1px solid #2f5f98;
    color:#fff;
    box-shadow:0 12px 24px rgba(47,95,152,.22);
}

.auth-actions .auth-btn-register:hover,
.auth-actions button.auth-btn-register:hover{
    color:#eef4ff;
    box-shadow:0 18px 30px rgba(47,95,152,.28);
}

.auth-actions .auth-btn-login,
.auth-actions button.auth-btn-login{
    background-color:#1f7a5c;
    background-image:linear-gradient(135deg,#0f5a43 0%,#177257 55%,#23906c 100%);
    border:1px solid #155e49;
    color:#fff;
    box-shadow:0 12px 24px rgba(21,94,73,.20);
}

.auth-actions .auth-btn-login:hover,
.auth-actions button.auth-btn-login:hover{
    color:#ecfff8;
    box-shadow:0 18px 30px rgba(21,94,73,.26);
}

.auth-actions .auth-btn-neutral,
.auth-actions button.auth-btn-neutral{
    background:#f3f5f8;
    background-image:none;
    border:1px solid #d2d9e3;
    color:#39506c;
    box-shadow:0 8px 18px rgba(31,52,84,.06);
}

.auth-actions .auth-btn-neutral:hover,
.auth-actions button.auth-btn-neutral:hover{
    background:#f3f5f8;
    background-image:none;
    color:#21364e;
    border-color:#b9c4d1;
}

table{
    width:100%;
    border-collapse:collapse;
}

th,td{
    padding:12px;
    border-bottom:1px solid #eee;
    text-align:left;
    vertical-align:top;
}

.flash-success{
    background:#e6fcf5;
    color:#087f5b;
    padding:12px;
    border-radius:12px;
    margin-bottom:15px;
}

.flash-error{
    background:#fff5f5;
    color:#c92a2a;
    padding:12px;
    border-radius:12px;
    margin-bottom:15px;
}

.flash-warning{
    background:#fff9db;
    color:#8a6d1d;
    padding:12px;
    border-radius:12px;
    margin-bottom:15px;
}

.mini{font-size:12px;color:#666}

.tag{
    display:inline-block;
    padding:4px 8px;
    border-radius:8px;
    background:#f1f3f5;
    font-size:12px;
    margin-right:5px;
}

.format-tools{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin:8px 0 10px;
}

.format-btn{
    padding:8px 12px;
    border:1px solid #c9d7ea;
    border-radius:5px;
    background:#edf2ff;
    color:#1c3faa;
    cursor:pointer;
    transition:transform .15s ease, color .15s ease, border-color .15s ease;
}

.format-btn:hover{
    color:#456fcf;
    border-color:#9fb9df;
    transform:translateY(-1px);
}

.media-preview img{max-width:120px;border-radius:10px;margin:5px}

.modal-overlay{
    position:fixed;
    inset:0;
    background:rgba(20,24,35,.55);
    display:none;
    align-items:center;
    justify-content:center;
    z-index:9999;
    padding:20px;
}

.modal-overlay.active{display:flex}

.modal-box{
    width:100%;
    max-width:620px;
    background:#fff;
    border-radius:20px;
    box-shadow:0 20px 60px rgba(0,0,0,.18);
    overflow:hidden;
}

.modal-head{
    padding:20px 22px 12px;
    font-size:22px;
    font-weight:700;
    color:#1d3557;
}

.modal-body{
    padding:0 22px 22px;
    color:#333;
    line-height:1.55;
    font-size:15px;
}

.modal-actions{
    display:flex;
    gap:12px;
    justify-content:flex-end;
    padding:0 22px 22px;
}

.btn-cancel{
    background:#eef2f7;
    background-image:none;
    border-color:#cfd8e3;
    color:#223;
    box-shadow:0 8px 18px rgba(31,52,84,.06);
}

.btn-cancel:hover{
    color:#223;
    background:#eef2f7;
    background-image:none;
}

.preview-phone{
    max-width:430px;
    margin:0 auto;
    background:radial-gradient(circle at top left, rgba(255,255,255,.75), rgba(255,255,255,0) 42%),linear-gradient(180deg,#e8f2ff 0%,#dde9f8 100%);
    border-radius:28px;
    padding:18px;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.7);
}

.preview-post{
    background:#ffffff;
    border-radius:22px 22px 12px 22px;
    box-shadow:0 14px 36px rgba(35,59,94,.12);
    overflow:hidden;
    border:1px solid #dbe6f2;
}

.preview-post-head{
    padding:14px 16px 10px;
    border-bottom:1px solid #e6edf5;
    background:linear-gradient(180deg,#f8fbff 0%,#eef4fb 100%);
}

.preview-post-title{font-size:16px;font-weight:700;color:#16365d;margin-bottom:4px}
.preview-post-meta{font-size:12px;color:#6b7a90;line-height:1.45}
.preview-post-body{padding:16px;background:#fff}
.preview-post-text{line-height:1.62;color:#1f2937;font-size:15px;word-break:break-word}
.preview-post-text b,.preview-post-text strong{font-weight:700}
.preview-post-text i,.preview-post-text em{font-style:italic}
.preview-post-text code{font-family:Consolas,monospace;background:#f1f5f9;padding:2px 6px;border-radius:6px}
.preview-post-text blockquote{margin:12px 0;padding:10px 14px;border-left:4px solid #90caf9;background:#f8fbff;border-radius:10px;color:#37516b}
.preview-post-text a{color:#206bc4;text-decoration:underline}
.preview-post-text .tg-spoiler{background:#334155;color:#334155;border-radius:4px;padding:0 4px;cursor:pointer}
.preview-post-text .tg-spoiler *{color:inherit}
.preview-post-text .tg-spoiler.is-revealed{color:#fff}
.preview-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:14px}
.preview-gallery img{width:100%;border-radius:16px;display:block;border:1px solid #d9e5f3}
.preview-audio{margin-top:14px;padding:12px;background:#f8fbff;border-radius:14px;border:1px solid #dde8f5}
.preview-audio audio{width:100%}
.preview-empty{margin-top:10px;color:#6b7a90;font-size:14px}
.stats-inline{display:flex;flex-wrap:wrap;gap:10px 14px;align-items:center}
.field-row{display:grid;grid-template-columns:minmax(260px,25%) 1fr;gap:18px;align-items:start;margin-bottom:10px}
.field-row.field-row-wide{grid-template-columns:minmax(420px,33.333%) 1fr}
.field-input label{display:block}
.field-help{font-size:13px;line-height:1.55;color:#5b6777;padding-top:30px}
.field-help.field-help-tight{padding-top:0}
.field-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:10px}
.action-rows{display:flex;flex-direction:column;gap:8px}
.action-row{display:flex;flex-wrap:wrap;gap:8px}

@media(max-width:900px){
    .site-top{padding:14px 16px}
    .wrap{margin-top:16px}
    .hero-card{padding:36px 24px}
    .hero h1{font-size:34px}
    .hero p{font-size:18px}
    .grid,
    .grid-4{grid-template-columns:1fr}
    .service-head{flex-direction:column}
    .help-title{font-size:28px}
    .feature-list{grid-template-columns:1fr}
    .article-hero h1{font-size:34px}
    .auth-shell{
        min-height:auto;
        padding:24px 0 32px;
    }
    .grid-admin{grid-template-columns:1fr}
    .field-row,.field-row.field-row-wide{grid-template-columns:1fr}
    .field-help{padding-top:0}
    .article-footer-links{grid-template-columns:1fr}
}

@media(max-width:760px){
    .site-top{
        height:auto;
        padding:12px 16px;
        display:block;
    }

    .top-shell{
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:12px;
    }

    .top-left{
        gap:14px;
        flex:1;
        min-width:0;
    }

    .logo{gap:10px}
    .logo-mark{width:36px;height:36px}
    .logo-stack{width:186px}
    .logo-text{font-size:19px;letter-spacing:.03em}
    .logo-subtext{font-size:8px;letter-spacing:.13em}

    .burger{
        display:inline-flex;
        position:relative;
    }

    .top-panel{
        display:none;
        padding-top:14px;
        flex-direction:column;
        align-items:stretch;
        gap:12px;
    }

    .top-panel.is-open{display:block}

    .top-nav{
        display:block;
        width:100%;
    }

    .menu-item{display:block}
    .menu-link{display:block;padding:10px 0}

    .dropdown{
        position:static;
        display:block;
        min-width:0;
        margin-top:0;
        background:transparent;
        border:none;
        box-shadow:none;
        padding:6px 0 10px;
    }

    .dropdown a{
        display:block;
        padding:8px 0;
        color:#355d94;
        border-radius:0;
    }

    .dropdown a:hover{
        background:transparent;
        color:#1d3557;
    }

    .top-actions{
        display:flex;
        flex-direction:column;
        align-items:stretch;
        padding-top:8px;
        width:100%;
    }

    .top-actions a{text-align:center}
    .top-brand-stack{width:186px}
    .top-brand-text{font-size:19px;letter-spacing:.03em}
    .top-brand-subtext{font-size:8px;letter-spacing:.13em}
}
