/* ═══════════════════════════════════════════════════════════
   ACC Dev Portal — Applied (ink/cyan, RTL)
═══════════════════════════════════════════════════════════ */

:root {
    --dev-ink: #0B1220;
    --dev-slate: #1E293B;
    --dev-muted: #64748B;
    --dev-line: #E2E8F0;
    --dev-paper: #F1F5F9;
    --dev-card: #FFFFFF;
    --dev-accent: #0E7490;
    --dev-accent-2: #0891B2;
    --dev-soft: #ECFEFF;
    --dev-ok: #047857;
    --dev-warn: #B45309;
    --dev-danger: #B91C1C;
    --dev-shadow: 0 14px 36px rgba(15, 23, 42, .08);
    --dev-font: 'Vazirmatn', 'DM Sans', system-ui, sans-serif;
    --dev-ui: 'DM Sans', 'Vazirmatn', system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
    margin: 0;
    min-height: 100%;
    font-family: var(--dev-font);
    background:
        radial-gradient(1200px 500px at 100% -10%, rgba(14, 116, 144, .18), transparent 55%),
        radial-gradient(900px 420px at 0% 0%, rgba(8, 145, 178, .12), transparent 50%),
        linear-gradient(180deg, #E8EEF5 0%, var(--dev-paper) 40%, #F8FAFC 100%);
    color: var(--dev-ink);
}

a { color: var(--dev-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.dev-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.dev-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 22px;
    background: linear-gradient(105deg, #0B1220 0%, #164E63 55%, #0E7490 100%);
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.08);
    flex-wrap: wrap;
}

.dev-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    min-width: 0;
}
.dev-brand:hover { text-decoration: none; }
.dev-brand__mark {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #22D3EE, #0E7490);
    display: grid; place-items: center;
    font-family: var(--dev-ui);
    font-weight: 800;
    color: #0B1220;
    box-shadow: 0 8px 20px rgba(34, 211, 238, .35);
}
.dev-brand__name {
    font-family: var(--dev-ui);
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -.02em;
}
.dev-brand__name em { font-style: normal; color: #67E8F9; }
.dev-brand__sub {
    font-size: .75rem;
    opacity: .78;
}

.dev-header__meta {
    margin-inline-start: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .85rem;
}

.dev-tabs {
    display: flex;
    gap: 6px;
    padding: 12px 18px 0;
    overflow-x: auto;
    border-bottom: 1px solid var(--dev-line);
    background: rgba(255,255,255,.55);
    backdrop-filter: blur(8px);
}
.dev-tab {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--dev-muted);
    padding: 10px 14px;
    border-radius: 10px 10px 0 0;
    font: inherit;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.dev-tab:hover { color: var(--dev-ink); background: rgba(14,116,144,.06); }
.dev-tab.is-active {
    color: var(--dev-accent);
    background: #fff;
    box-shadow: inset 0 -2px 0 var(--dev-accent);
}

.dev-main {
    flex: 1;
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: 22px 18px 48px;
}

.dev-panel {
    background: var(--dev-card);
    border: 1px solid var(--dev-line);
    border-radius: 16px;
    box-shadow: var(--dev-shadow);
    padding: 20px 22px;
}

.dev-panel h2 {
    margin: 0 0 6px;
    font-size: 1.25rem;
}
.dev-panel .dev-lead {
    margin: 0 0 18px;
    color: var(--dev-muted);
    font-size: .92rem;
    line-height: 1.7;
}

.dev-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
}

.dev-btn {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 9px 14px;
    font: inherit;
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    background: var(--dev-accent);
    color: #fff;
}
.dev-btn:hover { background: var(--dev-accent-2); }
.dev-btn:disabled { opacity: .55; cursor: wait; }
.dev-btn--ghost {
    background: #fff;
    color: var(--dev-slate);
    border-color: var(--dev-line);
}
.dev-btn--ghost:hover { border-color: var(--dev-accent); color: var(--dev-accent); background: var(--dev-soft); }
.dev-btn--danger { background: var(--dev-danger); }
.dev-btn--sm { padding: 6px 10px; font-size: .8rem; }

.dev-input, .dev-select {
    border: 1px solid var(--dev-line);
    border-radius: 10px;
    padding: 9px 12px;
    font: inherit;
    font-size: .9rem;
    background: #fff;
    color: var(--dev-ink);
    min-width: 180px;
}
.dev-input:focus, .dev-select:focus {
    outline: 2px solid rgba(14,116,144,.25);
    border-color: var(--dev-accent);
}

.dev-status {
    margin: 12px 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--dev-soft);
    color: var(--dev-slate);
    font-size: .88rem;
    border: 1px solid #A5F3FC;
}
.dev-status.is-error {
    background: #FEF2F2;
    border-color: #FECACA;
    color: var(--dev-danger);
}
.dev-status.is-ok {
    background: #ECFDF5;
    border-color: #A7F3D0;
    color: var(--dev-ok);
}

.dev-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 16px;
}
@media (max-width: 860px) {
    .dev-grid { grid-template-columns: 1fr; }
}

.dev-side {
    border: 1px solid var(--dev-line);
    border-radius: 12px;
    max-height: 70vh;
    overflow: auto;
    background: #F8FAFC;
}
.dev-side button {
    display: block;
    width: 100%;
    text-align: right;
    border: 0;
    border-bottom: 1px solid var(--dev-line);
    background: transparent;
    padding: 11px 12px;
    font: inherit;
    font-size: .84rem;
    cursor: pointer;
    color: var(--dev-slate);
}
.dev-side button:hover,
.dev-side button.is-active {
    background: var(--dev-soft);
    color: var(--dev-accent);
}

.dev-article {
    border: 1px solid var(--dev-line);
    border-radius: 12px;
    padding: 16px 18px;
    min-height: 320px;
    overflow: auto;
    max-height: 70vh;
    line-height: 1.75;
    font-size: .92rem;
}
.dev-article h1, .dev-article h2, .dev-article h3, .dev-article h4 {
    margin: 1.1em 0 .45em;
    line-height: 1.35;
}
.dev-article h2 { font-size: 1.15rem; color: var(--dev-accent); }
.dev-article p { margin: .55em 0; }
.dev-article ul, .dev-article ol { padding-inline-start: 1.3rem; }
.dev-code {
    direction: ltr;
    text-align: left;
    background: #0B1220;
    color: #A5F3FC;
    padding: 12px 14px;
    border-radius: 10px;
    overflow: auto;
    font-size: .78rem;
}
.dev-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .82rem;
    margin: 10px 0;
}
.dev-table th, .dev-table td {
    border: 1px solid var(--dev-line);
    padding: 8px 10px;
    text-align: right;
    vertical-align: top;
}
.dev-table th { background: #F8FAFC; }

.dev-table-list {
    width: 100%;
    border-collapse: collapse;
    font-size: .86rem;
}
.dev-table-list th, .dev-table-list td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--dev-line);
    text-align: right;
}
.dev-table-list th {
    color: var(--dev-muted);
    font-weight: 700;
    background: #F8FAFC;
}

.dev-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .88rem;
    color: var(--dev-slate);
}
.dev-toolbar--wrap {
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: center;
}
.dev-gis-list {
    max-height: 280px;
    overflow: auto;
    margin-top: 8px;
}
.dev-pill {
    display: inline-block;
    margin-inline-start: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    color: #9A3412;
    background: #FFEDD5;
}
.dev-muted { color: var(--dev-muted); font-weight: 600; font-size: .85rem; }

.dev-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.dev-card-stat {
    border: 1px solid var(--dev-line);
    border-radius: 12px;
    padding: 14px;
    background: linear-gradient(180deg, #fff, #F8FAFC);
}
.dev-card-stat__n {
    font-family: var(--dev-ui);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--dev-accent);
}
.dev-card-stat__l {
    color: var(--dev-muted);
    font-size: .8rem;
    margin-top: 4px;
}

/* Login */
.dev-login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}
.dev-login {
    width: min(420px, 100%);
    background: #fff;
    border: 1px solid var(--dev-line);
    border-radius: 18px;
    box-shadow: var(--dev-shadow);
    padding: 28px 24px;
}
.dev-login h1 {
    margin: 0 0 6px;
    font-size: 1.35rem;
}
.dev-login p {
    margin: 0 0 18px;
    color: var(--dev-muted);
    font-size: .9rem;
    line-height: 1.6;
}
.dev-login-hint {
    margin: -8px 0 18px !important;
    padding: 10px 12px;
    background: #F1F5F9;
    border: 1px dashed var(--dev-line);
    border-radius: 10px;
    color: var(--dev-slate) !important;
    font-size: .88rem !important;
}
.dev-login-hint code {
    font-weight: 700;
    color: var(--dev-ink);
}
.dev-login label {
    display: block;
    font-size: .82rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--dev-slate);
}
.dev-login .dev-input {
    width: 100%;
    margin-bottom: 12px;
}
.dev-login .dev-btn { width: 100%; margin-top: 6px; }

.dev-guide details {
    border: 1px solid var(--dev-line);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 10px;
    background: #F8FAFC;
}
.dev-guide summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--dev-slate);
}
.dev-guide details[open] summary { color: var(--dev-accent); margin-bottom: 8px; }
.dev-guide ul { margin: 6px 0; padding-inline-start: 1.2rem; color: var(--dev-slate); font-size: .9rem; }

/* DB catalog */
.dev-catalog {
    display: grid;
    grid-template-columns: minmax(280px, 42%) 1fr;
    gap: 14px;
    align-items: start;
}
@media (max-width: 960px) {
    .dev-catalog { grid-template-columns: 1fr; }
}
.dev-catalog__list,
.dev-catalog__detail {
    border: 1px solid var(--dev-line);
    border-radius: 12px;
    background: #F8FAFC;
    max-height: 72vh;
    overflow: auto;
    padding: 8px;
}
.dev-catalog__detail {
    background: #fff;
    padding: 12px 14px;
}
.dev-catalog__list .dev-table-list tr {
    cursor: pointer;
}
.dev-catalog__list .dev-table-list tr:hover,
.dev-catalog__list .dev-table-list tr.is-active {
    background: var(--dev-soft);
}
.dev-catalog__head h3 {
    margin: 0 0 4px;
    font-size: 1.05rem;
}
.dev-catalog__detail details {
    margin: 10px 0;
    border: 1px solid var(--dev-line);
    border-radius: 10px;
    padding: 8px 10px;
    background: #F8FAFC;
}
.dev-catalog__detail summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--dev-slate);
}
.dev-scroll {
    overflow: auto;
    max-width: 100%;
}
.dev-pill--mod {
    color: #155E75;
    background: #CFFAFE;
}
.dev-pill--inf {
    color: #92400E;
    background: #FEF3C7;
}
.dev-pill--crit {
    color: #9F1239;
    background: #FFE4E6;
}
.dev-cc-link {
    cursor: pointer;
    color: var(--dev-accent);
}
.dev-cc-link:hover {
    text-decoration: underline;
}
.dev-main {
    width: min(1400px, 100%);
}
