:root{
  --brand-blue:#0B5FA5;
  --brand-blue-2:#094E89;
  --brand-red:#E31B23;
  --bg:#F5F7FB;
  --card:#FFFFFF;
  --text:#0E1726;
  --muted:#5B6B7F;
  --border:rgba(15, 23, 42, .10);
  --shadow:0 12px 30px rgba(15, 23, 42, .08);
  --radius:16px;
}

html, body{
  background: var(--bg) !important;
  color: var(--text);
}

*{ box-sizing:border-box; }

.app-shell{
  min-height: 100vh;
}

.topbar{
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-blue-2));
  color: #fff;
  border-bottom: 4px solid var(--brand-red);
  padding: 14px 18px;
}

.topbar .title{
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .2px;
  margin:0;
  line-height: 1.15;
}

.topbar .subtitle{
  margin-top: 2px;
  font-size: 12px;
  opacity: .9;
}

.shell{
  display:flex;
  gap: 16px;
  padding: 16px;
}

.sidebar{
  width: 340px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  position: sticky;
  top: 16px;
  height: fit-content;
}

.side-section-title{
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin: 10px 0 8px;
}

.content{
  flex:1;
  min-width: 0;
}

.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-pad{ padding: 14px; }

.kpi{
  display:flex;
  flex-direction: column;
  gap: 4px;
}

.kpi .label{
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.kpi .value{
  font-size: 22px;
  font-weight: 900;
}

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

.badge-red{
  display:inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(227, 27, 35, .12);
  color: var(--brand-red);
  font-weight: 800;
  font-size: 12px;
}

.section-title{
  font-size: 14px;
  font-weight: 900;
  margin: 0 0 10px;
}

.hr-soft{
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 12px 0;
}

.tabbar{
  display:flex;
  gap: 10px;
  margin-bottom: 12px;
}

.tabbtn{
  border: 1px solid var(--border);
  background: #fff;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 900;
  cursor:pointer;
  user-select:none;
}

.tabbtn.active{
  border-color: rgba(227, 27, 35, .35);
  box-shadow: 0 10px 22px rgba(227, 27, 35, .12);
  position: relative;
}

.tabbtn.active::after{
  content:"";
  position:absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 3px;
  background: var(--brand-red);
  border-radius: 99px;
}

.dash-dropdown .Select-control{
  border-radius: 12px !important;
  border: 1px solid var(--border) !important;
  box-shadow: none !important;
}

.dash-table-container .dash-spreadsheet-container{
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.plot-container{
  border-radius: 14px;
  overflow: hidden;
}

.small-note{
  font-size: 12px;
  color: var(--muted);
}
