/* Regulatory portal components (Phase 2). Builds on rrms-metronic-theme.css variables; light theme only, matching the portal. */
.viz-root{--series-unguja:#eda100;--series-pemba:#2a78d6;--series-magnitude:#c98500;--status-good:#0ca30c;--status-warning:#b45309;--status-critical:#d03b3b;--grid:#e1e0d9}

.reg-hero .dashboard-wordmark p{margin-bottom:4px}
.reg-sync-pill{display:inline-flex;align-items:center;gap:6px;font-weight:600}
.reg-sync-pill.ok{color:#166534}.reg-sync-pill.overdue{color:#991b1b}
/* The hero is dark: use light status tints so the sync time stays legible (icon + text carry the state). */
.reg-hero .reg-sync-pill.ok{color:#86efac}.reg-hero .reg-sync-pill.overdue{color:#fca5a5}

.reg-alert{display:flex;gap:12px;align-items:flex-start;margin:0 0 18px;padding:14px 16px;border:1px solid #f1c6c6;border-left:4px solid var(--kt-danger,#dc2626);border-radius:var(--kt-radius,10px);background:#fff5f5;color:#7f1d1d}
.reg-alert i{margin-top:3px}.reg-alert strong{display:block;margin-bottom:2px}

.reg-sector-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:18px}
.reg-sector{display:flex;flex-direction:column;gap:8px;padding:18px 20px;border:1px solid var(--kt-border,#e4e7ec);border-radius:var(--kt-radius,10px);background:#fff;color:inherit;text-decoration:none}
a.reg-sector:hover,a.reg-sector:focus{border-color:var(--kt-yellow,#f5b700);text-decoration:none;color:inherit}
.reg-sector header{display:flex;align-items:center;justify-content:space-between;gap:10px}
.reg-sector h3{margin:0;font-size:15px;font-weight:700}
.reg-sector .reg-sector-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:10px;background:var(--kt-yellow-soft,#fff6d1);color:#111}
.reg-sector .reg-sector-value{font-size:26px;font-weight:700;color:#111;line-height:1.1}
.reg-sector p{margin:0;color:var(--kt-muted,#6b7280);font-size:12px}
.reg-sector.is-awaiting{background:#fafafa;border-style:dashed}
.reg-sector.is-awaiting .reg-sector-value{font-size:15px;color:#52514e}

.reg-badge{display:inline-flex;align-items:center;gap:5px;padding:3px 9px;border-radius:999px;font-size:11px;font-weight:600;white-space:nowrap}
.reg-badge.live{background:#dcfce7;color:#166534}.reg-badge.awaiting{background:#f1f1f1;color:#3f3f46}
.reg-status{display:inline-flex;align-items:center;gap:5px;padding:3px 9px;border-radius:999px;font-size:11px;font-weight:600;white-space:nowrap}
.reg-status.active{background:#dcfce7;color:#166534}.reg-status.expired{background:#fef3c7;color:#854d0e}.reg-status.revoked{background:#fee2e2;color:#991b1b}.reg-status.suspended{background:#ffedd5;color:#9a3412}
.reg-flag{display:inline-flex;align-items:center;gap:4px;font-size:11px;color:#854d0e}

.reg-expiring{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:6px}
.reg-expiring div{padding:6px 0;text-align:left}.reg-expiring strong{display:block;font-size:20px;color:#111}.reg-expiring span{font-size:11px;color:var(--kt-muted,#6b7280)}

.reg-chart{position:relative;height:260px}
.reg-chart.tall{height:320px}
.reg-legend{display:flex;flex-wrap:wrap;gap:14px;margin:0 0 10px;padding:0;list-style:none;font-size:12px;color:#52514e}
.reg-legend li{display:inline-flex;align-items:center;gap:6px}.reg-legend i{display:inline-block;width:12px;height:12px;border-radius:3px}
.reg-table{width:100%;margin-top:14px;font-size:12px}
.reg-table th{color:#52514e;font-weight:600;border-bottom:1px solid var(--grid,#e1e0d9);padding:7px 8px;white-space:nowrap}
.reg-table td{border-bottom:1px solid #f0efea;padding:7px 8px}
.reg-table .num{text-align:right;font-variant-numeric:tabular-nums}
.reg-table tfoot td{font-weight:700;border-top:1px solid var(--grid,#e1e0d9)}

.reg-kv{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 22px;margin:0}
.reg-kv dt{font-size:11px;color:var(--kt-muted,#6b7280);font-weight:500}.reg-kv dd{margin:2px 0 0;font-weight:600;color:#111;word-break:break-word}

.reg-filter .form-control{margin-bottom:10px}
.reg-filter label{font-size:11px;font-weight:600;color:#52514e;margin-bottom:3px}
.reg-results-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px}
.reg-licence-list{margin:0;padding:0;list-style:none}
.reg-licence-list li{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;padding:3px 0}
.reg-licence-list li+li{border-top:1px dashed #ececec}
.reg-licence-list .reg-licence-no{font-weight:600;color:#111}
.reg-licence-list small{color:var(--kt-muted,#6b7280)}
.reg-pager{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin-top:14px}
.reg-pager .pagination{margin:0}
.reg-empty{padding:34px 10px;text-align:center;color:var(--kt-muted,#6b7280)}
.reg-empty i{font-size:26px;margin-bottom:8px;display:block}

.reg-awaiting{max-width:880px;margin:0 auto;padding:30px;border:1px dashed #c3c2b7;border-radius:var(--kt-radius,10px);background:#fff;text-align:center}
.reg-awaiting .reg-sector-icon{display:inline-grid;place-items:center;width:64px;height:64px;border-radius:16px;background:var(--kt-yellow-soft,#fff6d1);font-size:26px;margin-bottom:12px}
.reg-awaiting h2{margin:6px 0 10px;font-size:20px;font-weight:700}
.reg-awaiting p{color:#52514e;max-width:640px;margin:0 auto 14px}
.reg-awaiting ul{display:inline-block;text-align:left;margin:4px auto 14px;color:#3f3f46}
.reg-awaiting .reg-note{margin-top:16px;padding:12px 14px;border-radius:8px;background:#fafafa;color:#52514e;font-size:12px;text-align:left}

.reg-definitions{margin-top:6px;font-size:11px;color:var(--kt-muted,#6b7280)}

.reg-definition-panel{margin:18px 0 4px;padding:18px;border:1px solid var(--kt-border,#e4e7ec);border-radius:14px;background:linear-gradient(135deg,#fff 0%,#fffdf5 100%)}
.reg-definition-panel.electricity{background:linear-gradient(135deg,#fff 0%,#f8fbff 100%)}
.reg-definition-heading{display:flex;align-items:center;gap:12px;margin-bottom:14px}
.reg-definition-heading-icon{display:grid;place-items:center;flex:0 0 38px;height:38px;border-radius:11px;background:var(--kt-yellow-soft,#fff6d1);color:#8a6500;font-size:15px}
.electricity .reg-definition-heading-icon{background:#eaf2ff;color:#245ca6}
.reg-definition-heading h3{margin:0;color:#111;font-size:15px;font-weight:750}
.reg-definition-heading p{margin:3px 0 0;color:var(--kt-muted,#6b7280);font-size:11px}
.reg-definition-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(205px,1fr));gap:10px}
.reg-definition-card{display:flex;align-items:flex-start;gap:11px;min-width:0;padding:14px;border:1px solid #ece9dc;border-radius:11px;background:#fff;box-shadow:0 2px 8px rgba(17,24,39,.035)}
.reg-definition-icon{display:grid;place-items:center;flex:0 0 34px;height:34px;border-radius:9px;background:#f7f7f5;color:#5f5d55;font-size:13px}
.reg-definition-card.station .reg-definition-icon{background:#fff6d1;color:#8a6500}
.reg-definition-card.depot .reg-definition-icon{background:#fff2dc;color:#9a5800}
.reg-definition-card.operator .reg-definition-icon{background:#eaf2ff;color:#245ca6}
.reg-definition-card.status .reg-definition-icon{background:#f1edff;color:#6444a5}
.reg-definition-card.expiring .reg-definition-icon{background:#fff6d1;color:#8a6500}
.reg-definition-card.licence .reg-definition-icon{background:#e8f7f2;color:#087454}
.reg-definition-card.limitation .reg-definition-icon{background:#fff1f2;color:#b4233c}
.reg-definition-card h4{margin:1px 0 5px;color:#1f2937;font-size:12px;font-weight:750}
.reg-definition-card p{margin:0;color:var(--kt-muted,#6b7280);font-size:11px;line-height:1.55}
.reg-definition-card p strong{color:#3f3f46;font-weight:700}
.reg-definition-tag{display:inline-flex;margin-left:5px;padding:2px 6px;border-radius:999px;background:#f1edff;color:#6444a5;font-size:8px;font-weight:700;vertical-align:1px;white-space:nowrap}
.reg-status-priority{display:flex;flex-wrap:wrap;gap:5px;margin:9px 0 0;padding:0;list-style:none;counter-reset:status-priority}
.reg-status-priority li{counter-increment:status-priority;display:inline-flex;align-items:center;gap:4px;padding:3px 7px;border-radius:999px;background:#f5f3ff;color:#5b3b97;font-size:9px;font-weight:700}
.reg-status-priority li:before{content:counter(status-priority);display:grid;place-items:center;width:14px;height:14px;border-radius:50%;background:#6d4bac;color:#fff;font-size:8px}

@media(max-width:1050px){.reg-sector-grid{grid-template-columns:1fr}}
@media(max-width:767px){
  .reg-kv{grid-template-columns:1fr}
  .reg-chart{height:220px}.reg-chart.tall{height:300px}
  .reg-table{font-size:11px}
  .reg-hide-sm{display:none}
  .reg-pager{flex-direction:column;align-items:stretch}
  .reg-definition-panel{padding:14px}
  .reg-definition-grid{grid-template-columns:1fr}
}
@media print{.reg-filter,.reg-pager,.page-actions{display:none!important}}

/* Sector section heading (petroleum filling stations on the overview). */
.reg-section-title{display:flex;align-items:center;gap:10px;margin:26px 0 12px;font-size:18px;font-weight:800;color:#111}
.reg-section-title i{color:#8a6500}
