/* Regula by Saqrions - one stylesheet, works left-to-right and right-to-left (logical properties). */
:root {
  --ink: #142033; --ink-2: #4a5568; --ink-3: #718096; --line: #e2e8f0; --bg: #f5f7fa; --card: #fff;
  --brand: #0b4f6c; --brand-2: #127ea6; --brand-soft: #e6f2f7;
  --green: #1f7a4d; --green-bg: #e3f4ea; --amber: #9a5b00; --amber-bg: #fff2d9; --red: #b42318; --red-bg: #fde8e7;
  --blue: #1d4ed8; --blue-bg: #e7eefc; --teal: #0f766e; --teal-bg: #dff4f1; --grey: #4a5568; --grey-bg: #edf0f4;
  --radius: 10px; --side: 232px;
  font-family: "Segoe UI", system-ui, -apple-system, "Noto Sans", "Noto Sans Arabic", Tahoma, Arial, sans-serif;
  color: var(--ink); font-size: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); line-height: 1.45; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 0 0 8px; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }

/* Layout */
.shell { display: flex; min-height: 100vh; }
.side { width: var(--side); background: #0b2a3c; color: #cfe3ee; flex-shrink: 0; display: flex; flex-direction: column;
        position: sticky; top: 0; height: 100vh; }
.brand { padding: 20px 20px 16px; display: flex; gap: 10px; align-items: center; color: #fff; }
.brand b { font-size: 18px; letter-spacing: .3px; display: block; }
.brand span { font-size: 11px; color: #8fb3c7; }
.mark { width: 34px; height: 34px; border-radius: 8px; background: linear-gradient(135deg, #1aa0c8, #0b4f6c);
        display: grid; place-items: center; font-weight: 700; color: #fff; font-size: 17px; }
.nav { padding: 8px 10px; flex: 1; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: #cfe3ee;
         margin-bottom: 2px; }
.nav a:hover { background: rgba(255,255,255,.07); text-decoration: none; }
.nav a.on { background: rgba(26,160,200,.22); color: #fff; font-weight: 600; }
.nav .sec { font-size: 10.5px; text-transform: uppercase; letter-spacing: .8px; color: #6f95ab; padding: 14px 12px 6px; }
.nav svg { width: 17px; height: 17px; flex-shrink: 0; opacity: .85; }
.side-foot { padding: 14px 20px; font-size: 11px; color: #6f95ab; border-top: 1px solid rgba(255,255,255,.08); }
.main { flex: 1; min-width: 0; }
.top { height: 58px; background: var(--card); border-bottom: 1px solid var(--line); display: flex; align-items: center;
       justify-content: space-between; padding: 0 28px; position: sticky; top: 0; z-index: 5; }
.top .who { display: flex; align-items: center; gap: 14px; font-size: 13px; }
.chip { background: var(--brand-soft); color: var(--brand); border-radius: 999px; padding: 3px 10px; font-size: 12px;
        font-weight: 600; }
.lang button { background: none; border: 1px solid var(--line); border-radius: 6px; padding: 4px 9px; cursor: pointer;
               font: inherit; font-size: 12px; color: var(--ink-2); }
.content { padding: 24px 28px 48px; max-width: 1320px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px;
             flex-wrap: wrap; }
.page-head .sub { color: var(--ink-3); margin-top: 4px; }
.crumb { font-size: 12px; color: var(--ink-3); margin-bottom: 4px; }

/* Cards & grid */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.card + .card { margin-top: 16px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: 2fr 1fr; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
       display: block; color: inherit; }
.kpi:hover { text-decoration: none; border-color: var(--brand-2); }
.kpi .n { font-size: 26px; font-weight: 700; }
.kpi .l { color: var(--ink-3); font-size: 12.5px; }
.kpi.alert .n { color: var(--red); }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, 1fr); } .g2, .g3 { grid-template-columns: 1fr; } }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th { text-align: start; font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-3);
     font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcfe; }
.table-card { padding: 4px 6px; }
.empty { padding: 22px; text-align: center; color: var(--ink-3); }
.num { text-align: end; }
dl.facts { display: grid; grid-template-columns: 170px 1fr; gap: 8px 14px; margin: 0; }
dl.facts dt { color: var(--ink-3); }
dl.facts dd { margin: 0; white-space: pre-line; }

/* Badges */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
         white-space: nowrap; }
.badge-grey { background: var(--grey-bg); color: var(--grey); }
.badge-blue { background: var(--blue-bg); color: var(--blue); }
.badge-teal { background: var(--teal-bg); color: var(--teal); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-green { background: var(--green-bg); color: var(--green); }

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card);
       color: var(--ink); padding: 8px 14px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer;
       font-size: 13px; }
.btn:hover { text-decoration: none; border-color: var(--ink-3); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: #093f57; }
.btn.good { background: var(--green); border-color: var(--green); color: #fff; }
.btn.danger { color: var(--red); border-color: #f3c3bf; }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 12.5px; margin-bottom: 5px; }
.field .help { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
.field .err { color: var(--red); font-size: 12px; margin-top: 4px; }
.input { width: 100%; padding: 8px 10px; border: 1px solid #cbd5e0; border-radius: 7px; font: inherit; background: #fff; }
.input:focus { outline: 2px solid #9fd3e6; border-color: var(--brand-2); }
textarea.input { resize: vertical; }
.check { margin-inline-end: 6px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid .wide { grid-column: 1 / -1; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.filters .input { width: auto; min-width: 160px; padding: 6px 9px; }
.tabs { display: flex; gap: 4px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs a { padding: 6px 12px; border-radius: 999px; color: var(--ink-2); border: 1px solid var(--line); background: #fff;
          font-size: 12.5px; }
.tabs a.on { background: var(--brand); border-color: var(--brand); color: #fff; }
details.step { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-top: 10px; }
details.step summary { cursor: pointer; font-weight: 600; }
details.step[open] summary { margin-bottom: 10px; }

/* Messages */
.msg { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; }
.msg.success { background: var(--green-bg); color: var(--green); }
.msg.error { background: var(--red-bg); color: var(--red); }
.msg.warning, .msg.info { background: var(--amber-bg); color: var(--amber); }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding-inline-start: 20px; padding-bottom: 14px; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 4px; top: 6px; width: 8px; height: 8px;
                       border-radius: 50%; background: var(--brand-2); }
.timeline li::after { content: ""; position: absolute; inset-inline-start: 7.5px; top: 16px; bottom: 0; width: 1px;
                      background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline .what { font-weight: 600; }
.timeline .note { background: var(--bg); border-radius: 6px; padding: 6px 9px; margin-top: 4px; white-space: pre-line; }

/* Bars */
.bar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.bar .lbl { width: 190px; font-size: 12.5px; }
.bar .track { flex: 1; background: var(--bg); border-radius: 4px; height: 12px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--brand-2); border-radius: 4px; }
.bar .v { width: 28px; text-align: end; font-weight: 600; }

/* Login */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: linear-gradient(150deg, #0b2a3c 0%, #0b4f6c 60%, #127ea6 100%); color: #fff; padding: 56px;
             display: flex; flex-direction: column; justify-content: space-between; }
.login-art h1 { font-size: 34px; line-height: 1.2; max-width: 460px; }
.login-art p { color: #bfe0ee; max-width: 440px; }
.login-form { display: grid; place-items: center; padding: 32px; }
.login-form .card { width: 100%; max-width: 380px; padding: 30px; }
@media (max-width: 860px) { .login-wrap { grid-template-columns: 1fr; } .login-art { display: none; } }

/* Certificate */
.cert { background: #fff; max-width: 820px; margin: 24px auto; padding: 48px 56px; border: 1px solid var(--line);
        border-top: 8px solid var(--brand); }
.cert h1 { font-size: 26px; color: var(--brand); }
.cert .ar { font-family: "Noto Naskh Arabic", "Segoe UI", Tahoma, serif; direction: rtl; }
@media print {
  .side, .top, .no-print { display: none !important; }
  body { background: #fff; }
  .cert { border: 0; margin: 0; }
}

/* Right-to-left tweaks */
[dir="rtl"] th, [dir="rtl"] td { text-align: right; }
[dir="rtl"] .num { text-align: left; }

/* 0.3 */
.nav-badge { margin-inline-start: auto; background: #1aa0c8; color: #fff; border-radius: 999px; font-size: 11px;
             padding: 1px 7px; font-weight: 700; }
.nav-badge.red { background: #d92d20; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.em-card { border-inline-start: 5px solid var(--red); }
.em-card.contained { border-inline-start-color: var(--amber); }
.big-clock { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.notice { background: #fff; max-width: 820px; margin: 24px auto; padding: 48px 56px; border: 1px solid var(--line);
          border-top: 8px solid var(--red); }
.notice h1 { font-size: 24px; color: var(--red); }
