/* NCPQ UI2 – Government VIP Theme (RTL, Dark) */
:root {
    --bg: #08111f;
    --bg-soft: #0b1629;
    --panel: rgba(11, 22, 41, 0.88);
    --panel-solid: #0f1b31;
    --panel2: #13233d;
    --border: rgba(196, 165, 92, 0.22);
    --border-strong: rgba(196, 165, 92, 0.42);
    --muted: #a7b4c8;
    --text: #eef4ff;
    --primary: #3b82f6;
    --primary-2: #1d4ed8;
    --gold: #c4a55c;
    --gold-soft: rgba(196, 165, 92, 0.14);
    --danger: #f87171;
    --warn: #fbbf24;
    --ok: #34d399;
    --shadow: 0 18px 45px rgba(0,0,0,.32);
    --shadow-soft: 0 8px 24px rgba(0,0,0,.18);
    --radius: 18px;
    --radius-sm: 12px;
    --gap: 12px;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

html {
    background:
      radial-gradient(circle at top right, rgba(59,130,246,.14), transparent 26%),
      radial-gradient(circle at top left, rgba(196,165,92,.08), transparent 22%),
      linear-gradient(180deg, #09111f 0%, #08111f 100%);
}

body {
    margin: 0;
    font-family: system-ui, Segoe UI, Tahoma, Arial;
    background: transparent;
    color: var(--text);
    direction: rtl;
    line-height: 1.55;
}

a {
    color: #bfdbfe;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px;
}

.card {
    background: linear-gradient(180deg, rgba(17,29,53,.96), rgba(11,22,41,.92));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.035), transparent 38%, rgba(196,165,92,.03));
    pointer-events: none;
}

.card.pad {
    padding: 16px;
}

.row {
    display: flex;
    gap: var(--gap);
    align-items: center;
    flex-wrap: wrap;
}

.col {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}

.spread {
    justify-content: space-between;
}

.muted {
    color: var(--muted);
}

.small {
    font-size: 12px;
}

.hr {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
    margin: 12px 0;
}

input, select, textarea {
    background: rgba(7, 14, 28, .82);
    color: var(--text);
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 14px;
    padding: 11px 13px;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

input:focus, select:focus, textarea:focus {
    border-color: rgba(196, 165, 92, .5);
    box-shadow: 0 0 0 3px rgba(59,130,246,.10), 0 0 0 1px rgba(196,165,92,.18) inset;
    background: rgba(10, 18, 34, .95);
}

.btn {
    border: 1px solid rgba(148, 163, 184, .18);
    background: linear-gradient(180deg, rgba(20, 35, 61, .92), rgba(10, 18, 34, .96));
    color: var(--text);
    border-radius: 14px;
    padding: 10px 14px;
    cursor: pointer;
    transition: transform .05s ease, border-color .18s ease, box-shadow .18s ease, filter .18s ease;
    box-shadow: var(--shadow-soft);
    font-weight: 700;
}

.btn:hover {
    border-color: var(--border-strong);
    filter: brightness(1.04);
}

.btn:active {
    transform: translateY(1px);
}

.btn.primary {
    border-color: rgba(59,130,246,.45);
    background: linear-gradient(180deg, rgba(37,99,235,.95), rgba(29,78,216,.95));
}

.btn.danger {
    border-color: rgba(248,113,113,.38);
    background: linear-gradient(180deg, rgba(127,29,29,.30), rgba(69,10,10,.24));
}

.btn.warn {
    border-color: rgba(251,191,36,.40);
    background: linear-gradient(180deg, rgba(120,53,15,.30), rgba(69,26,3,.24));
}

.btn.ghost {
    background: transparent;
}

table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 16px;
}

th, td {
    border-bottom: 1px solid rgba(148, 163, 184, .12);
    padding: 11px 10px;
    text-align: right;
    vertical-align: top;
}

th {
    color: #f8fbff;
    font-weight: 700;
    background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(196,165,92,.06));
}

tr:hover td {
    background: rgba(255,255,255,.025);
}

.kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(180px,1fr));
    gap: 12px;
}

.kpi {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(196,165,92,.18);
    background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(196,165,92,.04));
    box-shadow: var(--shadow-soft);
}

.kpi .v {
    font-size: 22px;
    font-weight: 800;
}

.kpi .k {
    font-size: 12px;
    color: var(--muted);
}

.lp-banner {
    position: sticky;
    top: 12px;
    z-index: 9999;
    margin: 12px auto;
    max-width: 1280px;
    padding: 12px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: rgba(59,130,246,.10);
    display: none;
    box-shadow: var(--shadow-soft);
}

.lp-banner.lp-show {
    display: block;
}

.lp-banner.lp-error {
    background: rgba(220,38,38,.12);
    border-color: rgba(220,38,38,.35);
}

.lp-banner.lp-warn {
    background: rgba(245,158,11,.12);
    border-color: rgba(245,158,11,.35);
}

.lp-banner.lp-info {
    background: rgba(59,130,246,.12);
    border-color: rgba(59,130,246,.35);
}

.lp-banner .lp-head {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    justify-content: space-between;
}

.lp-banner .lp-title {
    font-weight: 800;
}

.lp-banner .lp-details {
    margin-top: 6px;
    color: #d7e2f0;
    font-size: 13px;
    white-space: pre-wrap;
}

.lp-banner .lp-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.page-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.page-title .title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: .2px;
}

.page-title .subtitle {
    color: var(--muted);
    font-size: 13px;
}

.gov-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(196,165,92,.05));
    color: #f5f7fb;
    box-shadow: var(--shadow-soft);
}

.gov-chip::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(180deg, #e6d2a2, #c4a55c);
    box-shadow: 0 0 0 4px rgba(196,165,92,.12);
}

@media (max-width: 720px) {
    .wrap { padding: 12px; }
    .page-title .title { font-size: 20px; }
    .btn, input, select, textarea { width: 100%; }
}
