:root {
  --dash-bg: #06101b;
  --dash-bg-2: #0b2742;
  --dash-card: rgba(255,255,255,0.96);
  --dash-card-soft: rgba(255,255,255,0.08);
  --dash-line: rgba(255,255,255,0.16);
  --dash-text: #ecf7ff;
  --dash-ink: #091321;
  --dash-muted: #86a5bd;
  --dash-muted-dark: #4c6074;
  --dash-cyan: #1dd4ff;
  --dash-blue: #106dff;
  --dash-radius: 24px;
}

* { box-sizing: border-box; }
body.dashboard-page {
  min-height: 100vh;
  margin: 0;
  color: var(--dash-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 78% 8%, rgba(29,212,255,.18) 0, transparent 32%),
    radial-gradient(circle at 0 16%, rgba(16,109,255,.24) 0, transparent 34%),
    linear-gradient(135deg, #041020 0%, #072846 52%, #03101e 100%);
  overflow-x: hidden;
}

body.dashboard-page::before {
  content: "";
  position: fixed;
  inset: 82px 0 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent 85%);
}

.dashboard-shell {
  width: min(1480px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 34px;
  position: relative;
  z-index: 1;
}

.dash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  margin-bottom: 28px;
  border: 1px solid var(--dash-line);
  border-radius: 24px;
  background: rgba(3, 12, 24, .62);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 60px rgba(0,0,0,.24);
}

.dash-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 240px;
}

.dash-logo-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 1000;
  font-size: 29px;
  letter-spacing: -0.08em;
  background: linear-gradient(135deg, #21e3ff, #0b8fe7);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.28), 0 14px 28px rgba(9, 166, 223, .26);
}

.dash-brand-text strong {
  display: block;
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.03em;
}
.dash-brand-text strong span { color: var(--dash-cyan); }
.dash-brand-text small {
  display: block;
  margin-top: 4px;
  color: var(--dash-muted);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 10px;
}

.dash-nav {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.dash-nav a {
  color: rgba(236,247,255,.84);
  text-decoration: none;
  font-size: 13px;
  font-weight: 850;
  padding: 10px 14px;
  border-radius: 13px;
  border: 1px solid transparent;
  transition: .16s ease;
}
.dash-nav a:hover,
.dash-nav a.active {
  border-color: rgba(29,212,255,.38);
  background: rgba(29,212,255,.10);
  color: #fff;
}

.dash-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.dash-chip {
  border: 1px solid rgba(29,212,255,.32);
  color: #dff7ff;
  background: rgba(29,212,255,.08);
  padding: 10px 13px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
  white-space: nowrap;
}

.dash-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: 28px;
  align-items: end;
  margin-bottom: 26px;
}

.dash-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--dash-cyan);
  font-weight: 950;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: 12px;
}
.dash-eyebrow::before {
  content: "";
  width: 8px;
  height: 32px;
  border-radius: 99px;
  background: var(--dash-cyan);
  box-shadow: 0 0 22px rgba(29,212,255,.65);
}
.dash-hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(38px, 5.2vw, 76px);
  line-height: .93;
  letter-spacing: -0.055em;
  text-transform: uppercase;
}
.dash-hero p {
  max-width: 700px;
  margin: 16px 0 0;
  color: rgba(236,247,255,.78);
  font-size: 17px;
  line-height: 1.55;
}

.dash-tools {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--dash-line);
  border-radius: 20px;
  background: rgba(3, 12, 24, .42);
  backdrop-filter: blur(16px);
}
.dash-search {
  position: relative;
}
.dash-search input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 15px;
  outline: none;
  background: rgba(255,255,255,.08);
  color: var(--dash-text);
  padding: 0 16px 0 44px;
  font-size: 14px;
}
.dash-search input::placeholder { color: rgba(236,247,255,.54); }
.dash-search span {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  opacity: .62;
}
.dash-filter {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 15px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(236,247,255,.86);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.template-card {
  display: grid;
  grid-template-columns: minmax(210px, 46%) 1fr;
  gap: 18px;
  min-height: 270px;
  padding: 14px;
  border-radius: var(--dash-radius);
  background: var(--dash-card);
  color: var(--dash-ink);
  box-shadow: 0 22px 70px rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.78);
  overflow: hidden;
  position: relative;
}
.template-card::after {
  content: "";
  position: absolute;
  inset: auto -60px -70px auto;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(29,212,255,.14), transparent 66%);
  pointer-events: none;
}
.template-thumb {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  min-height: 240px;
  background: #06101b;
}
.template-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .32s ease;
}
.template-card:hover .template-thumb img { transform: scale(1.035); }
.template-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2,12,22,.50), transparent 48%);
  pointer-events: none;
}
.template-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 4px 2px 0;
  min-width: 0;
}
.template-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.template-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  color: #0862c4;
  background: #e6f3ff;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.template-bookmark {
  color: #718198;
  font-size: 18px;
}
.template-content h2 {
  margin: 6px 0 0;
  font-size: 27px;
  line-height: 1.06;
  letter-spacing: -0.035em;
}
.template-content p {
  margin: 0;
  color: var(--dash-muted-dark);
  font-size: 14px;
  line-height: 1.48;
}
.template-meta {
  display: grid;
  gap: 8px;
  margin: 4px 0 auto;
  padding: 0;
  list-style: none;
  color: #253b52;
  font-size: 13px;
  font-weight: 750;
}
.template-meta li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.template-meta span {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #edf5ff;
  color: #0a6be7;
  flex: 0 0 auto;
}
.template-cta {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}
.open-template {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 13px;
  text-decoration: none;
  background: linear-gradient(135deg, var(--dash-blue), #13c8ff);
  color: white;
  font-size: 14px;
  font-weight: 950;
  box-shadow: 0 14px 28px rgba(16,109,255,.24);
}
.open-template:hover { filter: brightness(1.05); transform: translateY(-1px); }
.template-note {
  color: #8291a3;
  font-size: 12px;
  font-weight: 800;
}

.dash-bottom-banner {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgba(29,212,255,.28);
  border-radius: 22px;
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(29,212,255,.10), rgba(16,109,255,.08));
  backdrop-filter: blur(16px);
}
.dash-bottom-banner strong {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
}
.dash-bottom-banner span { color: rgba(236,247,255,.70); font-size: 14px; }
.dash-footer { color: rgba(236,247,255,.58); font-size: 12px; font-weight: 700; }

@media (max-width: 1180px) {
  .dash-hero { grid-template-columns: 1fr; align-items: start; }
  .dash-tools { width: min(100%, 620px); }
  .template-card { grid-template-columns: 1fr; }
  .template-thumb { aspect-ratio: 16/9; min-height: 0; }
}
@media (max-width: 820px) {
  .dashboard-shell { width: min(100% - 28px, 720px); padding-top: 14px; }
  .dash-topbar { align-items: flex-start; flex-direction: column; }
  .dash-nav { justify-content: flex-start; }
  .dash-actions { width: 100%; justify-content: space-between; }
  .template-grid { grid-template-columns: 1fr; }
  .dash-tools { grid-template-columns: 1fr; }
  .dash-filter { justify-content: center; }
  .dash-bottom-banner { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 520px) {
  .dash-brand-text strong { font-size: 22px; }
  .dash-logo-mark { width: 46px; height: 46px; }
  .dash-hero h1 { font-size: 36px; }
  .dash-hero p { font-size: 15px; }
  .template-card { padding: 10px; border-radius: 20px; }
  .template-content { padding: 2px; }
  .template-content h2 { font-size: 24px; }
}


/* v23 visual consistency polish */
.dash-topbar { min-height: 76px; }
.dash-nav { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.dash-nav::-webkit-scrollbar { display: none; }
.dash-nav a { white-space: nowrap; }
.template-card { transition: transform .18s ease, box-shadow .18s ease; }
.template-card:hover { transform: translateY(-2px); box-shadow: 0 28px 78px rgba(0,0,0,.30); }
@media (max-width: 820px) { .dash-nav { width: 100%; flex-wrap: nowrap; justify-content: flex-start; } }

/* v24 dashboard readability polish */
.dashboard-page,
.dashboard-page * { min-width: 0; }
.dash-topbar { flex-wrap: wrap; }
.dash-nav { row-gap: 6px; }
.template-card { align-items: stretch; }
.template-content h2,
.template-content p,
.template-meta li,
.template-note { overflow-wrap: anywhere; }
.template-meta li { align-items: flex-start; line-height: 1.35; }
.template-cta { flex-wrap: wrap; }
@media (max-width: 1280px) {
  .template-card { grid-template-columns: 1fr; min-height: 0; }
  .template-thumb { aspect-ratio: 16 / 9; min-height: 0; }
}
@media (max-width: 600px) {
  .dash-nav { flex-wrap: nowrap; overflow-x: auto; width: 100%; justify-content: flex-start; }
  .dash-actions { flex-wrap: wrap; }
  .open-template { width: 100%; }
}

@media (max-width: 1100px) { .template-grid { grid-template-columns: 1fr; } }


/* v27 daily recap dashboard fix */
.template-grid {
  align-items: stretch;
}
.template-card[data-title="Rekap Harian"] {
  border-color: rgba(29, 212, 255, .36);
  box-shadow: 0 24px 80px rgba(0, 156, 255, .18), 0 22px 70px rgba(0,0,0,.25);
}
.template-card[data-title="Rekap Harian"] .template-badge {
  background: rgba(29, 212, 255, .16);
  color: #006a91;
}
@media (min-width: 1540px) {
  .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
