:root{
  --page-bg:#F4F6FB;
  --navy:#FFFFFF;
  --navy-2:#FFFFFF;
  --navy-3:#EEF1F8;
  --anthra:#FFFFFF;
  --line:#E3E8F1;
  --white:#0E1B33;
  --gray:#5B6472;
  --gray-dim:#93A0B4;
  --gold:#A9750E;
  --gold-dim:#D9B563;
  --red:#D92D20;
  --red-bg:rgba(217,45,32,.09);
  --orange:#B54708;
  --orange-bg:rgba(181,71,8,.09);
  --yellow:#8A6D00;
  --yellow-bg:rgba(138,109,0,.10);
  --green:#0F8A52;
  --green-bg:rgba(15,138,82,.09);
  --blue:#2455E0;
  --blue-dark:#1B3FB8;
  --blue-bg:rgba(36,85,224,.09);
  --neutral-bg:#EEF1F6;
  --radius:16px;
  --radius-lg:22px;
  --shadow:0 4px 10px rgba(16,24,40,.05),0 14px 32px rgba(16,24,40,.09);
  --shadow-sm:0 1px 2px rgba(16,24,40,.04),0 2px 8px rgba(16,24,40,.05);
  --hero-grad:linear-gradient(135deg,#EEF3FE 0%,#F7F4EC 100%);
}

*{box-sizing:border-box}

html,body{height:100%}

body{
  margin:0;
  font-family:"Segoe UI",-apple-system,BlinkMacSystemFont,Roboto,Helvetica,Arial,sans-serif;
  background:var(--page-bg);
  color:var(--white);
  font-size:14px;
  -webkit-font-smoothing:antialiased;
}

button,input,select{font-family:inherit}

.app-shell{
  display:grid;
  grid-template-columns:220px 1fr;
  min-height:100vh;
}

.sidebar{
  background:var(--anthra);
  border-right:1px solid var(--line);
  padding:18px 14px;
  display:flex;
  flex-direction:column;
  gap:22px;
}

.brand{padding:0 4px}

.brand .logo{
  display:flex;
  align-items:center;
  gap:7px;
  font-size:17px;
  font-weight:800;
}

.brand .logo .zero-blue{color:var(--blue)}

.brand .mark{
  width:26px;
  height:26px;
  border-radius:8px;
  background:linear-gradient(135deg,var(--blue) 0%,var(--blue-dark) 55%,var(--gold) 100%);
  box-shadow:0 2px 6px rgba(36,85,224,.28);
}

.brand .sub{
  font-size:11px;
  color:var(--gray);
  margin-top:3px;
}

nav.mainnav{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.navitem{
  display:flex;
  align-items:center;
  gap:10px;
  padding:9px 10px;
  border-radius:9px;
  color:var(--gray);
  font-size:13.5px;
  font-weight:600;
  text-decoration:none;
  border:1px solid transparent;
}

.navitem:hover{
  background:var(--navy-3);
  color:var(--white);
}

.navitem.active{
  background:var(--blue-bg);
  color:var(--blue);
  border-color:rgba(36,85,224,.16);
}

.navitem .dot{
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--gray-dim);
}

.navitem.active .dot{background:var(--blue)}

.sidebar-foot{
  margin-top:auto;
  font-size:10px;
  color:var(--gray-dim);
  line-height:1.5;
}

.topbar{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px 22px;
  border-bottom:1px solid var(--line);
  background:var(--navy-2);
  position:sticky;
  top:0;
  z-index:20;
  box-shadow:var(--shadow-sm);
}

.searchbox{
  display:flex;
  align-items:center;
  gap:8px;
  background:var(--navy-3);
  border:1px solid var(--line);
  border-radius:9px;
  padding:8px 12px;
  min-width:280px;
}

.searchbox input{
  background:transparent;
  border:none;
  outline:none;
  color:var(--white);
  width:100%;
  font-size:13px;
}

.spacer{flex:1}

.btn{
  border:1px solid var(--line);
  background:var(--navy);
  color:var(--white);
  padding:8px 14px;
  border-radius:9px;
  font-size:13px;
  font-weight:600;
}

.btn-gold{
  background:#C9962E;
  border-color:#C9962E;
  color:#1A1204;
}

.account-pill{
  display:flex;
  align-items:center;
  gap:9px;
  border:1px solid var(--line);
  background:var(--navy-3);
  border-radius:30px;
  padding:5px 12px 5px 6px;
}

.account-pill .avatar{
  width:28px;
  height:28px;
  border-radius:50%;
  background:linear-gradient(135deg,var(--blue),var(--blue-dark));
  color:#fff;
  font-size:11.5px;
  font-weight:800;
  display:flex;
  align-items:center;
  justify-content:center;
}

.account-pill.mgmt .avatar{
  background:linear-gradient(135deg,#C9962E,#9C7318);
}

.account-pill .who{
  display:flex;
  flex-direction:column;
  line-height:1.25;
}

.account-pill .nm{
  font-size:12px;
  font-weight:700;
}

.account-pill .rl{
  font-size:10px;
  color:var(--gray);
}

main{
  padding:22px 26px 60px;
  max-width:1500px;
}

.hero{
  position:relative;
  overflow:hidden;
  background:var(--hero-grad);
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  padding:26px 30px;
  margin-bottom:22px;
  display:grid;
  grid-template-columns:1.3fr .8fr .95fr;
  gap:18px;
  align-items:center;
  box-shadow:var(--shadow-sm);
}

.hero-text .eyebrow{
  font-size:11px;
  font-weight:800;
  letter-spacing:.5px;
  text-transform:uppercase;
  color:var(--blue);
  margin-bottom:6px;
  display:flex;
  align-items:center;
  gap:6px;
}

.gold-dot{
  width:5px;
  height:5px;
  border-radius:50%;
  background:var(--gold);
}

.hero-text h1{
  margin:0 0 8px;
  font-size:25px;
  font-weight:800;
  letter-spacing:-.4px;
}

.status-line-text{
  font-size:13px;
  color:var(--gray);
  max-width:480px;
  line-height:1.5;
  margin-bottom:14px;
}

.hero-hint{
  display:inline-flex;
  align-items:center;
  gap:8px;
  background:rgba(255,255,255,.7);
  border:1px solid var(--line);
  border-radius:10px;
  padding:8px 13px;
  font-size:12px;
  font-weight:600;
}

.hero-visual{
  height:150px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.hero-photo-slot{
  position:relative;
  height:150px;
  border-radius:var(--radius-lg);
  overflow:hidden;
  border:1px solid var(--line);
  box-shadow:var(--shadow-sm);
  background:
    radial-gradient(120% 140% at 25% 15%,rgba(36,85,224,.32),transparent 62%),
    radial-gradient(120% 140% at 85% 90%,rgba(201,150,46,.28),transparent 60%),
    linear-gradient(135deg,#DCE4F7 0%,#F3ECDC 100%);
  display:flex;
  align-items:center;
  justify-content:center;
}

.hero-photo-slot::after{
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(200deg,rgba(255,255,255,.10),rgba(14,27,51,.14));
  backdrop-filter:blur(6px);
}

.hps-txt{
  position:relative;
  z-index:1;
  font-size:10.5px;
  font-weight:700;
  line-height:1.5;
  text-align:center;
  color:rgba(14,27,51,.60);
}

@keyframes orbit-spin{
  from{transform:rotate(0deg)}
  to{transform:rotate(360deg)}
}

@keyframes orbit-spin-rev{
  from{transform:rotate(360deg)}
  to{transform:rotate(0deg)}
}

@keyframes pulse-dot{
  0%,100%{opacity:.55}
  50%{opacity:1}
}

.ring-a{
  transform-origin:100px 75px;
  animation:orbit-spin 34s linear infinite;
}

.ring-b{
  transform-origin:100px 75px;
  animation:orbit-spin-rev 46s linear infinite;
}

.pulse{animation:pulse-dot 3.4s ease-in-out infinite}
.pulse2{animation:pulse-dot 3.4s ease-in-out infinite .9s}
.pulse3{animation:pulse-dot 3.4s ease-in-out infinite 1.8s}

.section-title{
  font-size:13.5px;
  font-weight:700;
  margin:22px 0 10px;
}

.status-card-grid,
.kpi-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:12px;
  margin-bottom:24px;
}

.status-card,
.kpi-card{
  background:var(--navy-2);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:15px 16px;
  box-shadow:var(--shadow-sm);
}

.status-card{
  display:flex;
  gap:12px;
}

.ic-wrap{
  width:36px;
  height:36px;
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--neutral-bg);
}

.status-card .n,
.kpi-value{
  font-size:22px;
  font-weight:800;
}

.status-card .l,
.kpi-sub{
  font-size:11.5px;
  color:var(--gray);
  margin-top:4px;
}

.status-card.red .n{color:var(--red)}
.status-card.orange .n{color:var(--orange)}
.status-card.yellow .n{color:var(--yellow)}
.status-card.blue .n{color:var(--blue)}
.status-card.ok .n{color:var(--green)}

.kpi-label{
  font-size:10.5px;
  text-transform:uppercase;
  letter-spacing:.4px;
  font-weight:700;
  color:var(--gray-dim);
  margin-bottom:8px;
}

.rank-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
  margin-bottom:22px;
}

.rank-panel{
  background:var(--navy-2);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:16px 18px;
  box-shadow:var(--shadow-sm);
}

.rank-panel-title{
  font-size:13px;
  font-weight:800;
  margin-bottom:12px;
}

.rank-row{
  display:flex;
  align-items:center;
  gap:12px;
  padding:7px 8px;
  border-radius:8px;
}

.rank-row.me{
  background:var(--blue-bg);
  border:1px solid rgba(36,85,224,.18);
}

.rank-pos{
  width:22px;
  height:22px;
  border-radius:50%;
  background:var(--navy-3);
  color:var(--gray);
  font-size:11px;
  font-weight:800;
  display:flex;
  align-items:center;
  justify-content:center;
}

.rank-name{
  flex:1;
  font-size:12.5px;
  font-weight:700;
}

.rank-figures{text-align:right}

.rank-sum{
  font-size:13px;
  font-weight:800;
}

.rank-meta{
  font-size:10.5px;
  color:var(--gray);
}

.empty-state{
  padding:34px;
  text-align:center;
  color:var(--gray);
  font-size:13px;
  border:1px dashed var(--line);
  border-radius:var(--radius);
}

@media (max-width:1000px){
  .app-shell{grid-template-columns:1fr}
  .sidebar{
    position:sticky;
    top:0;
    flex-direction:row;
    align-items:center;
    z-index:30;
    overflow-x:auto;
  }
  .sidebar nav.mainnav{flex-direction:row}
  .sidebar-foot,.brand{display:none}
  .hero{grid-template-columns:1fr}
  .hero-visual,.hero-photo-slot{height:100px}
  .status-card-grid,.kpi-grid{grid-template-columns:repeat(2,1fr)}
  .rank-grid{grid-template-columns:1fr}
}

.logout-form{
  margin:0;
}

.logout-button{
  border:1px solid var(--line);
  background:var(--navy);
  color:var(--gray);
  padding:8px 11px;
  border-radius:9px;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
  transition:.15s ease;
}

.logout-button:hover{
  color:var(--red);
  border-color:rgba(217,45,32,.22);
  background:var(--red-bg);
}

.navitem-disabled{
  cursor:not-allowed;
  opacity:.55;
  user-select:none;
}

.navitem-disabled:hover{
  background:transparent;
  color:var(--gray);
}

.navitem-disabled .dot{
  background:var(--gray-dim);
}

.btn-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  cursor:pointer;
}


/* ZD DASHBOARD FRAME ALIGN V1 */
.zd-dashboard-ranking-section{
  display:flex;
  flex-direction:column;
  height:100%;
  min-height:0;
}

.zd-dashboard-ranking-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:18px;
  align-items:stretch;
  min-height:0;
}

.dashboard-ranking-card.zd-rank-card{
  display:flex;
  flex-direction:column;
  height:100%;
  min-height:0;
  box-sizing:border-box;
  border-radius:22px;
  overflow:hidden;
}

.dashboard-ranking-list{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
}

.dashboard-rail.zd-dashboard-workflow-rail{
  display:flex;
  align-self:stretch;
  min-height:0;
}

.dashboard-rail.zd-dashboard-workflow-rail > .zd-section{
  display:flex;
  flex-direction:column;
  flex:1 1 auto;
  height:100%;
  min-height:0;
}

.dashboard-workflows.zd-workflow-card{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  box-sizing:border-box;
  border-radius:22px;
}

.dashboard-ranking-card.zd-rank-card,
.dashboard-workflows.zd-workflow-card{
  margin-bottom:0;
}

@media (max-width: 1200px){
  .zd-dashboard-ranking-grid{
    grid-template-columns:1fr;
  }

  .dashboard-rail.zd-dashboard-workflow-rail{
    display:block;
    align-self:auto;
  }

  .dashboard-rail.zd-dashboard-workflow-rail > .zd-section,
  .zd-dashboard-ranking-section,
  .dashboard-ranking-card.zd-rank-card,
  .dashboard-workflows.zd-workflow-card{
    height:auto;
    min-height:unset;
  }
}
