/* =============================================================================
   ASTRAAL SENTINEL(TM)  --  Governance, Risk & Compliance
   Brand system: Emerald Green / Aqua Blue / White / Silver-Grey accent
   ============================================================================= */

:root{
  --emerald:        #0B6E4F;
  --emerald-deep:    #084F39;
  --emerald-light:  #16A56E;
  --aqua:           #0EA5B7;
  --aqua-deep:      #0A7C8A;
  --aqua-light:     #5FD4DE;
  --silver:         #CBD3DA;
  --silver-deep:    #A6B0BA;
  --grey:           #8892A0;
  --grey-deep:      #5B6572;
  --white:          #FFFFFF;
  --bg:             #F4F7F8;
  --panel:          #FFFFFF;
  --text:           #1B2530;
  --text-muted:     #64707C;
  --border:         #E1E7EB;

  --good:   #0B8F5A;
  --good-bg:#E6F6EE;
  --bad:    #C0392B;
  --bad-bg: #FBEAE8;
  --warn:   #B7791F;
  --warn-bg:#FBF2E1;
  --info:   #0A7C8A;
  --info-bg:#E4F5F7;
  --neutral:#5B6572;
  --neutral-bg:#EEF1F3;

  --radius: 10px;
  --shadow: 0 1px 2px rgba(11,31,26,0.06), 0 4px 14px rgba(11,31,26,0.06);
  --sidebar-w: 258px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  background:var(--bg);
  color:var(--text);
  font-size:14.5px;
  line-height:1.5;
}
a{ color:var(--aqua-deep); text-decoration:none; }
a:hover{ color:var(--emerald); text-decoration:underline; }
h1,h2,h3,h4{ font-family:'Segoe UI',Roboto,sans-serif; color:var(--emerald-deep); margin:0 0 8px; }
code{ background:var(--neutral-bg); padding:1px 6px; border-radius:4px; font-size:12.5px; color:var(--emerald-deep); }

/* ---------------------------------------------------------------------------
   LOGIN SCREEN
--------------------------------------------------------------------------- */
.login-wrap{
  min-height:100vh;
  display:flex;
  background:linear-gradient(135deg, var(--emerald-deep) 0%, var(--emerald) 42%, var(--aqua) 100%);
}
.login-brand-pane{
  flex:1.1;
  display:flex; flex-direction:column; justify-content:center;
  padding:70px 60px;
  color:var(--white);
  position:relative;
  overflow:hidden;
}
.login-brand-pane::before{
  content:"";
  position:absolute; right:-120px; top:-120px; width:420px; height:420px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0) 70%);
}
.login-brand-pane::after{
  content:"";
  position:absolute; left:-160px; bottom:-160px; width:480px; height:480px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(95,212,222,0.18) 0%, rgba(255,255,255,0) 70%);
}
.brand-mark{ display:flex; align-items:center; gap:12px; margin-bottom:34px; position:relative; z-index:1; }
.brand-mark .shield{
  width:44px; height:44px; border-radius:11px;
  background:rgba(255,255,255,0.14); border:1px solid rgba(255,255,255,0.35);
  display:flex; align-items:center; justify-content:center;
  font-weight:800; font-size:19px; color:var(--white);
}
.brand-mark .word{ font-size:22px; font-weight:700; color:var(--white); letter-spacing:0.3px; }
.brand-mark .word small{ display:block; font-size:11px; font-weight:600; letter-spacing:1.6px; color:var(--aqua-light); text-transform:uppercase; }
.login-brand-pane h1{ color:var(--white); font-size:38px; line-height:1.18; max-width:520px; position:relative; z-index:1; }
.login-brand-pane p{ color:rgba(255,255,255,0.86); font-size:15.5px; max-width:480px; margin-top:14px; position:relative; z-index:1; }
.login-pillars{ margin-top:34px; display:grid; grid-template-columns:1fr 1fr; gap:12px; max-width:520px; position:relative; z-index:1; }
.login-pillars div{
  background:rgba(255,255,255,0.09); border:1px solid rgba(255,255,255,0.2);
  border-radius:8px; padding:10px 12px; font-size:12.5px; color:rgba(255,255,255,0.92);
}
.login-pillars div b{ display:block; font-size:11px; text-transform:uppercase; letter-spacing:0.8px; color:var(--aqua-light); margin-bottom:2px; }

.login-form-pane{
  width:460px; background:var(--white); display:flex; flex-direction:column; justify-content:center;
  padding:56px 52px; box-shadow:-18px 0 50px rgba(6,30,24,0.18);
}
.login-form-pane h2{ font-size:23px; margin-bottom:4px; }
.login-form-pane .sub{ color:var(--text-muted); font-size:13.5px; margin-bottom:26px; }
.form-group{ margin-bottom:18px; }
.form-group label{ display:block; font-size:12.5px; font-weight:600; color:var(--grey-deep); margin-bottom:6px; text-transform:uppercase; letter-spacing:0.4px; }
.form-control{
  width:100%; padding:11px 13px; border:1.5px solid var(--border); border-radius:8px;
  font-size:14.5px; color:var(--text); background:var(--white); transition:border-color .15s;
}
.form-control:focus{ outline:none; border-color:var(--aqua); box-shadow:0 0 0 3px rgba(14,165,183,0.14); }
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:11px 20px; border-radius:8px; font-size:14px; font-weight:600; cursor:pointer;
  border:1.5px solid transparent; transition:all .15s;
}
.btn-primary{ background:var(--emerald); color:var(--white); }
.btn-primary:hover{ background:var(--emerald-deep); text-decoration:none; }
.btn-aqua{ background:var(--aqua); color:var(--white); }
.btn-aqua:hover{ background:var(--aqua-deep); text-decoration:none; }
.btn-outline{ background:var(--white); color:var(--emerald-deep); border-color:var(--border); }
.btn-outline:hover{ border-color:var(--emerald); text-decoration:none; }
.btn-block{ width:100%; }
.btn-sm{ padding:6px 12px; font-size:12.5px; border-radius:6px; }
.btn-danger{ background:var(--bad); color:var(--white); }

.demo-accounts{ margin-top:26px; padding-top:20px; border-top:1px solid var(--border); }
.demo-accounts .title{ font-size:11.5px; text-transform:uppercase; letter-spacing:0.6px; color:var(--grey-deep); font-weight:700; margin-bottom:10px; }
.demo-accounts table{ width:100%; border-collapse:collapse; font-size:12px; }
.demo-accounts td{ padding:4px 4px; color:var(--text-muted); border-bottom:1px dashed var(--border); }
.demo-accounts td.role{ font-weight:600; color:var(--emerald-deep); }
.demo-accounts tr:hover td{ background:var(--neutral-bg); cursor:pointer; }

.login-error{ background:var(--bad-bg); color:var(--bad); border:1px solid #f3c9c3; padding:10px 13px; border-radius:8px; font-size:13px; margin-bottom:16px; }

/* ---------------------------------------------------------------------------
   APP SHELL
--------------------------------------------------------------------------- */
.app-shell{ display:flex; min-height:100vh; }

.sidebar{
  width:var(--sidebar-w); flex-shrink:0;
  background:linear-gradient(180deg, var(--emerald-deep) 0%, #0A5C43 60%, #0A6A66 100%);
  color:var(--white); display:flex; flex-direction:column;
  position:fixed; top:0; bottom:0; left:0; overflow-y:auto;
}
.sidebar .brand{ display:flex; align-items:center; gap:10px; padding:20px 18px 16px; border-bottom:1px solid rgba(255,255,255,0.12); }
.sidebar .brand .shield{ width:36px; height:36px; border-radius:9px; background:rgba(255,255,255,0.14); border:1px solid rgba(255,255,255,0.3); display:flex; align-items:center; justify-content:center; font-weight:800; font-size:15px; }
.sidebar .brand .word{ font-size:16.5px; font-weight:700; }
.sidebar .brand .word small{ display:block; font-size:9.5px; letter-spacing:1.2px; text-transform:uppercase; color:var(--aqua-light); font-weight:600; }

.nav-section{ padding:14px 12px 4px; font-size:10.5px; letter-spacing:1px; text-transform:uppercase; color:rgba(255,255,255,0.5); font-weight:700; }
.nav-link{
  display:flex; align-items:center; gap:10px; padding:9px 14px; margin:1px 10px; border-radius:7px;
  color:rgba(255,255,255,0.86); font-size:13.5px; font-weight:500; text-decoration:none;
}
.nav-link .ic{ width:18px; text-align:center; font-size:14px; opacity:0.9; }
.nav-link:hover{ background:rgba(255,255,255,0.1); color:var(--white); text-decoration:none; }
.nav-link.active{ background:rgba(255,255,255,0.16); color:var(--white); box-shadow:inset 3px 0 0 var(--aqua-light); }
.nav-badge{ margin-left:auto; background:var(--aqua); color:var(--white); font-size:10px; font-weight:700; padding:1px 7px; border-radius:20px; }
.nav-badge.warn{ background:#D98A21; }

.sidebar-footer{ margin-top:auto; padding:14px 18px; border-top:1px solid rgba(255,255,255,0.12); font-size:11px; color:rgba(255,255,255,0.55); }

.main{ margin-left:var(--sidebar-w); flex:1; display:flex; flex-direction:column; min-width:0; }

.topbar{
  height:62px; background:var(--white); border-bottom:1px solid var(--border);
  display:flex; align-items:center; justify-content:space-between; padding:0 26px;
  position:sticky; top:0; z-index:20;
}
.topbar .page-title{ font-size:17px; font-weight:700; color:var(--emerald-deep); }
.topbar .page-sub{ font-size:12px; color:var(--text-muted); margin-top:1px; }
.topbar-right{ display:flex; align-items:center; gap:16px; }
.env-pill{ font-size:10.5px; font-weight:700; letter-spacing:0.6px; padding:4px 10px; border-radius:20px; background:var(--info-bg); color:var(--info); text-transform:uppercase; }
.user-chip{ display:flex; align-items:center; gap:10px; padding:5px 10px 5px 5px; border-radius:30px; background:var(--neutral-bg); }
.avatar{ width:32px; height:32px; border-radius:50%; background:var(--emerald); color:var(--white); display:flex; align-items:center; justify-content:center; font-weight:700; font-size:12.5px; }
.user-chip .u-name{ font-size:12.5px; font-weight:600; color:var(--text); }
.user-chip .u-role{ font-size:10.5px; color:var(--text-muted); }

.content{ padding:24px 26px 50px; }

/* ---------------------------------------------------------------------------
   COMPONENTS
--------------------------------------------------------------------------- */
.grid{ display:grid; gap:18px; }
.grid-4{ grid-template-columns:repeat(4,1fr); }
.grid-3{ grid-template-columns:repeat(3,1fr); }
.grid-2{ grid-template-columns:repeat(2,1fr); }
@media (max-width:1180px){ .grid-4{grid-template-columns:repeat(2,1fr);} .grid-3{grid-template-columns:repeat(2,1fr);} }

.card{ background:var(--panel); border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow); padding:20px 22px; }
.card-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.card-head h3{ font-size:14.5px; margin:0; color:var(--emerald-deep); }
.card-head .link{ font-size:12px; font-weight:600; }

.kpi-card{ background:var(--panel); border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow); padding:18px 20px; position:relative; overflow:hidden; }
.kpi-card .kpi-label{ font-size:11.5px; text-transform:uppercase; letter-spacing:0.5px; color:var(--text-muted); font-weight:700; }
.kpi-card .kpi-value{ font-size:29px; font-weight:800; color:var(--emerald-deep); margin-top:6px; }
.kpi-card .kpi-delta{ font-size:12px; margin-top:6px; font-weight:600; }
.kpi-card .kpi-delta.up{ color:var(--good); }
.kpi-card .kpi-delta.down{ color:var(--bad); }
.kpi-card .kpi-bar{ position:absolute; left:0; top:0; bottom:0; width:5px; }
.kpi-card.emerald .kpi-bar{ background:var(--emerald); }
.kpi-card.aqua .kpi-bar{ background:var(--aqua); }
.kpi-card.amber .kpi-bar{ background:#C08A2E; }
.kpi-card.bad .kpi-bar{ background:var(--bad); }

.section-title{ display:flex; align-items:center; justify-content:space-between; margin:28px 0 14px; }
.section-title h2{ font-size:16px; margin:0; }
.section-title .desc{ font-size:12px; color:var(--text-muted); margin-top:2px; }

table.data-table{ width:100%; border-collapse:collapse; font-size:13px; }
table.data-table th{
  text-align:left; padding:10px 12px; background:var(--neutral-bg); color:var(--grey-deep);
  font-size:11px; text-transform:uppercase; letter-spacing:0.4px; font-weight:700; border-bottom:1px solid var(--border);
}
table.data-table td{ padding:11px 12px; border-bottom:1px solid var(--border); color:var(--text); vertical-align:middle; }
table.data-table tr:hover td{ background:#FAFCFC; }
table.data-table tr:last-child td{ border-bottom:none; }

.pill{ display:inline-block; padding:3px 10px; border-radius:20px; font-size:11px; font-weight:700; letter-spacing:0.2px; white-space:nowrap; }
.pill-good{ background:var(--good-bg); color:var(--good); }
.pill-bad{ background:var(--bad-bg); color:var(--bad); }
.pill-warn{ background:var(--warn-bg); color:var(--warn); }
.pill-info{ background:var(--info-bg); color:var(--info); }
.pill-neutral{ background:var(--neutral-bg); color:var(--neutral); }

.badge-emerald{ background:var(--good-bg); color:var(--emerald-deep); padding:2px 9px; border-radius:14px; font-size:11px; font-weight:700; }
.badge-aqua{ background:var(--info-bg); color:var(--aqua-deep); padding:2px 9px; border-radius:14px; font-size:11px; font-weight:700; }
.badge-amber{ background:var(--warn-bg); color:var(--warn); padding:2px 9px; border-radius:14px; font-size:11px; font-weight:700; }
.badge-slate{ background:var(--neutral-bg); color:var(--grey-deep); padding:2px 9px; border-radius:14px; font-size:11px; font-weight:700; }

.alert-box{ padding:14px 16px; border-radius:8px; font-size:13.5px; margin-bottom:18px; border:1px solid transparent; }
.alert-info{ background:var(--info-bg); color:var(--aqua-deep); border-color:#bfe6ea; }
.alert-danger{ background:var(--bad-bg); color:var(--bad); border-color:#f3c9c3; }
.alert-success{ background:var(--good-bg); color:var(--good); border-color:#bfe6d3; }
.alert-warn{ background:var(--warn-bg); color:var(--warn); border-color:#f0dbb0; }

.tag-row{ display:flex; gap:6px; flex-wrap:wrap; }

.progress{ background:var(--neutral-bg); border-radius:20px; height:8px; overflow:hidden; }
.progress > div{ height:100%; background:linear-gradient(90deg, var(--emerald), var(--aqua)); }

.tabs{ display:flex; gap:4px; border-bottom:1px solid var(--border); margin-bottom:18px; }
.tabs a{ padding:9px 16px; font-size:13px; font-weight:600; color:var(--text-muted); border-bottom:2px solid transparent; }
.tabs a.active{ color:var(--emerald-deep); border-bottom-color:var(--emerald); }
.tabs a:hover{ text-decoration:none; color:var(--emerald-deep); }

/* Risk heat map */
.heatmap{ display:grid; grid-template-columns:repeat(5,1fr); gap:4px; max-width:420px; }
.heatmap .cell{ aspect-ratio:1; border-radius:6px; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; color:#fff; }
.heatmap-wrap{ display:flex; gap:14px; align-items:flex-start; }
.heatmap-axis-y{ writing-mode:vertical-rl; transform:rotate(180deg); font-size:11px; color:var(--text-muted); font-weight:600; text-align:center; }

/* Workflow stepper */
.stepper{ display:flex; flex-direction:column; gap:0; }
.step{ display:flex; gap:14px; position:relative; padding-bottom:22px; }
.step:last-child{ padding-bottom:0; }
.step .dot{ width:26px; height:26px; border-radius:50%; background:var(--emerald); color:#fff; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; flex-shrink:0; z-index:1; }
.step.pending .dot{ background:var(--silver-deep); }
.step .line{ position:absolute; left:13px; top:26px; bottom:0; width:2px; background:var(--border); }
.step:last-child .line{ display:none; }
.step .body{ background:var(--panel); border:1px solid var(--border); border-radius:8px; padding:10px 14px; flex:1; }
.step .body .sh{ display:flex; justify-content:space-between; align-items:center; margin-bottom:3px; }
.step .body .sh b{ font-size:13px; color:var(--text); }
.step .body .meta{ font-size:11.5px; color:var(--text-muted); }
.step .body .cm{ font-size:12.5px; color:var(--text); margin-top:4px; }

.form-inline{ display:flex; gap:10px; align-items:flex-end; flex-wrap:wrap; }
.filter-bar{ display:flex; gap:10px; margin-bottom:16px; flex-wrap:wrap; align-items:center; }
select.form-control{ appearance:none; background:var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2364707C'/%3E%3C/svg%3E") no-repeat right 12px center; padding-right:30px; }

.empty-state{ text-align:center; padding:50px 20px; color:var(--text-muted); }
.empty-state .ic{ font-size:34px; margin-bottom:10px; opacity:0.5; }

.footer-strip{ text-align:center; padding:18px 0; font-size:11.5px; color:var(--grey); }

.two-col{ display:grid; grid-template-columns:1.5fr 1fr; gap:20px; }
@media (max-width:1180px){ .two-col{ grid-template-columns:1fr; } }

.avatar-sm{ width:26px; height:26px; border-radius:50%; background:var(--aqua); color:#fff; display:inline-flex; align-items:center; justify-content:center; font-size:10.5px; font-weight:700; margin-right:6px; vertical-align:middle; }

.divider{ height:1px; background:var(--border); margin:18px 0; }

.metric-row{ display:flex; justify-content:space-between; padding:8px 0; border-bottom:1px dashed var(--border); font-size:13px; }
.metric-row:last-child{ border-bottom:none; }
.metric-row .k{ color:var(--text-muted); }
.metric-row .v{ font-weight:700; color:var(--text); }

.evolve-banner{
  background:linear-gradient(120deg, var(--emerald-deep), var(--aqua-deep));
  color:#fff; border-radius:var(--radius); padding:16px 20px; margin-bottom:20px;
  display:flex; align-items:center; gap:14px; box-shadow:var(--shadow);
}
.evolve-banner .ic{ font-size:22px; }
.evolve-banner b{ display:block; font-size:13.5px; }
.evolve-banner span{ font-size:12px; color:rgba(255,255,255,0.85); }
