:root {
    --bg: #f5f6f8;
    --surface: #ffffff;
    --text: #14161a;
    --muted: #667085;
    --border: #e5e7eb;
    --primary: #0f5fa8;
    --accent: #c81e3a;
    --shadow: 0 10px 24px rgba(15, 23, 42, .07);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: "Cairo", Tahoma, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.8;
}
body.dark {
    --bg: #101418;
    --surface: #171d23;
    --text: #f4f7fb;
    --muted: #aab4c1;
    --border: #2a333d;
    --shadow: 0 10px 24px rgba(0, 0, 0, .3);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1180px, calc(100% - 28px)); margin-inline: auto; }
.narrow { width: min(860px, calc(100% - 28px)); }
.topbar { background: #111827; color: #eef2ff; font-size: 13px; }
.topbar-inner, .nav-scroll, .footer-grid { display: flex; align-items: center; gap: 18px; }
.topbar-inner { justify-content: space-between; min-height: 38px; }
.top-headline { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #f8fafc; font-weight: 700; }
.top-links { display: flex; gap: 14px; }
.site-header { background: rgba(255,255,255,.96); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--border), var(--shadow); position: sticky; top: 0; z-index: 50; }
body.dark .site-header { background: rgba(23,29,35,.94); }
.main-header { min-height: 74px; display: grid; grid-template-columns: minmax(260px, 1fr) minmax(300px, 520px) minmax(150px, 1fr); align-items: center; gap: 22px; }
.logo { display: flex; align-items: center; gap: 12px; font-size: 26px; font-weight: 800; color: var(--primary); min-width: 0; justify-self: start; }
.logo img { width: var(--logo-width, 46px); height: auto; max-height: 92px; object-fit: contain; }
.logo-img-dark { display: none; }
body.dark .logo-img-light.has-dark-logo { display: none; }
body.dark .logo-img-dark { display: block; }
.logo-only { gap: 0; }
.logo-mark { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 8px; background: var(--primary); color: #fff; font-size: 28px; line-height: 1; }
.logo-text, .logo-text strong, .logo small { display: block; }
.logo small { color: var(--muted); font-size: 12px; font-weight: 700; margin-top: -6px; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-form { display: flex; width: 100%; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--bg); justify-self: center; }
.search-form input { flex: 1; border: 0; padding: 11px 14px; background: transparent; color: var(--text); font-family: inherit; }
.search-form button, .card-form button, .button {
    border: 0; background: var(--primary); color: #fff; padding: 11px 18px; font-family: inherit; font-weight: 700; cursor: pointer; border-radius: 6px;
}
.search-form button { border-radius: 0; }
.theme-toggle, .menu-toggle { width: 42px; height: 42px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 8px; cursor: pointer; font-size: 20px; }
.header-actions { display: flex; align-items: center; gap: 8px; justify-self: end; }
.subscribe-link { height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; padding: 0 14px; background: var(--accent); color: #fff; font-weight: 800; }
.menu-toggle { display: none; }
.category-nav { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface); }
.nav-scroll { min-height: 46px; justify-content: center; gap: 0; overflow: visible; white-space: normal; }
.nav-scroll a { color: #4b5563; font-weight: 800; padding: 10px 13px; border-inline-start: 1px solid transparent; border-bottom: 3px solid transparent; font-size: 15px; line-height: 1.4; }
.nav-scroll a:hover { color: var(--primary); border-bottom-color: var(--primary); background: rgba(15, 95, 168, .04); }
.nav-scroll a:first-child { color: var(--primary); }
.site-main { padding: 24px 0 42px; }
.ad-slot { min-height: 92px; border: 1px dashed #b7c0ce; background: rgba(15, 95, 168, .05); color: var(--muted); display: grid; place-items: center; border-radius: 8px; margin: 0 0 22px; text-align: center; }
.ad-slot:empty { display: none; }
.hero-post { display: grid; grid-template-columns: 1.25fr .9fr; background: var(--surface); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); margin-bottom: 26px; }
.hero-image img { width: 100%; height: 100%; min-height: 360px; object-fit: cover; }
.hero-content { padding: clamp(22px, 4vw, 42px); display: flex; flex-direction: column; justify-content: center; }
.hero-content h1 { font-size: clamp(28px, 4vw, 46px); line-height: 1.35; margin: 10px 0; letter-spacing: 0; }
.hero-content p { color: var(--muted); font-size: 18px; }
.magazine-home { padding-top: 4px; }
.home-intro { display: flex; justify-content: space-between; gap: 18px; align-items: end; padding: 6px 0 18px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.home-intro span { display: inline-flex; color: var(--accent); font-size: 13px; font-weight: 900; margin-bottom: 4px; }
.home-intro h1 { margin: 0; font-size: clamp(27px, 3.6vw, 42px); line-height: 1.3; letter-spacing: 0; }
.home-intro p { margin: 7px 0 0; color: var(--muted); max-width: 760px; font-size: 16px; }
.home-intro a { flex: 0 0 auto; background: var(--primary); color: #fff; border-radius: 6px; padding: 9px 13px; font-weight: 800; }
.breaking-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: stretch;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px;
    margin-bottom: 14px;
    box-shadow: 0 3px 12px rgba(15, 23, 42, .04);
}
.breaking-row strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #fff;
    border-radius: 6px;
    padding: 0 10px;
    font-size: 12px;
    line-height: 1.4;
    white-space: nowrap;
}
.breaking-links {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border-radius: 6px;
    background: var(--bg);
}
.breaking-links::before,
.breaking-links::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 34px;
    z-index: 2;
    pointer-events: none;
}
.breaking-links::before { right: 0; background: linear-gradient(90deg, transparent, var(--bg)); }
.breaking-links::after { left: 0; background: linear-gradient(270deg, transparent, var(--bg)); }
.breaking-track {
    display: flex;
    align-items: center;
    gap: 22px;
    width: max-content;
    min-height: 30px;
    padding-inline: 12px;
    animation: breaking-scroll 32s linear infinite;
}
.breaking-links:hover .breaking-track { animation-play-state: paused; }
.breaking-track a {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    max-width: 360px;
    overflow: hidden;
    color: #1e3554;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.breaking-track a::before {
    content: "";
    width: 5px;
    height: 5px;
    margin-inline-end: 8px;
    border-radius: 50%;
    background: var(--primary);
}
.breaking-track a:hover { color: var(--primary); }
@keyframes breaking-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(50%); }
}
@media (prefers-reduced-motion: reduce) {
    .breaking-track { animation: none; flex-wrap: wrap; width: auto; }
}
/*
.breaking-links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
}
.breaking-links a {
    position: relative;
    display: -webkit-box;
    min-height: 46px;
    padding: 7px 14px 7px 10px;
    border-radius: 6px;
    background: var(--bg);
    color: #1e3554;
    font-weight: 800;
    line-height: 1.45;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.breaking-links a::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-inline-end: 8px;
    border-radius: 50%;
    background: var(--primary);
    vertical-align: middle;
}
.breaking-links a:hover { color: var(--primary); background: rgba(15, 95, 168, .07); }
*/
.news-hero { display: grid; grid-template-columns: 1.35fr .9fr; gap: 14px; margin-bottom: 20px; }
.lead-story, .mini-story, .feature-card, .clean-card { position: relative; overflow: hidden; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); }
.lead-story a, .mini-story a { display: block; height: 100%; color: #fff; }
.lead-story img, .mini-story img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.lead-story:hover img, .mini-story:hover img, .feature-card:hover img, .clean-card:hover img { transform: scale(1.03); }
.lead-story { min-height: 410px; }
.lead-story::after, .mini-story::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 25%, rgba(0,0,0,.78)); pointer-events: none; }
.story-overlay { position: absolute; inset-inline: 24px; bottom: 22px; z-index: 2; }
.story-overlay h1, .story-overlay h2 { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.25; margin: 8px 0; letter-spacing: 0; }
.story-overlay p { margin: 0; color: #e5e7eb; max-width: 720px; }
.story-overlay time { color: #d1d5db; }
.lead-story .badge, .mini-story .badge, .feature-card .badge, .clean-card .badge { position: absolute; z-index: 3; top: 12px; right: 12px; background: var(--accent); color: #fff; }
.hero-stack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mini-story { min-height: 198px; }
.mini-story h2 { position: absolute; z-index: 2; inset-inline: 14px; bottom: 12px; margin: 0; color: #fff; font-size: 18px; line-height: 1.4; letter-spacing: 0; }
.home-layout { display: grid; grid-template-columns: 292px minmax(0, 1fr); gap: 20px; align-items: start; }
.home-sidebar { display: grid; gap: 14px; position: sticky; top: 154px; }
.news-widget, .news-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 16px; box-shadow: 0 4px 16px rgba(15, 23, 42, .04); }
.news-widget h3 { margin: 0 0 12px; font-size: 18px; }
.social-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.social-grid a { border-radius: 6px; padding: 10px; background: var(--bg); color: var(--primary); font-weight: 800; text-align: center; }
.ranked-post { display: grid; grid-template-columns: 74px 1fr; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); font-weight: 800; line-height: 1.45; }
.ranked-post:last-child { border-bottom: 0; }
.ranked-post img { width: 74px; height: 56px; object-fit: cover; border-radius: 6px; }
.newsletter-widget p { color: var(--muted); margin-top: 0; }
.subscribe-form.light { grid-template-columns: 1fr; }
.subscribe-form.light input { background: var(--bg); color: var(--text); border-color: var(--border); }
.home-main { display: grid; gap: 20px; }
.panel-title { display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid var(--border); margin-bottom: 16px; gap: 12px; }
.panel-title h2 { margin: 0; padding-bottom: 8px; border-bottom: 2px solid var(--primary); font-size: 22px; letter-spacing: 0; }
.panel-title a { color: var(--primary); font-weight: 800; }
.headline-split { display: grid; grid-template-columns: 1.06fr .94fr; gap: 18px; align-items: start; }
.feature-card a, .clean-card a { display: block; }
.feature-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.feature-card h3 { font-size: 25px; line-height: 1.35; margin: 12px 12px 6px; letter-spacing: 0; }
.feature-card p, .clean-card p { color: var(--muted); margin: 0 12px 14px; }
.headline-list { display: grid; gap: 0; }
.headline-list a { display: grid; grid-template-columns: 86px 1fr; gap: 10px; align-items: center; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.headline-list a + a { padding-top: 10px; }
.headline-list img { width: 86px; height: 64px; object-fit: cover; border-radius: 6px; }
.headline-list span { font-weight: 800; line-height: 1.45; }
.headline-list time { grid-column: 2; margin-top: -8px; }
.category-news-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.clean-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.clean-card h3 { font-size: 20px; line-height: 1.45; margin: 12px 12px 6px; letter-spacing: 0; }
.category-panel.style-2 .panel-title h2 { border-color: #f59e0b; }
.category-panel.style-3 .panel-title h2 { border-color: #10b981; }
.category-panel.style-4 .panel-title h2 { border-color: #8b5cf6; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.section-title { display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid var(--border); margin: 6px 0 18px; }
.section-title h2 { margin: 0; padding-bottom: 9px; border-bottom: 2px solid var(--primary); font-size: 24px; }
.section-title a { color: var(--primary); font-weight: 700; }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.post-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 24px; }
.post-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; box-shadow: 0 4px 14px rgba(15, 23, 42, .04); }
.thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--border); }
.card-body { padding: 14px; }
.badge { display: inline-flex; background: rgba(200, 30, 58, .1); color: var(--accent); padding: 3px 9px; border-radius: 4px; font-size: 13px; font-weight: 800; }
.post-card h3 { font-size: 19px; line-height: 1.5; margin: 10px 0 8px; }
.post-card p { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
time, .article-meta { color: var(--muted); font-size: 14px; }
.card-tags, .article-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0; }
.card-tags span, .article-tags a { border: 1px solid var(--border); color: var(--muted); border-radius: 999px; padding: 3px 9px; font-size: 12px; font-weight: 700; }
.article-tags { margin: 26px 0; }
.article-tags a { font-size: 14px; color: var(--primary); }
.sidebar { position: sticky; top: 160px; }
.widget { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 16px; margin-bottom: 18px; }
.widget h3 { margin: 0 0 14px; font-size: 20px; }
.mini-post { display: grid; grid-template-columns: 84px 1fr; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); font-weight: 700; line-height: 1.5; }
.mini-post:last-child { border-bottom: 0; }
.mini-post img { width: 84px; height: 58px; object-fit: cover; border-radius: 6px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list a { border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; color: var(--muted); }
.page-heading { background: var(--surface); border-radius: 8px; padding: 24px; margin-bottom: 24px; border: 1px solid var(--border); }
.page-heading h1 { margin: 0 0 6px; }
.page-heading p { color: var(--muted); margin: 0; }
.article { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: clamp(18px, 3vw, 34px); box-shadow: var(--shadow); }
.breadcrumbs { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.article h1 { font-size: clamp(30px, 4vw, 46px); line-height: 1.35; margin: 0 0 12px; letter-spacing: 0; }
.article-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.article-image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; margin-bottom: 20px; }
.legal-note, .notice { border-radius: 8px; padding: 13px 15px; margin-bottom: 18px; font-weight: 700; }
.legal-note { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }
body.dark .legal-note { background: #352316; color: #fdba74; border-color: #7c2d12; }
.editorial-brief {
    margin: 0 0 24px;
    padding: 18px 20px;
    border: 1px solid #dbeafe;
    border-right: 4px solid var(--primary);
    border-radius: 8px;
    background: linear-gradient(180deg, #f8fbff, #fff);
}
.editorial-brief span {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 900;
}
.editorial-brief h2 {
    margin: 0 0 10px;
    font-size: 22px;
}
.editorial-brief p {
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.9;
}
.editorial-brief ul {
    margin: 0 0 12px;
    padding-inline-start: 22px;
}
.editorial-brief li {
    margin: 5px 0;
}
.editorial-brief .editorial-check {
    margin: 0;
    color: var(--text);
    font-weight: 800;
}
body.dark .editorial-brief {
    border-color: #1e3a5f;
    border-right-color: var(--primary);
    background: #101827;
}
.article-content { font-size: 18px; }
.article-content h2 { margin-top: 30px; font-size: 27px; }
.article-content h3 { margin-top: 24px; font-size: 22px; }
.article-content p { margin: 0 0 18px; }
.article-content a { color: var(--primary); font-weight: 700; }
.share-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0; }
.share-row a, .pagination a { border: 1px solid var(--border); background: var(--surface); padding: 8px 13px; border-radius: 6px; font-weight: 700; }
.pagination { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.pagination .active { background: var(--primary); color: #fff; border-color: var(--primary); }
.form-page { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 26px; }
.card-form { display: grid; gap: 14px; }
.card-form label { display: grid; gap: 6px; font-weight: 700; }
.card-form input, .card-form textarea, .admin-input {
    width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 11px 12px; font: inherit; background: var(--bg); color: var(--text);
}
.notice.success { background: #ecfdf5; color: #047857; }
.notice.error { background: #fef2f2; color: #b91c1c; }
.empty-state { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 28px; text-align: center; color: var(--muted); }
.empty-state.big { padding: 70px 24px; }
.site-footer { background: #111827; color: #d1d5db; margin-top: 20px; border-top: 4px solid var(--primary); }
.footer-grid { align-items: flex-start; justify-content: space-between; padding: 38px 0 28px; display: grid; grid-template-columns: 1.4fr .8fr .8fr 1fr; }
.footer-grid section { flex: 1; min-width: 220px; }
.footer-grid h3 { color: #fff; margin-top: 0; }
.footer-grid a { display: block; margin-bottom: 8px; }
.footer-brand { max-width: 360px; }
.footer-logo { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 24px; font-weight: 800; }
.footer-logo.logo-only { gap: 0; }
.footer-logo span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 8px; background: var(--primary); }
.footer-logo img { width: var(--logo-width, 46px); height: auto; max-height: 92px; object-fit: contain; }
.footer-note { color: #9ca3af; font-size: 14px; }
.footer-social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.footer-social a { display: inline-flex; align-items: center; justify-content: center; margin: 0; min-height: 34px; padding: 7px 10px; border: 1px solid rgba(255,255,255,.16); border-radius: 6px; color: #fff; font-size: 13px; font-weight: 800; }
.subscribe-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.subscribe-form input { min-width: 0; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; padding: 10px 12px; background: rgba(255,255,255,.08); color: #fff; font: inherit; }
.subscribe-form button { border: 0; border-radius: 8px; padding: 10px 14px; background: var(--primary); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; gap: 14px; padding: 14px 0; color: #9ca3af; font-size: 13px; }
.cookie-consent { position: fixed; right: 16px; bottom: 16px; max-width: 460px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); padding: 16px; z-index: 80; display: grid; gap: 12px; }
.cookie-consent[hidden] { display: none; }
.cookie-consent strong { display: block; margin-bottom: 6px; }
.cookie-consent p { margin: 0 0 8px; color: var(--muted); line-height: 1.7; }
.cookie-consent a { font-weight: 800; color: var(--primary); }
.cookie-actions { display: flex; gap: 8px; justify-content: flex-start; flex-wrap: wrap; }
.cookie-consent button { background: var(--primary); color: #fff; border: 0; border-radius: 6px; padding: 8px 14px; font-family: inherit; font-weight: 800; cursor: pointer; }
.cookie-consent button.secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }

.admin-body {
    --bg: #111216;
    --surface: #0b0c0f;
    --text: #c6cedd;
    --muted: #8f98ab;
    --border: #20232b;
    --primary: #9aa8ff;
    --accent: #d8ddf3;
    --shadow: 0 18px 48px rgba(0, 0, 0, .38);
    min-height: 100vh;
    background:
        radial-gradient(circle at top, rgba(154, 168, 255, .10), transparent 34rem),
        var(--bg);
    color: var(--text);
}
.admin-shell {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 84px clamp(18px, 4vw, 40px) 42px 28px;
    display: grid;
    grid-template-columns: 292px minmax(0, 1fr);
    gap: 40px;
    align-items: start;
    direction: ltr;
}
.admin-shell > :not(.admin-nav) { grid-column: 2; direction: rtl; }
.admin-shell.narrow {
    width: min(560px, calc(100% - 28px));
    min-height: 100vh;
    margin-inline: auto;
    padding: 24px 0;
    grid-template-columns: 1fr;
    display: grid;
    align-items: center;
}
.admin-body h1, .admin-body h2 { color: #eef2ff; letter-spacing: 0; }
.admin-body h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.3; margin: 0 0 18px; }
.admin-body a:not(.button) { color: var(--primary); text-decoration: underline; text-underline-offset: 4px; }
.admin-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    grid-column: 1;
    grid-row: 1 / span 30;
    height: 100vh;
    margin: -84px 0 -42px;
    padding: 18px 0;
    background: #121326;
    border-inline-end: 1px solid #25263d;
    overflow-y: auto;
    scrollbar-color: var(--primary) transparent;
    direction: ltr;
}
.admin-topbar {
    position: fixed;
    top: 0;
    left: 292px;
    right: 0;
    z-index: 18;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-inline: 40px;
    background: #121326;
    border-bottom: 1px solid #25263d;
    color: #fff;
}
.admin-topbar span { display: inline-flex; align-items: center; gap: 10px; color: #9aa6bd; font-weight: 800; }
.admin-topbar i { width: 10px; height: 10px; border-radius: 50%; background: #12e2a3; box-shadow: 0 0 16px rgba(18,226,163,.7); }
.admin-brand {
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 12px;
    align-items: center;
    padding: 0 24px 22px;
    border-bottom: 1px solid #25263d;
}
.admin-brand span {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, #23d6b4, #7c3aed);
    color: #fff;
    font-weight: 900;
}
.admin-brand strong { color: #fff; font-size: 19px; line-height: 1.2; }
.admin-brand small { grid-column: 2; color: var(--muted); margin-top: -14px; }
.admin-nav-group { padding: 18px 0 0; }
.admin-nav-group p {
    margin: 0 24px 8px;
    color: #68708a;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}
.admin-nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    background: #171921;
    border: 0;
    color: #a9c7e8;
    min-height: 52px;
    padding: 0 26px;
    border-radius: 0;
    font-weight: 800;
    text-decoration: none;
}
.admin-nav a:hover { background: #1a1c32; color: #eef2ff; }
.admin-nav .active { background: #191b34; color: #fff; border-color: transparent; }
.admin-nav .active::after {
    content: "";
    position: absolute;
    inset-inline-end: 0;
    top: 10px;
    bottom: 10px;
    width: 6px;
    border-radius: 999px;
    background: #8b3dff;
}
.nav-icon {
    width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    color: #a9c7e8;
    font-weight: 900;
    line-height: 1;
}
.admin-card, .admin-table, .admin-body .form-page {
    background: rgba(11, 12, 15, .96);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: clamp(18px, 3vw, 28px);
    margin-bottom: 18px;
    box-shadow: var(--shadow);
}
.admin-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 8px 0 28px;
}
.admin-page-head h1 { margin: 0 0 4px; font-size: clamp(28px, 3vw, 38px); }
.admin-page-head p { margin: 0; color: #9db8df; font-weight: 800; }
.primary-action {
    background: linear-gradient(135deg, #17d4b0, #7b43ec) !important;
    color: #fff !important;
    border: 0;
}
.button.ghost {
    background: #1f2148;
    color: #a9c7e8;
}
.button.compact {
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 14px;
}
.admin-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px auto;
    gap: 10px;
    margin-bottom: 24px;
}
.admin-body .form-page {
    text-align: center;
    padding: clamp(28px, 7vw, 54px) clamp(20px, 5vw, 44px);
}
.admin-body .form-page::before {
    content: "Info Migrante";
    display: block;
    color: var(--primary);
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
}
.admin-body .card-form { text-align: right; }
.admin-body .card-form input,
.admin-body .card-form textarea,
.admin-body .card-form select,
.admin-body .admin-input {
    background: #15171d;
    border-color: #303440;
    color: #eef2ff;
}
.admin-body .card-form input:focus,
.admin-body .card-form textarea:focus,
.admin-body .card-form select:focus,
.admin-body .admin-input:focus {
    border-color: var(--primary);
    outline: 2px solid rgba(154, 168, 255, .20);
}
.admin-body .card-form button,
.admin-body .button {
    background: #d8ddf3;
    color: #15171d;
    border-radius: 8px;
    font-weight: 900;
}
.admin-body .notice.error { background: #2a1218; color: #ffc5d0; border: 1px solid #6f2434; }
.admin-body .notice.success { background: #10251d; color: #a7f3d0; border: 1px solid #1f7a5b; }
.admin-body .section-title {
    margin-top: 0;
    border-color: #25263d;
}
.admin-body .section-title h1 { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { background: rgba(11, 12, 15, .96); border: 1px solid var(--border); border-radius: 8px; padding: 18px; box-shadow: var(--shadow); }
.stat strong { display: block; font-size: 34px; color: var(--primary); }
.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--border); padding: 10px; text-align: right; vertical-align: top; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-body th { color: #eef2ff; }
.admin-body td { color: var(--text); }
.modern-table { padding: 0; overflow: hidden; }
.modern-table table { border-collapse: separate; border-spacing: 0; }
.modern-table thead th {
    background: #202048;
    color: #9db8df;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: 13px;
    padding: 15px 20px;
}
.modern-table tbody td {
    padding: 15px 20px;
    background: rgba(17, 18, 35, .72);
    border-bottom-color: #242640;
    vertical-align: middle;
}
.modern-table tbody tr:hover td { background: rgba(30, 32, 67, .82); }
.post-admin-cell { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; align-items: center; }
.post-admin-cell img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; background: #20233a; }
.post-admin-cell strong { display: block; color: #fff; font-size: 16px; line-height: 1.35; }
.post-admin-cell small { display: block; color: #8eabd2; direction: ltr; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-admin-cell em { display: block; color: #6f7892; font-style: normal; font-size: 12px; margin-top: 2px; }
.admin-body small { color: var(--muted); }
.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 3px 10px;
    background: #191b34;
    color: #cdd5ff;
    border: 1px solid #2a2d48;
    font-weight: 800;
    font-size: 13px;
}
.status-pill.is-live { background: rgba(18, 226, 163, .13); color: #17e7a8; border-color: rgba(18, 226, 163, .18); }
.status-pill.is-draft { background: rgba(245, 158, 11, .12); color: #fbbf24; border-color: rgba(245, 158, 11, .18); }
.danger { background: #b91c1c !important; color: #fff !important; }
.admin-editor-form { display: block; }
.admin-editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
    align-items: start;
    direction: ltr;
}
.admin-editor-layout > * { direction: rtl; }
.admin-editor-form label { display: grid; gap: 8px; margin-bottom: 18px; color: #9db8df; font-weight: 900; }
.editor-main-card h2, .editor-side h2, .nested-editor-card h2 {
    margin: -28px -28px 22px;
    padding: 15px 28px;
    background: #202048;
    border-radius: 8px 8px 0 0;
    font-size: 17px;
}
.nested-editor-card {
    margin: 20px -12px 0;
    padding: 28px;
    border: 1px solid #20232b;
    border-radius: 8px;
    background: #111326;
}
.content-editor {
    min-height: 560px;
    line-height: 1.7;
    resize: vertical;
    font-family: "Cairo", Tahoma, Arial, sans-serif;
}
.editor-side {
    position: sticky;
    top: 76px;
    display: grid;
    gap: 18px;
}
.admin-preview-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #303440;
    margin-bottom: 14px;
}

/* Premium admin shell */
.admin-body {
    --admin-bg: #080918;
    --admin-panel: #111226;
    --admin-panel-2: #1d1e43;
    --admin-line: #262746;
    --admin-text: #ffffff;
    --admin-soft: #9fb6d8;
    --admin-green: #12e2a3;
    --admin-purple: #8a42ff;
    background: var(--admin-bg);
    color: var(--admin-text);
    font-family: Inter, "Cairo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}
.admin-shell {
    display: block;
    min-height: 100vh;
    padding: 92px 44px 56px 340px;
    direction: ltr;
}
.admin-shell > :not(.admin-nav) {
    direction: ltr;
    max-width: 1560px;
}
.admin-nav {
    position: fixed;
    inset: 0 auto 0 0;
    width: 300px;
    height: 100vh;
    margin: 0;
    padding: 0;
    background: #111226;
    border-right: 1px solid #272845;
    overflow-y: auto;
}
.admin-brand {
    height: 68px;
    padding: 0 24px;
    border-bottom: 1px solid #272845;
}
.admin-brand span {
    width: 40px;
    height: 40px;
    border-radius: 9px;
}
.admin-brand strong { font-size: 20px; }
.admin-brand small { display: none; }
.admin-nav-group { padding: 22px 14px 0; }
.admin-nav-group p { display: none; }
.admin-nav a {
    min-height: 50px;
    margin: 0 0 4px;
    padding: 0 16px;
    border-radius: 14px;
    background: transparent;
    color: #a9bfdc;
    font-size: 18px;
    font-weight: 700;
}
.admin-nav a:hover { background: rgba(31, 34, 72, .8); color: #fff; }
.admin-nav .active {
    background: rgba(18, 226, 163, .10);
    color: var(--admin-green);
}
.admin-nav .active::after {
    right: -14px;
    top: 0;
    bottom: 0;
    width: 6px;
    background: var(--admin-purple);
}
.nav-icon {
    color: inherit;
    width: 24px;
    font-size: 18px;
}
.admin-topbar {
    left: 300px;
    height: 68px;
    padding: 0 40px;
    background: #111226;
    border-bottom: 1px solid #272845;
}
.admin-topbar strong {
    color: #fff;
    font-size: 24px;
    font-weight: 900;
}
.admin-page-head {
    align-items: flex-end;
    margin: 4px 0 28px;
}
.admin-page-head h1 {
    color: #fff;
    font-size: 34px;
    font-weight: 900;
}
.admin-page-head p {
    color: #9fb6d8;
    font-size: 18px;
    font-weight: 600;
}
.admin-card,
.admin-table {
    background: #111226;
    border: 1px solid #242643;
    border-radius: 18px;
    box-shadow: none;
}
.admin-filters {
    grid-template-columns: minmax(0, 1fr) 1fr auto;
    gap: 12px;
}
.admin-body .admin-input {
    min-height: 50px;
    background: #121326;
    border: 1px solid #27294a;
    border-radius: 9px;
    color: #fff;
    font-size: 16px;
}
.admin-body .admin-input::placeholder { color: #9fb6d8; }
.admin-body .admin-input:focus {
    border-color: var(--admin-purple);
    outline: 2px solid rgba(138, 66, 255, .24);
}
.admin-body .button {
    min-height: 44px;
    border: 0;
    border-radius: 9px;
    background: #20224d;
    color: #a9c7e8;
    padding: 10px 16px;
}
.primary-action {
    min-height: 44px;
    padding-inline: 22px !important;
    background: linear-gradient(135deg, #18d5b2, #7546e8) !important;
    color: #fff !important;
}
.modern-table { border-radius: 18px; }
.modern-table thead th {
    background: #202048;
    color: #9fb6d8;
    padding: 16px 20px;
    text-align: left;
}
.modern-table tbody td {
    background: #111226;
    border-bottom: 1px solid #242643;
    padding: 17px 20px;
}
.post-admin-cell {
    grid-template-columns: 50px minmax(0, 1fr);
    text-align: left;
}
.post-admin-cell img { width: 50px; height: 50px; }
.post-admin-cell strong {
    color: #fff;
    font-size: 17px;
}
.post-admin-cell small {
    color: #8fb1dc;
    text-align: left;
}
.post-admin-cell em { color: #7684a2; }
.actions { justify-content: flex-start; }
.status-pill {
    border-radius: 999px;
    min-height: 30px;
    padding: 4px 12px;
}
.admin-editor-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    direction: ltr;
}
.admin-editor-layout > * { direction: ltr; }
.editor-main-card,
.editor-side .admin-card,
.nested-editor-card {
    background: #111226;
    border: 1px solid #242643;
    border-radius: 18px;
    overflow: hidden;
}
.editor-main-card h2,
.editor-side h2,
.nested-editor-card h2 {
    margin: -28px -28px 22px;
    padding: 16px 28px;
    background: #202048;
    color: #fff;
    font-size: 16px;
    border-radius: 0;
}
.admin-editor-form label {
    color: #8fa7c8;
    font-size: 13px;
    font-weight: 900;
}
.admin-editor-form label span { color: #ff6060; }
.content-editor {
    min-height: 760px;
    background: #070817 !important;
    color: #fff !important;
    font-size: 15px;
}
.nested-editor-card {
    margin: 20px 0 0;
    padding: 28px;
}
.editor-side {
    top: 88px;
    gap: 18px;
}
.admin-preview-img {
    max-width: 190px;
    border-radius: 10px;
}
.rtl-field {
    direction: rtl;
    text-align: right;
}
.rich-editor {
    border: 1px solid #27294a;
    border-radius: 10px;
    overflow: hidden;
    background: #070817;
    margin-bottom: 20px;
}
.editor-toolbar {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    background: #121326;
    border-bottom: 1px solid #27294a;
}
.editor-toolbar select,
.editor-toolbar button {
    min-width: 34px;
    height: 32px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #9fb6d8;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}
.editor-toolbar select {
    min-width: 130px;
    background: #0d0e20;
    padding-inline: 8px;
}
.editor-toolbar button:hover {
    background: #20224d;
    color: #fff;
}
.editor-toolbar button.is-active {
    background: #20224d;
    color: #12e2a3;
}
.editor-surface {
    min-height: 650px;
    padding: 22px;
    color: #fff;
    outline: 0;
    overflow: auto;
    line-height: 1.75;
    font-size: 16px;
}
.editor-surface h2,
.editor-surface h3 {
    color: #fff;
    margin: 18px 0 8px;
}
.editor-surface a { color: #1d9bf0; text-decoration: underline; }
.editor-surface.is-source {
    white-space: pre-wrap;
    direction: ltr;
    text-align: left;
    font-family: Consolas, monospace;
}
.tags-editor {
    border: 1px solid #27294a;
    border-radius: 10px;
    padding: 8px;
    background: #070817;
}
.tag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}
.tag-chips span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(18, 226, 163, .12);
    color: #17e7a8;
    font-weight: 900;
}
.tag-chips button {
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}
.tags-editor .admin-input {
    border-color: #1f2141;
    background: #121326;
}

@media (max-width: 980px) {
    .layout, .hero-post, .news-hero, .home-layout, .headline-split { grid-template-columns: 1fr; }
    .sidebar, .home-sidebar { position: static; }
    .post-grid, .post-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .main-header { grid-template-columns: 1fr auto; padding: 12px 0; }
    .search-form { grid-column: 1 / -1; grid-row: 2; width: 100%; }
    .header-actions { justify-self: end; }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nav-scroll { justify-content: flex-start; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
    .nav-scroll::-webkit-scrollbar { display: none; }
    .admin-shell {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 68px 14px 32px;
    }
    .admin-shell > :not(.admin-nav) { grid-column: 1; }
    .admin-topbar {
        left: 0;
        height: 50px;
        padding-inline: 16px;
    }
    .admin-nav {
        position: sticky;
        top: 0;
        grid-column: 1;
        grid-row: auto;
        height: auto;
        margin: 0 -14px 8px;
        padding: 10px 10px 12px;
        display: flex;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        border-inline-end: 0;
        border-bottom: 1px solid #25263d;
    }
    .admin-brand {
        flex: 0 0 auto;
        width: 190px;
        padding: 0 8px 0 0;
        border-bottom: 0;
    }
    .admin-nav-group {
        flex: 0 0 auto;
        display: flex;
        gap: 8px;
        padding: 0;
    }
    .admin-nav-group p { display: none; }
    .admin-nav a {
        min-height: 42px;
        padding: 0 12px;
        border-radius: 8px;
        white-space: nowrap;
    }
    .admin-nav .active::after {
        inset-inline: 12px;
        top: auto;
        bottom: 0;
        width: auto;
        height: 3px;
    }
    .admin-table { overflow-x: auto; }
    .admin-table table { min-width: 760px; }
    .admin-filters { grid-template-columns: 1fr; }
    .admin-editor-layout { grid-template-columns: 1fr; }
    .editor-side { position: static; }
}
@media (max-width: 640px) {
    .topbar { display: none; }
    .site-header { position: static; }
    .logo { font-size: 22px; }
    .logo small, .top-headline, .subscribe-link { display: none; }
    .menu-toggle { display: inline-block; }
    .category-nav { display: none; }
    .category-nav.open { display: block; }
    .nav-scroll { flex-direction: column; align-items: stretch; padding: 8px 0; white-space: normal; overflow: visible; }
    .nav-scroll a { padding: 10px 12px; border-bottom: 1px solid var(--border); }
    .home-intro { display: block; padding-bottom: 14px; }
    .home-intro a { margin-top: 12px; display: inline-flex; }
    .breaking-row { grid-template-columns: 1fr; align-items: stretch; }
    .breaking-row strong { min-height: 28px; }
    .breaking-links { overflow: hidden; }
    .breaking-track { min-height: 30px; animation-duration: 28s; }
    .post-grid, .post-grid.compact, .stats { grid-template-columns: 1fr; }
    .hero-stack, .category-news-grid { grid-template-columns: 1fr; }
    .lead-story { min-height: 360px; }
    .mini-story { min-height: 220px; }
    .story-overlay { inset-inline: 16px; bottom: 16px; }
    .subscribe-form { grid-template-columns: 1fr; }
    .hero-image img { min-height: 230px; }
    .article-content { font-size: 17px; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; }
    th:nth-child(3), td:nth-child(3) { display: none; }
    .admin-body th:nth-child(3), .admin-body td:nth-child(3) { display: table-cell; }
}
