/* ═══════════════════════════════════════════════
   Authority Engine Dashboard — Frontend CSS v2
   Scoped to .ae-dashboard-wrap to avoid WP conflicts.
   Font sizes significantly increased for readability.
═══════════════════════════════════════════════ */

/* ── VARIABLES ── */
.ae-dashboard-wrap {
  --ae-gold:       #C9A227;
  --ae-gold-light: #E8C84A;
  --ae-gold-dim:   #8A6A10;
  --ae-navy:       #1B3A6B;
  --ae-black:      #111111;
  --ae-off:        #F8F7F5;
  --ae-light:      #E8E6E1;
  --ae-mid:        #7A7875;
  --ae-white:      #FFFFFF;
  --ae-green:      #2A7A4A;
  --ae-alt:        #F5F4F2;
  --ae-serif:      'Playfair Display', Georgia, serif;
  --ae-sans:       'DM Sans', 'Segoe UI', sans-serif;

  font-family: var(--ae-sans);
  background: var(--ae-off);
  color: var(--ae-black);
  line-height: 1.6;
  border-radius: 10px;
  overflow: hidden;
/*   box-shadow: 0 10px 48px rgba(0,0,0,0.12); */
}

/* ── DEMO BANNER ── */
.ae-demo-banner {
  background: #7c6209;
  color: #fff;
  font-size: 14px;
  text-align: center;
  padding: 10px 20px;
  font-family: var(--ae-sans);
}
.ae-demo-banner a { color: #FFE580; text-decoration: underline; }

/* ── ERROR STATE ── */
.ae-error-notice {
  display: flex; align-items: flex-start; gap: 14px;
  background: #fff8f8; border: 1px solid #f5c6c6; border-left: 4px solid #8B2020;
  border-radius: 6px; padding: 18px 22px;
  font-family: var(--ae-sans, sans-serif); font-size: 15px; color: #333;
}

/* ── HEADER ── */
.ae-hdr {
  background: var(--ae-black);
  border-bottom: 3px solid var(--ae-gold);
  padding: 0 36px;
  height: 68px;
  display: flex; align-items: center; justify-content: space-between;
margin-top: 20px;
    border-radius: 7px;
}
.ae-hdr-brand {
  font-family: var(--ae-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--ae-white);
  letter-spacing: 0.3px;
}
.ae-hdr-brand span { color: var(--ae-gold); }
.ae-hdr-client {
  font-size: 15px;
  color: var(--ae-mid);
  font-weight: 400;
  margin-left: 18px;
  padding-left: 18px;
  border-left: 1px solid #333;
}
.ae-hdr-left  { display: flex; align-items: center; }
.ae-hdr-right { display: flex; align-items: center; gap: 14px; }
.ae-hdr-period {
  font-size: 13px;
  color: var(--ae-gold);
  font-weight: 700;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 6px 16px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.ae-hdr-updated {
  font-size: 13px;
  color: #555;
}

/* ── PAGE BODY ── */
.ae-page { 
	padding: 28px 32px 56px; 
/* 	background: var(--ae-off);  */
	background: white;
}

/* ── SCORE BAND ── */
.ae-score-band {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px;
  margin-bottom: 20px;
}
.ae-s-card {
  border-radius: 10px;
  padding: 28px 30px;
  overflow: hidden;
}
.ae-s-card-a { background: var(--ae-black); border-bottom: 4px solid var(--ae-gold); }
.ae-s-card-b { background: var(--ae-white); border: 1px solid var(--ae-light); border-bottom: 4px solid var(--ae-navy); }
.ae-s-card-c { background: var(--ae-white); border: 1px solid var(--ae-light); border-bottom: 4px solid var(--ae-green); }

.ae-s-label {
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ae-mid);
  margin-bottom: 10px;
  font-weight: 600;
}
.ae-s-card-a .ae-s-label { color: #666; }

.ae-s-val-gold {
  font-family: var(--ae-serif);
  font-size: 64px;
  font-weight: 900;
  color: var(--ae-gold);
  line-height: 1;
  margin-bottom: 6px;
}
.ae-s-val-navy {
  font-family: var(--ae-serif);
  font-size: 26px;
  font-weight: 700;
  color: var(--ae-black);
  line-height: 1.2;
  margin-bottom: 10px;
}
.ae-s-val-green {
  font-family: var(--ae-serif);
  font-size: 58px;
  font-weight: 900;
  color: var(--ae-green);
  line-height: 1;
  margin-bottom: 6px;
}
.ae-s-note {
  font-size: 14px;
  color: var(--ae-mid);
}
.ae-s-badge {
  display: inline-block;
  background: #EEF2F8;
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 13px;
  color: var(--ae-navy);
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* ── ROADMAP ── */
.ae-roadmap-card {
  background: var(--ae-white);
  border: 1px solid var(--ae-light);
  border-radius: 10px;
  padding: 26px 30px;
  margin-bottom: 20px;
}
.ae-rm-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
}
.ae-rm-eyebrow {
  font-size: 12px;
  color: var(--ae-mid);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 4px;
  font-weight: 600;
}
.ae-rm-title { font-size: 18px; font-weight: 700; color: var(--ae-black); }
.ae-rm-month { font-size: 14px; color: var(--ae-mid); font-style: italic; }

.ae-rm-track {
  height: 8px;
  background: var(--ae-light);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 16px;
}
.ae-rm-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--ae-navy) 0%, var(--ae-gold) 100%);
  transition: width 1.1s ease;
}
.ae-rm-stages {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
.ae-rm-stage {
  border-radius: 6px;
  padding: 10px 12px;
  border: 1px solid var(--ae-light);
  border-top: 3px solid var(--ae-light);
  background: var(--ae-white);
}
.ae-rm-stage.past   { background: #F0F0F0; border-top-color: #CCC; }
.ae-rm-stage.active { background: var(--ae-black); border-color: var(--ae-gold); border-top-color: var(--ae-gold); }

.ae-rm-range { font-size: 11px; color: var(--ae-mid); margin-bottom: 3px; font-weight: 500; }
.ae-rm-stage.active .ae-rm-range { color: var(--ae-gold); }
.ae-rm-stage.past   .ae-rm-range { color: #AAA; }

.ae-rm-name { font-size: 12px; color: var(--ae-black); line-height: 1.3; font-weight: 600; }
.ae-rm-stage.active .ae-rm-name { color: var(--ae-white); }
.ae-rm-stage.past   .ae-rm-name { color: #999; }

.ae-rm-yah { font-size: 10px; color: var(--ae-gold); font-weight: 700; margin-top: 5px; letter-spacing: 0.3px; }

/* ── TABS ── */
.ae-tabs-wrap {
  background: var(--ae-white);
  border: 1px solid var(--ae-light);
  border-radius: 10px;
  overflow: hidden;
}
.ae-tabs-nav {
  display: flex;
  border-bottom: 2px solid var(--ae-light);
  background: var(--ae-white);
}
.ae-tab-btn {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-family: var(--ae-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 16px 28px;
  color: var(--ae-mid);
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
  line-height: 1;
}
.ae-tab-btn:hover  { color: var(--ae-black); }
.ae-tab-btn.active { color: var(--ae-gold); border-bottom-color: var(--ae-gold); }

.ae-tab-panel        { display: none; }
.ae-tab-panel.active { display: block; }

/* ── TAB 1: BUCKET TABLE ── */
.ae-tbl-header {
  display: grid;
  grid-template-columns: 60px 1fr 200px 110px;
  background: var(--ae-black);
  padding: 13px 24px;
  border-bottom: 2px solid var(--ae-gold);
}
.ae-tbl-header span {
  font-size: 12px;
  color: var(--ae-white);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
}
.ae-tbl-header span:last-child { text-align: right; }

.ae-tbl-row {
  display: grid;
  grid-template-columns: 60px 1fr 200px 110px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--ae-light);
  align-items: center;
  transition: background 0.1s;
}
.ae-tbl-row:last-child { border-bottom: none; }
.ae-tbl-row.even      { background: var(--ae-white); }
.ae-tbl-row.odd       { background: var(--ae-alt); }
.ae-tbl-row.total     { background: var(--ae-black); border-top: 2px solid var(--ae-gold); }
.ae-tbl-row:not(.total):hover { background: #EDE9E2; }

.ae-b-num       { font-size: 14px; color: var(--ae-gold); font-weight: 700; }
.ae-b-label     { font-size: 15px; color: var(--ae-black); font-weight: 500; }
.ae-b-label-tot { font-size: 14px; color: var(--ae-white); font-weight: 700; letter-spacing: 0.5px; }

.ae-b-track     { height: 6px; background: var(--ae-light); border-radius: 3px; overflow: hidden; margin-bottom: 4px; }
.ae-b-track.dark{ background: #333; }
.ae-b-bar       { height: 100%; border-radius: 3px; transition: width 1.3s ease; }
.ae-b-pct       { font-size: 12px; color: var(--ae-mid); }

.ae-b-score      { font-size: 15px; font-weight: 700; text-align: right; color: var(--ae-black); }
.ae-b-score.done { color: var(--ae-gold); }
.ae-b-score.tot  { color: var(--ae-gold); font-size: 16px; }
.ae-b-denom      { font-size: 12px; color: var(--ae-mid); font-weight: 400; }

/* ── TAB 2: HISTORY CHART ── */
.ae-history-panel { padding: 28px; }
.ae-chart-area {
  background: var(--ae-alt);
  border: 1px solid var(--ae-light);
  border-radius: 10px;
  padding: 24px 20px 16px;
  margin-bottom: 20px;
  height: 260px;
  display: flex;
  align-items: flex-end;
}
.ae-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
  height: 100%;
}
.ae-chart-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  height: 100%;
  justify-content: flex-end;
  gap: 6px;
}
.ae-chart-val         { font-size: 12px; font-weight: 700; color: var(--ae-mid); }
.ae-chart-val.current { color: var(--ae-gold); }
.ae-chart-bar-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  flex: 1;
  min-height: 0;
}
.ae-chart-bar         { width: 100%; border-radius: 4px 4px 0 0; transition: height 1.2s ease; min-height: 4px; }
.ae-chart-bar.past    { background: var(--ae-navy); }
.ae-chart-bar.current { background: var(--ae-gold); }
.ae-chart-month         { font-size: 11px; color: var(--ae-mid); text-align: center; white-space: nowrap; }
.ae-chart-month.current { color: var(--ae-gold); font-weight: 700; }

.ae-hist-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.ae-hist-stat {
  background: var(--ae-white);
  border: 1px solid var(--ae-light);
  border-radius: 8px;
  padding: 18px 22px;
  text-align: center;
}
.ae-hs-label {
  font-size: 12px;
  color: var(--ae-mid);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 600;
}
.ae-hs-val { font-family: var(--ae-serif); font-size: 28px; font-weight: 700; color: var(--ae-navy); }
.ae-hs-sub { font-size: 13px; color: var(--ae-mid); margin-top: 3px; }

/* ── FOOTER ── */
.ae-dash-footer {
  border-top: 1px solid var(--ae-light);
  margin-top: 32px;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.ae-footer-brand {
  font-family: var(--ae-serif);
  font-size: 14px;
  color: var(--ae-mid);
}
.ae-footer-note {
  font-size: 13px;
  color: #CCC;
  background: var(--ae-black);
  border-radius: 4px;
  padding: 4px 14px;
}

/* ── RESPONSIVE ── */
@media (max-width: 800px) {
  .ae-hdr { padding: 0 18px; height: auto; min-height: 58px; flex-wrap: wrap; gap: 8px; padding-top: 12px; padding-bottom: 12px; }
  .ae-hdr-client { display: none; }
  .ae-page { padding: 18px 16px 36px; }
  .ae-score-band { grid-template-columns: 1fr; }
  .ae-s-val-gold  { font-size: 52px; }
  .ae-s-val-green { font-size: 48px; }
  .ae-rm-stages   { grid-template-columns: repeat(3, 1fr); }
  .ae-tbl-header,
  .ae-tbl-row     { grid-template-columns: 48px 1fr 90px; }
  .ae-tbl-header span:nth-child(3),
  .ae-tbl-row > div:nth-child(3) { display: none; }
  .ae-hist-stats  { grid-template-columns: 1fr; }
}
