/* reklamsayti — əsas stil. --rs-primary / --rs-dark admin paneldən dəyişir. */
:root {
    --rs-primary: #1d4ed8;
    --rs-dark: #0b1f44;
    --rs-bg: #ffffff;
    --rs-surface: #f5f7fb;
    --rs-card: #ffffff;
    --rs-text: #0f172a;
    --rs-muted: #64748b;
    --rs-border: #e2e8f0;
    --rs-radius: 14px;
}
[data-theme="dark"] {
    --rs-bg: #0a1224;
    --rs-surface: #0e1730;
    --rs-card: #111c33;
    --rs-text: #e2e8f0;
    --rs-muted: #94a3b8;
    --rs-border: #1e2b47;
}
html, body { background: var(--rs-bg); color: var(--rs-text); }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--rs-primary); }
.text-secondary { color: var(--rs-muted) !important; }

/* Brend */
.rs-brand { font-weight: 700; color: var(--rs-dark); text-decoration: none; display: inline-flex; align-items: center; gap: .5rem; font-size: 1.15rem; }
[data-theme="dark"] .rs-brand { color: #fff; }
.rs-logo-mark { width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(135deg, var(--rs-primary), var(--rs-dark)); display: inline-block; }

/* Düymələr */
.btn-primary { background: var(--rs-primary); border-color: var(--rs-primary); }
.btn-primary:hover, .btn-primary:focus { background: var(--rs-dark); border-color: var(--rs-dark); }
.btn-outline-primary { color: var(--rs-primary); border-color: var(--rs-primary); }
.btn-outline-primary:hover { background: var(--rs-primary); border-color: var(--rs-primary); color: #fff; }
.text-primary { color: var(--rs-primary) !important; }
.text-bg-primary { background: var(--rs-primary) !important; }

/* Ümumi kart */
.rs-card { background: var(--rs-card); border: 1px solid var(--rs-border); border-radius: var(--rs-radius); }
.rs-muted-card { opacity: .7; }
.rs-kpi { border-left: 3px solid var(--rs-primary); }

/* İctimai */
.rs-header { background: color-mix(in srgb, var(--rs-bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rs-border); }
.rs-nav .nav-link { color: var(--rs-text); padding: .4rem .6rem; font-size: .95rem; }
.rs-nav .nav-link.active, .rs-nav .nav-link:hover { color: var(--rs-primary); }
.rs-hero { background: radial-gradient(1000px 400px at 85% -10%, color-mix(in srgb, var(--rs-primary) 18%, transparent), transparent), linear-gradient(180deg, var(--rs-surface), var(--rs-bg)); }
.rs-hero h1 { color: var(--rs-dark); }
[data-theme="dark"] .rs-hero h1 { color: #fff; }
.rs-band { background: var(--rs-surface); }
.rs-step { width: 34px; height: 34px; border-radius: 50%; background: var(--rs-primary); color: #fff; display: grid; place-items: center; font-weight: 700; }
.rs-timeline { counter-reset: s; list-style: none; padding: 0; }
.rs-timeline li { counter-increment: s; position: relative; padding: 0 0 1.2rem 3rem; }
.rs-timeline li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 50%; background: var(--rs-primary); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.rs-faq summary { cursor: pointer; }
.rs-footer { background: var(--rs-surface); border-top: 1px solid var(--rs-border); }
.rs-footer a { color: var(--rs-muted); text-decoration: none; }
.rs-footer a:hover { color: var(--rs-primary); }
.rs-footer h6 { font-weight: 700; }
.rs-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.rs-legal h2 { font-size: 1.25rem; margin-top: 1.5rem; }

@media (max-width: 991.98px) {
    .rs-collapse { display: none; width: 100%; }
    .rs-collapse.open { display: block; }
    .rs-nav { flex-direction: column; margin-bottom: .75rem; }
}

/* Autentifikasiya */
.rs-auth { background: var(--rs-surface); min-height: 100vh; }
.rs-choice { display: flex; gap: .6rem; align-items: center; padding: .7rem .9rem; border: 1px solid var(--rs-border); border-radius: 10px; margin-bottom: .5rem; cursor: pointer; }
.rs-choice.checked { border-color: var(--rs-primary); background: color-mix(in srgb, var(--rs-primary) 8%, transparent); }

/* Kabinet */
.rs-shell { display: flex; min-height: 100vh; }
.rs-sidebar { width: 250px; flex-shrink: 0; background: var(--rs-card); border-right: 1px solid var(--rs-border); }
.rs-side-head { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--rs-muted); padding: .9rem .75rem .3rem; }
.rs-side-link { display: flex; align-items: center; padding: .5rem .75rem; border-radius: 8px; color: var(--rs-text); text-decoration: none; font-size: .95rem; }
.rs-side-link:hover { background: var(--rs-surface); }
.rs-side-link.active { background: color-mix(in srgb, var(--rs-primary) 12%, transparent); color: var(--rs-primary); font-weight: 600; }
.rs-main { flex: 1; min-width: 0; background: var(--rs-surface); }
.rs-topbar { display: flex; align-items: center; gap: .75rem; padding: .85rem 1.25rem; background: var(--rs-card); border-bottom: 1px solid var(--rs-border); position: sticky; top: 0; z-index: 10; }
.rs-notif { color: var(--rs-text); }
.rs-notif.unread { background: color-mix(in srgb, var(--rs-primary) 6%, transparent); }
@media (max-width: 991.98px) {
    .rs-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; transform: translateX(-100%); transition: transform .2s; }
    .rs-sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.3); }
}

/* Mərhələ 3 */
.rs-thumb { width: 96px; height: 72px; object-fit: contain; background: var(--rs-surface); border: 1px solid var(--rs-border); border-radius: 6px; flex-shrink: 0; }
.rs-code { background: var(--rs-surface); border: 1px solid var(--rs-border); border-radius: 8px; padding: .75rem 1rem; white-space: pre-wrap; word-break: break-all; font-size: .85rem; }

/* ===== Kabinet / admin panel — sadə, bütün ekranlara uyğun ===== */
.rs-app { background: var(--rs-surface); }
.rs-ico { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rs-sidebar { width: 248px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; overscroll-behavior: contain; }
.rs-side-top { display: flex; align-items: center; gap: .5rem; padding: 1rem 1rem .75rem; border-bottom: 1px solid var(--rs-border); }
.rs-side-nav { padding: .5rem .6rem 1.5rem; }
.rs-side-head { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--rs-muted); padding: 1rem .7rem .35rem; list-style: none; }
.rs-side-group > summary { cursor: pointer; display: flex; align-items: center; }
.rs-side-group > summary::-webkit-details-marker { display: none; }
.rs-side-group > summary::after { content: '▸'; margin-left: auto; transition: transform .15s; font-size: .8rem; }
.rs-side-group[open] > summary::after { transform: rotate(90deg); }
.rs-side-link { gap: .7rem; padding: .55rem .7rem; margin: 1px 0; font-size: .93rem; min-height: 40px; }
.rs-side-link .rs-ico { color: var(--rs-muted); }
.rs-side-link.active .rs-ico { color: var(--rs-primary); }
.rs-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #dc2626; color: #fff; font-size: .72rem; font-weight: 700; display: inline-grid; place-items: center; }
.rs-topbar { padding: .6rem 1rem; gap: .5rem; min-height: 60px; }
.rs-title { font-size: 1.1rem; font-weight: 700; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: var(--rs-text); display: inline-grid; place-items: center; text-decoration: none; }
.rs-icon-btn:hover { background: var(--rs-surface); }
.rs-dot-badge { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: #dc2626; }
.rs-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--rs-primary); color: #fff; display: grid; place-items: center; font-size: .8rem; font-weight: 700; text-decoration: none; margin-left: .25rem; }
.rs-content { padding: 1.5rem; max-width: 1400px; }
.rs-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 29; }
.rs-lock { overflow: hidden; }
.rs-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.rs-content .table { margin-bottom: 0; }
.rs-content .table td, .rs-content .table th { vertical-align: middle; }

/* Panel blokları */
.rs-section-title { font-size: .95rem; font-weight: 700; margin: 0 0 .75rem; }
.rs-allclear { color: #15803d; font-weight: 600; }
.rs-todo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .75rem; }
.rs-todo { display: flex; align-items: center; gap: .75rem; padding: .9rem 1rem; border-radius: var(--rs-radius); background: var(--rs-card); border: 1px solid var(--rs-border); border-left: 4px solid #f59e0b; color: var(--rs-text); text-decoration: none; transition: transform .1s, box-shadow .1s; }
.rs-todo:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(15,23,42,.08); }
.rs-tone-info { border-left-color: var(--rs-primary); }
.rs-tone-bad { border-left-color: #dc2626; }
.rs-todo-n { font-size: 1.5rem; font-weight: 800; line-height: 1; }
.rs-todo-l { font-size: .88rem; line-height: 1.25; }
.rs-todo-go { margin-left: auto; font-size: 1.4rem; color: var(--rs-muted); }
.rs-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.rs-stat { padding: 1rem 1.1rem; }
.rs-stat-l { font-size: .8rem; color: var(--rs-muted); }
.rs-stat-v { font-size: 1.45rem; font-weight: 800; margin: .2rem 0; word-break: break-word; }
.rs-stat-h { font-size: .78rem; color: var(--rs-muted); }
.rs-chart { position: relative; height: 300px; }
.rs-quick { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.rs-quick a { padding: .6rem .75rem; border: 1px solid var(--rs-border); border-radius: 10px; text-decoration: none; color: var(--rs-text); font-size: .88rem; }
.rs-quick a:hover { border-color: var(--rs-primary); color: var(--rs-primary); }
.rs-list { list-style: none; padding: 0; margin: 0; }
.rs-list li { display: flex; justify-content: space-between; gap: .5rem; padding: .45rem 0; border-bottom: 1px solid var(--rs-border); font-size: .88rem; }
.rs-list li:last-child { border: 0; }
.rs-list a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rs-more summary { cursor: pointer; }
.rs-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem; }
.rs-dl dt { font-size: .78rem; color: var(--rs-muted); font-weight: 500; }
.rs-dl dd { margin: 0; font-weight: 700; }

/* Format seçimi və diaqnostika */
.rs-format-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem; }
.rs-format { display: block; padding: .75rem .9rem; border: 1px solid var(--rs-border); border-radius: 10px; cursor: pointer; background: var(--rs-card); }
.rs-format:has(input:checked) { border-color: var(--rs-primary); background: color-mix(in srgb, var(--rs-primary) 8%, transparent); }
.rs-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--rs-muted); margin-right: .4rem; }
.rs-dot.ok { background: #16a34a; }
.rs-dot.bad { background: #dc2626; }

/* Mobil alt menyu */
.rs-bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: flex; background: var(--rs-card); border-top: 1px solid var(--rs-border); padding-bottom: env(safe-area-inset-bottom); }
.rs-bottom a, .rs-bottom button { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .45rem .2rem; font-size: .68rem; color: var(--rs-muted); text-decoration: none; background: none; border: 0; min-width: 0; }
.rs-bottom span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-bottom .active { color: var(--rs-primary); font-weight: 600; }
.rs-bottom .rs-badge { position: absolute; top: 2px; left: 55%; margin: 0; height: 17px; min-width: 17px; font-size: .62rem; }

@media (max-width: 1199.98px) { .rs-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 991.98px) {
    .rs-sidebar { position: fixed; height: 100%; width: min(290px, 86vw); }
    .has-bottom .rs-content { padding-bottom: 5.5rem; }
    .rs-content { padding: 1rem; }
}
@media (max-width: 575.98px) {
    .rs-content { padding: .75rem .75rem 5.5rem; }
    .rs-topbar { padding: .5rem .6rem; }
    .rs-stat-v { font-size: 1.2rem; }
    .rs-chart { height: 220px; }
    .rs-todo-grid { grid-template-columns: 1fr; }
    .rs-card.p-4 { padding: 1rem !important; }
    .rs-content .btn { min-height: 38px; }
    .rs-content .text-nowrap { white-space: normal !important; }
    .rs-content .d-flex.gap-2 { flex-wrap: wrap; }
    .rs-content form.d-inline { display: inline-block !important; margin: 2px 0; }
    .rs-content .table { font-size: .82rem; }
    .rs-content input, .rs-content select, .rs-content textarea { font-size: 16px; } /* iOS zoom olmasın */
}
