/* =========================================================
   RMRP — Посхалка законодательства
   Единая тема оформления для всех страниц сайта
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root{
    --bg:#060910;
    --bg-2:#0a0f18;
    --panel:#0e141e;
    --panel-2:#121a27;
    --panel-3:#151c28;
    --line:#223047;
    --line-soft:#1b2739;
    --text:#eef4ff;
    --muted:#8d9ab0;
    --muted-2:#6f7d94;
    --blue:#4a9eff;
    --blue-2:#82c2ff;
    --cyan:#55d6ff;
    --violet:#8b7bff;
    --gold:#ffd84d;
    --red:#ff6262;
    --green:#61e6aa;
    --radius:18px;
    --radius-lg:24px;
    --shadow:0 20px 55px rgba(0,0,0,.35);
}

*{box-sizing:border-box}

html{scroll-behavior:smooth}

body{
    margin:0;
    min-height:100vh;
    color:var(--text);
    font-family:Inter,Arial,sans-serif;
    font-size:16px;
    line-height:1.6;
    -webkit-font-smoothing:antialiased;
    text-rendering:optimizeLegibility;
    background:
        radial-gradient(900px 520px at 12% -8%,rgba(74,158,255,.16),transparent 60%),
        radial-gradient(760px 480px at 92% 6%,rgba(139,123,255,.10),transparent 62%),
        radial-gradient(700px 520px at 55% 105%,rgba(85,214,255,.06),transparent 60%),
        linear-gradient(180deg,#060910,#0a0f18 55%,#060910);
    background-attachment:fixed;
}

body::before{
    content:"";
    position:fixed;
    inset:0;
    z-index:0;
    pointer-events:none;
    opacity:.55;
    background-image:
        linear-gradient(rgba(255,255,255,.022) 1px,transparent 1px),
        linear-gradient(90deg,rgba(255,255,255,.022) 1px,transparent 1px);
    background-size:44px 44px;
    -webkit-mask-image:radial-gradient(circle at 50% 0%,black,transparent 78%);
    mask-image:radial-gradient(circle at 50% 0%,black,transparent 78%);
}

a{color:inherit;text-decoration:none}
img{max-width:100%}
::selection{background:rgba(74,158,255,.35);color:#fff}
:focus-visible{outline:2px solid var(--blue);outline-offset:2px;border-radius:6px}

/* ---------- Скроллбар ---------- */

*{scrollbar-width:thin;scrollbar-color:rgba(74,158,255,.4) transparent}
::-webkit-scrollbar{width:11px;height:11px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{
    background:linear-gradient(180deg,#2b3d57,#1a2739);
    border:3px solid transparent;
    background-clip:content-box;
    border-radius:999px;
}
::-webkit-scrollbar-thumb:hover{
    background:linear-gradient(180deg,#3f5b83,#243348);
    background-clip:content-box;
}

/* ---------- Шапка ---------- */

header{
    position:sticky;
    top:0;
    z-index:50;
    background:rgba(6,9,16,.78);
    backdrop-filter:blur(18px) saturate(140%);
    -webkit-backdrop-filter:blur(18px) saturate(140%);
    border-bottom:1px solid rgba(74,158,255,.14);
}

.header-inner{
    max-width:1260px;
    margin:auto;
    padding:14px 22px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
}

.logo{
    display:inline-flex;
    align-items:center;
    gap:8px;
    font-weight:900;
    font-size:18px;
    letter-spacing:-.01em;
    white-space:nowrap;
}
.logo-mark{color:#fff;text-shadow:0 0 24px rgba(74,158,255,.5)}
.logo-muted{color:var(--muted-2);font-weight:700}
.logo span{color:var(--blue-2)}

nav{display:flex;align-items:center;gap:4px;flex-wrap:wrap}
nav a{
    padding:9px 13px;
    border-radius:10px;
    color:#9ba9be;
    font-size:14px;
    font-weight:700;
    transition:.2s ease;
}
nav a:hover{color:#fff;background:rgba(74,158,255,.10)}
nav a.active{
    color:#fff;
    background:rgba(74,158,255,.13);
    box-shadow:inset 0 0 0 1px rgba(74,158,255,.22);
}

.discord-button{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:9px 14px;
    border-radius:10px;
    border:1px solid #34435a;
    background:#151d29;
    color:#eef4ff;
    font-size:14px;
    font-weight:800;
    white-space:nowrap;
    transition:.2s ease;
}
.discord-button:hover{
    border-color:#7d93ff;
    background:#1b2535;
    transform:translateY(-1px);
    box-shadow:0 10px 25px rgba(114,140,255,.18);
}

/* ---------- Общая раскладка ---------- */

.container{
    max-width:1260px;
    margin:auto;
    padding:40px 22px 90px;
    position:relative;
    z-index:1;
}
.container.narrow{max-width:1050px}

/* ---------- Hero ---------- */

.hero{
    position:relative;
    overflow:hidden;
    border:1px solid rgba(74,158,255,.24);
    border-radius:var(--radius-lg);
    padding:56px 50px;
    background:
        radial-gradient(700px 340px at 88% 12%,rgba(74,158,255,.20),transparent 62%),
        radial-gradient(520px 300px at 6% 100%,rgba(139,123,255,.12),transparent 65%),
        linear-gradient(135deg,#121b29,#0c1119 60%,#101724);
    box-shadow:var(--shadow);
    animation:fade-up .6s ease both;
}
.hero::before{
    content:"";
    position:absolute;
    width:360px;
    height:360px;
    right:-120px;
    top:-170px;
    border-radius:50%;
    background:radial-gradient(circle,rgba(74,158,255,.30),transparent 65%);
    filter:blur(22px);
    pointer-events:none;
    animation:float 14s ease-in-out infinite;
}
.hero::after{
    content:"";
    position:absolute;
    width:230px;
    height:230px;
    right:24px;
    top:-40px;
    border-radius:50%;
    border:1px solid rgba(74,158,255,.16);
    box-shadow:0 0 0 38px rgba(74,158,255,.03),0 0 0 76px rgba(74,158,255,.02);
    pointer-events:none;
}
.hero > *{position:relative;z-index:1}
.hero-symbol{
    position:absolute;
    right:34px;
    top:-22px;
    z-index:0;
    font-size:180px;
    line-height:1;
    opacity:.05;
    transform:rotate(-8deg);
    pointer-events:none;
    user-select:none;
}

.badge{
    display:inline-flex;
    align-items:center;
    gap:7px;
    padding:7px 12px;
    border-radius:999px;
    border:1px solid rgba(74,158,255,.32);
    background:linear-gradient(135deg,rgba(74,158,255,.16),rgba(85,214,255,.07));
    color:#8ac6ff;
    font-size:11px;
    font-weight:900;
    letter-spacing:.12em;
    text-transform:uppercase;
    box-shadow:0 8px 24px rgba(0,0,0,.2);
}

h1{
    font-size:clamp(34px,5vw,54px);
    line-height:1.05;
    letter-spacing:-.03em;
    margin:18px 0;
}
.hero p,.subtitle{
    max-width:780px;
    margin:0;
    color:var(--muted);
    font-size:17px;
    line-height:1.7;
}

.hero-stats{position:relative;display:flex;gap:9px;flex-wrap:wrap;margin-top:24px}
.stat{
    display:flex;
    align-items:center;
    gap:8px;
    padding:9px 13px;
    border:1px solid #25364e;
    border-radius:10px;
    background:rgba(9,15,24,.6);
    color:#9dacbf;
    font-size:12px;
    font-weight:700;
}
.stat b{color:#eaf3ff}

/* ---------- Кнопки ---------- */

.buttons{display:flex;gap:12px;flex-wrap:wrap;margin-top:30px}
.button{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:13px 18px;
    border-radius:12px;
    border:1px solid rgba(255,255,255,.10);
    background:linear-gradient(135deg,#5caaff,#347fd5);
    color:#fff;
    font-weight:800;
    font-size:15px;
    box-shadow:0 12px 30px rgba(35,126,220,.28);
    transition:.2s ease;
}
.button:hover{transform:translateY(-2px);box-shadow:0 18px 40px rgba(35,126,220,.38)}
.button.secondary,.button.discord{
    background:#151d29;
    border-color:#30405a;
    color:#dfe8f5;
    box-shadow:0 10px 26px rgba(0,0,0,.22);
}
.button.secondary:hover,.button.discord:hover{
    background:#1a2534;
    border-color:var(--blue);
    color:#fff;
}

/* ---------- Секции ---------- */

.section{margin-top:46px}
.section-head{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:20px;
    margin-bottom:18px;
}
.eyebrow{
    color:var(--blue-2);
    font-size:12px;
    font-weight:900;
    letter-spacing:.14em;
    text-transform:uppercase;
}
.section h2{
    font-size:clamp(22px,3vw,30px);
    margin:6px 0 0;
    letter-spacing:-.02em;
}
.section-title{
    font-size:12px;
    font-weight:900;
    letter-spacing:.14em;
    color:var(--muted-2);
    text-transform:uppercase;
}
.result-count{color:var(--muted-2);font-size:12px}
.link{color:var(--blue-2);font-weight:800;font-size:14px;transition:.2s}
.link:hover{color:#fff}

/* ---------- Карточки ---------- */

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

.card{
    position:relative;
    display:flex;
    flex-direction:column;
    padding:26px;
    border:1px solid var(--line);
    border-radius:var(--radius);
    background:linear-gradient(145deg,rgba(21,28,40,.97),rgba(13,18,27,.97));
    overflow:hidden;
    transition:transform .24s ease,border-color .24s ease,box-shadow .24s ease;
}
.card::before{
    content:"";
    position:absolute;
    left:0;
    top:0;
    bottom:0;
    width:3px;
    background:linear-gradient(180deg,var(--blue),transparent);
    opacity:.12;
    transition:.24s ease;
}
.card::after{
    content:"";
    position:absolute;
    width:240px;
    height:140px;
    right:-130px;
    top:-100px;
    border-radius:50%;
    background:rgba(74,158,255,.14);
    filter:blur(28px);
    transition:.24s ease;
}
.card:hover{
    transform:translateY(-5px);
    border-color:rgba(74,158,255,.55);
    box-shadow:0 24px 55px rgba(0,0,0,.32),0 0 40px rgba(74,158,255,.06);
}
.card:hover::before{opacity:1}
.card:hover::after{right:-70px;top:-60px}

.card > .icon{
    font-size:34px;
    margin-bottom:16px;
    filter:drop-shadow(0 8px 18px rgba(74,158,255,.2));
}
.card h2,.card h3{margin:0 0 9px;font-size:20px;line-height:1.3;color:#f5f8ff}
.card p{margin:0;color:var(--muted);font-size:14px;line-height:1.6}

.card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.card-top .icon{
    width:50px;
    height:50px;
    flex:0 0 50px;
    display:grid;
    place-items:center;
    border-radius:14px;
    border:1px solid #2b3d57;
    background:linear-gradient(145deg,#18263a,#111a28);
    font-size:25px;
    box-shadow:inset 0 1px rgba(255,255,255,.05);
    margin:0;
}
.card h2{margin:17px 0 8px}
.card-number{
    padding:5px 8px;
    border-radius:7px;
    color:#61728b;
    background:#0a111c;
    border:1px solid #202e42;
    font-size:10px;
    font-weight:900;
    letter-spacing:.08em;
}
.card-bottom{
    margin-top:auto;
    padding-top:17px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    color:#52647d;
    font-size:12px;
    font-weight:800;
}
.open{color:#7890ae;transition:.2s}
.card:hover .open{color:var(--blue-2);transform:translateX(4px)}
.tag{color:#65758d;font-size:10px;text-transform:uppercase;letter-spacing:.1em}

.empty{
    grid-column:1/-1;
    padding:55px 20px;
    text-align:center;
    border:1px dashed #26364d;
    border-radius:16px;
    color:#718097;
    background:rgba(12,18,28,.55);
}
.empty-icon{font-size:32px;margin-bottom:8px}

/* ---------- Поиск ---------- */

.search-wrap{position:relative;margin:24px 0 22px}
.search-icon{position:absolute;left:17px;top:15px;z-index:2;color:#6d7d94;font-size:21px}
.search{
    width:100%;
    padding:16px 18px;
    border-radius:14px;
    border:1px solid #26364d;
    outline:none;
    background:rgba(13,20,31,.9);
    color:#fff;
    font-size:15px;
    transition:.2s;
    box-shadow:0 12px 35px rgba(0,0,0,.16);
}
.search-wrap .search{padding-left:48px}
.search::placeholder{color:#617087}
.search:focus{
    border-color:rgba(74,158,255,.8);
    box-shadow:0 0 0 4px rgba(74,158,255,.10),0 15px 45px rgba(0,0,0,.2);
}
.container > .search{margin:26px 0}

/* ---------- Новости ---------- */

.news-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.news-list{display:grid;gap:16px}
.news-card{
    position:relative;
    display:block;
    padding:24px;
    border:1px solid var(--line);
    border-radius:var(--radius);
    background:linear-gradient(145deg,rgba(21,28,40,.97),rgba(13,18,27,.97));
    overflow:hidden;
    transition:transform .24s,border-color .24s,box-shadow .24s;
}
.news-card::before{
    content:"";
    position:absolute;
    left:0;
    top:0;
    height:3px;
    width:100%;
    background:linear-gradient(90deg,var(--blue),var(--cyan),transparent);
    opacity:0;
    transition:.24s;
}
.news-card:hover{
    transform:translateY(-4px);
    border-color:rgba(74,158,255,.5);
    box-shadow:0 20px 48px rgba(0,0,0,.3);
}
.news-card:hover::before{opacity:1}
.news-date{font-size:12px;font-weight:700;color:#788698;margin-bottom:10px}
.news-title{font-size:20px;font-weight:850;line-height:1.3;color:#f5f8ff;margin-bottom:10px}
.news-text,.news-content{color:#a9b4c4;line-height:1.7;white-space:pre-line}
.news-tag{
    display:inline-block;
    margin-top:15px;
    padding:5px 9px;
    border-radius:7px;
    background:#152238;
    border:1px solid rgba(74,158,255,.18);
    color:#72b7ff;
    font-size:11px;
    font-weight:700;
}
.meta{display:flex;gap:8px;flex-wrap:wrap;margin-top:18px}
.meta .tag{
    padding:6px 9px;
    border-radius:7px;
    background:#152238;
    border:1px solid rgba(74,158,255,.18);
    color:#72b7ff;
    font-size:11px;
}
.author{padding:6px 9px;border-radius:7px;background:#171d25;color:#8492a5;font-size:11px}
.news-card.important{
    border-color:rgba(255,216,77,.45);
    background:linear-gradient(145deg,rgba(32,28,15,.95),rgba(20,18,12,.95));
}
.important-label{
    display:inline-flex;
    padding:5px 9px;
    border-radius:7px;
    background:rgba(255,216,77,.1);
    border:1px solid rgba(255,216,77,.3);
    color:var(--gold);
    font-size:11px;
    font-weight:900;
    letter-spacing:.08em;
    margin-bottom:12px;
}
.toolbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:15px;
    margin-bottom:16px;
    color:var(--muted-2);
    font-size:13px;
}
.toolbar a{color:var(--blue-2);font-weight:700}
.toolbar a:hover{color:#fff}

/* ---------- Состояния загрузки/ошибок ---------- */

.loading,.empty{
    padding:45px;
    text-align:center;
    border:1px solid var(--line);
    border-radius:16px;
    background:rgba(13,18,27,.7);
    color:var(--muted);
}
.error{
    padding:20px;
    border:1px solid rgba(255,98,98,.3);
    border-radius:12px;
    background:rgba(255,98,98,.08);
    color:#ff9b9b;
}

/* ---------- FAQ ---------- */

.category{margin-top:34px}
.category-title{
    color:var(--blue-2);
    font-size:13px;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.12em;
    margin-bottom:12px;
}
.item{
    background:linear-gradient(145deg,rgba(21,28,40,.95),rgba(13,18,27,.95));
    border:1px solid var(--line);
    border-radius:14px;
    margin-bottom:12px;
    overflow:hidden;
    transition:.2s;
}
.item:hover{border-color:rgba(74,158,255,.4)}
.item.open{border-color:rgba(74,158,255,.5);box-shadow:0 16px 40px rgba(0,0,0,.25)}
.question{
    width:100%;
    padding:20px;
    background:none;
    border:0;
    color:#f3f6fc;
    text-align:left;
    font-size:17px;
    font-weight:700;
    cursor:pointer;
    display:flex;
    justify-content:space-between;
    gap:20px;
    transition:.2s;
}
.question:hover{background:rgba(74,158,255,.05)}
.plus{color:var(--blue-2);font-size:22px;flex-shrink:0;transition:transform .25s ease}
.item.open .plus{transform:rotate(45deg)}
.answer{
    display:none;
    padding:0 20px 20px;
    color:#aab6c8;
    line-height:1.75;
    white-space:pre-line;
}
.item.open .answer{display:block;animation:fade-up .3s ease}

/* ---------- Страница закона ---------- */

.layout{
    max-width:1400px;
    margin:auto;
    display:grid;
    grid-template-columns:280px minmax(0,1fr) 220px;
    gap:28px;
    padding:35px 24px 100px;
    position:relative;
    z-index:1;
}
.sidebar{position:sticky;top:90px;height:calc(100vh - 110px);overflow:auto;padding-right:6px}
.sidebar h3{
    margin:0 0 15px;
    font-size:12px;
    text-transform:uppercase;
    letter-spacing:.12em;
    color:var(--muted-2);
}
.toc a{
    display:block;
    padding:9px 12px;
    margin-bottom:3px;
    border-radius:9px;
    border-left:2px solid transparent;
    color:#aab4c3;
    font-size:14px;
    line-height:1.4;
    transition:.18s;
}
.toc a:hover{
    background:rgba(74,158,255,.08);
    color:var(--blue-2);
    border-left-color:var(--blue);
}
.document{min-width:0}
.document h1{font-size:clamp(28px,4vw,42px)}
.breadcrumbs,.breadcrumb{color:var(--muted-2);font-size:14px;margin-bottom:18px}
.breadcrumbs a,.breadcrumb a{color:#9babc0}
.breadcrumbs a:hover,.breadcrumb a:hover{color:var(--blue-2)}
.chapter{
    margin:46px 0 20px;
    padding-bottom:12px;
    border-bottom:1px solid var(--line-soft);
    color:var(--blue-2);
    font-size:19px;
    font-weight:800;
    scroll-margin-top:90px;
}
.article{
    background:linear-gradient(180deg,#fbfbf9,#f2f2ee);
    color:#20242a;
    border:1px solid rgba(255,255,255,.06);
    border-radius:14px;
    padding:34px;
    margin-bottom:24px;
    box-shadow:0 18px 45px rgba(0,0,0,.3);
    scroll-margin-top:90px;
}
.article-number{
    color:#687384;
    font-size:13px;
    font-weight:800;
    letter-spacing:.04em;
    text-transform:uppercase;
    margin-bottom:8px;
}
.article-title{font-size:25px;line-height:1.3;letter-spacing:-.01em;color:#1b1f24;margin:0 0 22px}
.article-content{
    font-family:Georgia,Merriweather,serif;
    font-size:18px;
    line-height:1.85;
    color:#24282e;
}
.article-content strong{font-weight:800;color:#111}
.article-content em{font-style:italic}
.article-content .important{
    background:#fff0a8;
    border-left:4px solid #e0b400;
    padding:12px 15px;
    margin:15px 0;
    border-radius:6px;
}
.quote{border-left:4px solid #aeb6c2;padding:10px 18px;margin:15px 0;color:#5e6670;font-style:italic}
.sanction{
    margin-top:22px;
    padding:16px 18px;
    border:2px solid #d84b4b;
    border-radius:10px;
    background:#fff2f2;
    color:#a52828;
}
.sanction-title{font-size:12px;font-weight:900;letter-spacing:.08em;margin-bottom:6px}
.actions{position:sticky;top:90px;height:max-content;display:flex;flex-direction:column;gap:10px}
.actions button{
    width:100%;
    padding:13px 15px;
    border-radius:10px;
    border:1px solid #2b3b53;
    background:#141c28;
    color:#dfe8f5;
    cursor:pointer;
    text-align:left;
    font-weight:700;
    font-size:14px;
    transition:.2s;
}
.actions button:hover{
    border-color:var(--blue);
    color:var(--blue-2);
    background:#1a2738;
    transform:translateY(-1px);
}
.progress{
    position:absolute;
    left:0;
    bottom:0;
    height:3px;
    width:0;
    background:linear-gradient(90deg,var(--blue),var(--cyan));
    box-shadow:0 0 12px rgba(74,158,255,.6);
}

/* ---------- Страница техработ ---------- */

body.maintenance{display:flex;align-items:center;justify-content:center;padding:24px}
.box{
    position:relative;
    z-index:1;
    width:min(620px,100%);
    text-align:center;
    padding:55px 35px;
    border:1px solid var(--line);
    border-radius:24px;
    background:linear-gradient(145deg,rgba(21,28,40,.95),rgba(13,18,27,.95));
    box-shadow:var(--shadow);
    animation:fade-up .5s ease both;
}
.box .icon{font-size:58px;margin-bottom:18px}
.box h1{margin:0 0 15px;font-size:34px}
.box p{margin:0;color:var(--muted);line-height:1.7;font-size:17px}
.box .small{margin-top:24px;font-size:13px;color:var(--muted-2)}

/* ---------- Подвал ---------- */

footer{
    position:relative;
    z-index:1;
    border-top:1px solid var(--line-soft);
    background:rgba(5,8,13,.6);
    color:var(--muted-2);
}
.footer-inner{
    max-width:1260px;
    margin:auto;
    padding:28px 22px;
    display:flex;
    justify-content:space-between;
    gap:15px;
    font-size:13px;
}

/* ---------- Анимации ---------- */

@keyframes fade-up{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
@keyframes float{0%,100%{transform:translate(0,0)}50%{transform:translate(-14px,12px)}}

@media (prefers-reduced-motion:reduce){
    *{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}
    html{scroll-behavior:auto}
}

/* ---------- Адаптивность ---------- */

@media(max-width:1000px){
    .layout{grid-template-columns:230px minmax(0,1fr)}
    .actions{display:none}
}

@media(max-width:850px){
    .cards,.news-grid{grid-template-columns:1fr}
    .grid{grid-template-columns:1fr}
}

@media(max-width:760px){
    .header-inner{flex-direction:column;align-items:flex-start;padding:13px 16px}
    nav{gap:4px}
    nav a{padding:8px 10px;font-size:13px}
    .container{padding:26px 15px 70px}
    .hero{padding:32px 22px;border-radius:18px}
    .hero-symbol{font-size:110px;right:6px}
    h1{font-size:34px}
    .layout{display:block;padding:24px 15px 70px}
    .sidebar{position:static;height:auto;margin-bottom:28px}
    .article{padding:22px}
    .article-content{font-size:17px}
    .footer-inner{display:block;gap:6px}
}

@media(max-width:480px){
    .buttons{flex-direction:column}
    .button{justify-content:center}
    .card,.news-card{padding:20px}
}

/* =========================================================
   ПАНЕЛЬ РЕДАКЦИИ (admin.html)
   ========================================================= */

.admin-login{
    position:fixed;
    inset:0;
    z-index:100;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px;
    background:
        radial-gradient(700px 420px at 50% -10%,rgba(74,158,255,.18),transparent 65%),
        #060910;
}
.admin-login[hidden]{display:none}
.login-box{
    width:min(430px,100%);
    padding:42px 34px;
    text-align:center;
    border:1px solid var(--line);
    border-radius:22px;
    background:linear-gradient(145deg,rgba(21,28,40,.97),rgba(13,18,27,.97));
    box-shadow:var(--shadow);
    animation:fade-up .45s ease both;
}
.login-icon{font-size:44px;margin-bottom:8px}
.login-box h1{font-size:26px;margin:0 0 8px}
.login-box .subtitle{margin:0 auto 22px;font-size:14px}
.login-box .search{text-align:center;margin-bottom:14px}
.login-box .button{width:100%;justify-content:center}
.login-error{min-height:20px;margin-top:12px;color:#ff8c8c;font-size:13px;font-weight:700}
.login-hint{margin-top:14px;color:var(--muted-2);font-size:12px}
.login-hint code{
    padding:1px 5px;
    border:1px solid var(--line);
    border-radius:5px;
    background:#0d131d;
}

.admin-wrap{
    position:relative;
    z-index:1;
    max-width:1500px;
    margin:auto;
    padding:30px 22px 90px;
}
.admin-topbar{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:18px;
    flex-wrap:wrap;
    margin-bottom:18px;
}
.admin-topbar h1{margin:12px 0 0;font-size:clamp(26px,4vw,38px)}
.admin-topbar-actions{display:flex;gap:10px;flex-wrap:wrap}

.admin-status{
    margin-bottom:16px;
    padding:11px 15px;
    border:1px solid var(--line);
    border-radius:12px;
    background:rgba(13,18,27,.7);
    color:var(--muted);
    font-size:13px;
}
.admin-status.error{
    color:#ff9b9b;
    border-color:rgba(255,98,98,.3);
    background:rgba(255,98,98,.07);
}

.admin-actions{
    display:flex;
    align-items:center;
    gap:9px;
    flex-wrap:wrap;
    margin-bottom:18px;
}
.admin-actions .spacer{flex:1}
.admin-actions .button{padding:10px 14px;font-size:14px}
.file-label{cursor:pointer}

.admin-layout{
    display:grid;
    grid-template-columns:360px minmax(0,1fr);
    gap:18px;
    align-items:start;
}
.admin-list-panel{
    position:sticky;
    top:84px;
    display:flex;
    flex-direction:column;
    gap:10px;
    max-height:calc(100vh - 110px);
}
.admin-list{
    display:flex;
    flex-direction:column;
    gap:7px;
    overflow:auto;
    padding-right:4px;
}
.admin-list-empty{
    padding:24px;
    text-align:center;
    color:var(--muted-2);
    border:1px dashed #26364d;
    border-radius:12px;
}
.admin-list-item{
    width:100%;
    padding:12px 14px;
    text-align:left;
    cursor:pointer;
    color:var(--text);
    border:1px solid var(--line);
    border-radius:12px;
    background:rgba(13,18,27,.7);
    transition:.18s ease;
}
.admin-list-item:hover{border-color:rgba(74,158,255,.45);background:rgba(74,158,255,.06)}
.admin-list-item.active{
    border-color:var(--blue);
    background:rgba(74,158,255,.1);
    box-shadow:0 10px 26px rgba(0,0,0,.25);
}
.ali-law{
    margin-bottom:4px;
    color:var(--blue-2);
    font-size:11px;
    font-weight:900;
    letter-spacing:.06em;
    text-transform:uppercase;
}
.ali-title{font-size:14px;font-weight:700;line-height:1.35}
.ali-chapter{margin-top:4px;color:var(--muted-2);font-size:12px}

.admin-editor{min-width:0}
.admin-empty{
    padding:60px 20px;
    text-align:center;
    color:var(--muted-2);
    border:1px dashed #26364d;
    border-radius:16px;
    background:rgba(12,18,28,.5);
}
.field{margin-bottom:14px}
.field label{
    display:block;
    margin-bottom:7px;
    color:var(--muted-2);
    font-size:12px;
    font-weight:800;
    letter-spacing:.04em;
    text-transform:uppercase;
}
.field-row{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.field-input{
    width:100%;
    padding:12px 14px;
    border:1px solid #26364d;
    border-radius:11px;
    background:rgba(13,20,31,.9);
    color:#fff;
    font-size:15px;
    font-family:inherit;
    outline:none;
    resize:vertical;
    transition:.2s ease;
}
.field-input:focus{border-color:rgba(74,158,255,.8);box-shadow:0 0 0 4px rgba(74,158,255,.1)}
select.field-input{
    padding-right:38px;
    cursor:pointer;
    -webkit-appearance:none;
    appearance:none;
    background-image:
        linear-gradient(45deg,transparent 50%,#7f8da3 50%),
        linear-gradient(135deg,#7f8da3 50%,transparent 50%);
    background-position:calc(100% - 18px) calc(50% - 2px),calc(100% - 13px) calc(50% - 2px);
    background-size:5px 5px,5px 5px;
    background-repeat:no-repeat;
}
select.field-input option{background:#0d131d;color:#fff}
.field-hint{margin-top:6px;color:var(--muted-2);font-size:12px}
.admin-preview{margin-top:4px}
.admin-preview .article-content{min-height:40px}

.toast{
    position:fixed;
    left:50%;
    bottom:26px;
    z-index:200;
    padding:12px 18px;
    border:1px solid rgba(74,158,255,.3);
    border-radius:12px;
    background:rgba(18,26,39,.96);
    color:#eaf3ff;
    font-size:14px;
    font-weight:700;
    box-shadow:var(--shadow);
    opacity:0;
    pointer-events:none;
    transform:translate(-50%,20px);
    transition:.25s ease;
}
.toast.show{opacity:1;transform:translate(-50%,0)}

@media(max-width:1000px){
    .admin-layout{grid-template-columns:1fr}
    .admin-list-panel{position:static;max-height:none}
}
@media(max-width:600px){
    .field-row{grid-template-columns:1fr}
}
