/* Executive Dashboard — DEAGIO Portal */

.db-page { min-height: 100vh; }
.db-header {
  max-width: min(var(--dp-header-max, 1200px), calc(100% - 48px));
}

.db-main {
  max-width: var(--dp-max, 720px);
  margin: 0 auto;
  padding: 28px 24px 48px;
}

@media (min-width: 900px) {
  .db-main { max-width: 840px; }
}

@media (min-width: 1200px) {
  .db-main { max-width: 960px; }
}

.db-hero { margin-bottom: 28px; }
.db-eyebrow {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dp-accent);
  margin: 0 0 8px;
  font-weight: 500;
}
.db-hero h1 {
  font-family: var(--dp-serif);
  font-size: clamp(2rem, 5vw, 2.6rem);
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.db-hero-sub { margin: 0; color: var(--dp-muted); font-size: 14px; max-width: 520px; }
.db-date { font-size: 12px; color: var(--dp-muted); margin: 12px 0 0; }

.db-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 36px;
}
@media (max-width: 720px) { .db-kpi-grid { grid-template-columns: repeat(2, 1fr); } }

.db-kpi-card {
  background: var(--dp-surface);
  border: 1px solid var(--dp-line);
  border-radius: 14px;
  padding: 18px 16px;
  box-shadow: var(--dp-card-shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}
.db-kpi-card b {
  display: block;
  font-family: var(--dp-serif);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--dp-ink);
  line-height: 1.1;
}
.db-kpi-card span { font-size: 11px; color: var(--dp-muted); margin-top: 4px; display: block; }
.db-kpi-card small { font-size: 10px; color: var(--dp-accent); display: block; margin-top: 6px; }
.db-kpi-card.up b { color: #15803d; }
.db-kpi-card.warn b { color: #b45309; }

.db-section-title {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dp-muted);
  margin: 0 0 4px;
  font-weight: 500;
}
.db-section-sub { font-size: 13px; color: var(--dp-muted); margin: 0 0 16px; }

.db-report-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (max-width: 600px) { .db-report-grid { grid-template-columns: 1fr; } }

.db-report-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 0;
  border: 1px solid var(--dp-line);
  border-radius: 16px;
  background: var(--dp-surface);
  box-shadow: var(--dp-card-shadow);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  font-family: inherit;
  color: inherit;
  width: 100%;
}
.db-report-card:hover {
  border-color: color-mix(in srgb, var(--dp-accent) 45%, var(--dp-line));
  box-shadow: var(--dp-card-hover);
  transform: translateY(-2px);
}
.db-report-visual {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
}
.db-report-inner { padding: 16px 18px 18px; width: 100%; }
.db-report-badge {
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dp-accent);
  font-weight: 600;
  margin-bottom: 6px;
}
.db-report-card h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.db-report-card p { margin: 0 0 12px; font-size: 12px; color: var(--dp-muted); line-height: 1.5; }
.db-report-stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.db-report-stat b { font-family: var(--dp-serif); font-size: 28px; font-weight: 700; color: var(--dp-accent); }
.db-report-stat span { font-size: 11px; color: var(--dp-muted); }

.db-report-card.checkin .db-report-visual { object-position: center 40%; }
.db-report-card.nightbill { border-style: dashed; opacity: 0.92; }
.db-report-card.nightbill .db-report-stat b { font-size: 14px; font-family: var(--dp-sans); }

.db-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--dp-line);
}
.db-quick-link {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--dp-line);
  background: var(--dp-surface);
  color: var(--dp-ink);
  text-decoration: none;
  font-size: 12px;
  transition: border-color 0.2s;
}
.db-quick-link:hover { border-color: var(--dp-accent); }

/* Modal */
.db-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(17, 17, 17, 0.55);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.db-modal-backdrop.d-none { display: none !important; }
.db-modal {
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--dp-surface);
  border: 1px solid var(--dp-line);
  border-radius: 20px;
  padding: 28px 24px 20px;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
  animation: dbModalIn 0.28s ease;
}
@keyframes dbModalIn {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to { opacity: 1; transform: none; }
}
.db-modal-x {
  position: absolute;
  top: 14px;
  right: 16px;
  border: none;
  background: transparent;
  font-size: 24px;
  color: var(--dp-muted);
  cursor: pointer;
  line-height: 1;
}
.db-modal-badge {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dp-accent);
  font-weight: 600;
  margin-bottom: 6px;
}
.db-modal-title { font-size: 1.35rem; font-weight: 600; margin: 0 0 16px; padding-right: 28px; }
.db-modal-body { font-size: 14px; color: var(--dp-muted); line-height: 1.6; }
.db-modal-kpis {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 16px 0;
}
.db-modal-kpis div {
  padding: 14px;
  border-radius: 12px;
  background: var(--dp-bg);
  border: 1px solid var(--dp-line);
  text-align: center;
}
.db-modal-kpis b { display: block; font-family: var(--dp-serif); font-size: 1.5rem; color: var(--dp-ink); }
.db-modal-kpis span { font-size: 10px; color: var(--dp-muted); }
.db-modal-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 12px; }
.db-modal-table th, .db-modal-table td { padding: 8px 6px; border-bottom: 1px solid var(--dp-line); text-align: left; }
.db-modal-table th { color: var(--dp-muted); font-weight: 500; }
.db-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--dp-line);
}
.db-btn-ghost {
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid var(--dp-line);
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  color: var(--dp-ink);
}
.db-modal-mock { font-size: 10px; color: var(--dp-muted); }

.d-none { display: none !important; }
