:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --line: #e6eaf0;
  --text: #111827;
  --muted: #6b7280;
  --primary: #111827;
  --shadow: 0 8px 24px rgba(17,24,39,.05);
  --radius: 20px;
}

* { box-sizing: border-box; }
html, body { margin:0; padding:0; background:var(--bg); color:var(--text); font-family:Inter, Arial, sans-serif; }

.header {
  position: sticky; top:0; z-index:20;
  background: rgba(245,247,251,.95);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
  padding:16px;
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:16px;
  align-items:center;
}

.header-left { display:flex; align-items:center; gap:12px; }
.logo {
  width:46px; height:46px; border-radius:14px; display:grid; place-items:center;
  background:#111827; color:#fff; font-weight:800; box-shadow:var(--shadow);
}
.header-left h1 { margin:0; font-size:28px; }
.muted { margin-top:4px; color:var(--muted); font-size:13px; }

.menu { display:flex; justify-content:center; gap:8px; flex-wrap:wrap; }
.menu-link {
  display:inline-flex; align-items:center; justify-content:center;
  min-height:40px; padding:0 14px; border-radius:12px; text-decoration:none;
  color:var(--text); font-weight:600;
}
.back-link { background:#111827; color:#fff; }

.date-form { display:flex; gap:10px; align-items:center; }
input, button {
  width:100%; min-height:44px; padding:10px 12px; border-radius:12px;
  border:1px solid #d6dbe5; background:#fff; color:var(--text); font-size:14px;
}
button { background:#111827; border-color:#111827; color:#fff; font-weight:700; cursor:pointer; }

.container {
  max-width:1380px; margin:0 auto; padding:16px;
  display:flex; flex-direction:column; gap:16px;
}
.panel {
  background:var(--panel); border:1px solid var(--line); border-radius:var(--radius);
  box-shadow:var(--shadow); padding:18px;
}
.hero-badge {
  display:inline-flex; width:fit-content; min-height:32px; align-items:center; padding:0 12px;
  border-radius:999px; background:#111827; color:#fff; font-size:12px; font-weight:700;
}
.hero h2 { margin:10px 0 0; font-size:28px; }
.hero-subtitle { color:var(--muted); font-size:14px; }

.panel-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:12px; }
.panel-head h2 { margin:0; font-size:18px; }

.summary-grid, .cards-grid {
  display:grid; grid-template-columns:repeat(2, 1fr); gap:16px;
}
.summary-card, .mini-card {
  border:1px solid var(--line); border-radius:18px; padding:16px;
  background:linear-gradient(180deg,#fff 0%,#f8fafc 100%);
}
.summary-title, .mini-title { color:var(--muted); font-size:14px; margin-bottom:8px; }
.summary-value, .mini-value { font-size:30px; font-weight:800; }
.mini-note { margin-top:8px; color:var(--muted); font-size:13px; }

.table-wrap { overflow:auto; }
.report-table { width:100%; border-collapse:collapse; }
.report-table th, .report-table td {
  text-align:left; padding:12px 10px; border-bottom:1px solid var(--line); font-size:14px;
}
.report-table th { color:var(--muted); background:#fafbfc; }

.empty-note { color:var(--muted); }

.save-overlay {
  position:fixed; inset:0; z-index:9999; display:none; align-items:center; justify-content:center;
  background:rgba(15,23,42,.45); backdrop-filter:blur(2px);
}
.save-overlay.is-open { display:flex; }
.save-overlay-box {
  min-width:260px; padding:24px 28px; border-radius:18px; background:#fff;
  box-shadow:0 20px 50px rgba(15,23,42,.18);
  display:flex; flex-direction:column; align-items:center; gap:14px;
}
.save-spinner {
  width:34px; height:34px; border-radius:50%;
  border:3px solid #dbe4ef; border-top-color:#111827;
  animation:spin .8s linear infinite;
}
.save-overlay-text { font-size:15px; font-weight:700; color:#111827; }

@keyframes spin { to { transform:rotate(360deg); } }

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