
:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #eef3f6;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(25, 163, 163, 0.10), transparent 30%),
    #eef3f6;
  color: #172b3a;
  font-family: inherit;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.page {
  width: 100%;
}

.card {
  width: min(calc(100% - 32px), 760px);
  margin: 32px auto;
  padding: 28px;
  border: 1px solid #d9e2ec;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(8, 31, 51, 0.10);
}

h1,
h2,
h3 {
  line-height: 1.2;
}

h1 {
  margin-top: 0;
  color: #1e2fb8;
}

h2,
h3 {
  color: #172b3a;
}

p {
  color: #486581;
}

a {
  color: #2743e0;
}

[hidden] {
  display: none !important;
}

form {
  margin-top: 24px;
}

label {
  display: block;
  margin-top: 16px;
  margin-bottom: 6px;
  font-weight: 600;
}

input:not([type="checkbox"]):not([type="radio"]),
select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ccd6e0;
  border-radius: 10px;
  font-size: 16px;
  background: #ffffff;
}

input[type="checkbox"],
input[type="radio"] {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border-radius: initial;
  accent-color: #1e2fb8;
}

button {
  width: 100%;
  margin-top: 24px;
  padding: 12px 16px;
  border: 0;
  border-radius: 10px;
  background: #1e2fb8;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  opacity: 0.92;
}
hr {
  margin: 24px 0;
  border: 0;
  border-top: 1px solid #e1e8f0;
}

.module-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.module-grid button {
  margin-top: 0;
  background: #244b6b;
}

.wide-card {
  max-width: 1100px;
}

.settings-actions {
  margin-bottom: 1rem;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.settings-tile {
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 16px;
  background: #fff;
}

.settings-tile h3 {
  margin-top: 0;
  margin-bottom: 8px;
}

.settings-tile p {
  min-height: 64px;
}

.settings-tile button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

details {
  margin-bottom: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

summary {
  cursor: pointer;
  font-weight: bold;
}

pre {
  white-space: pre-wrap;
  overflow-x: auto;
}

.dashboard-section {
  margin-top: 8px;
}

.dashboard-section[hidden],
#reports-content[hidden],
#operational-summary-section[hidden],
#finance-summary-section[hidden],
#report-links-section[hidden] {
  display: none;
}

#dashboard-scope,
#report-scope-status {
  color: #486581;
  font-weight: 600;
}

.report-scope {
  padding: 16px;
  border: 1px solid #d9e2ec;
  border-radius: 10px;
  background: #f8fafc;
}

.report-scope h2 {
  margin-top: 0;
}

.report-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.report-actions button {
  margin-top: 0;
}

#operational-summary-list,
#finance-summary-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  padding-left: 0;
  list-style: none;
}

#operational-summary-list li,
#finance-summary-list li {
  padding: 14px 16px;
  border: 1px solid #d9e2ec;
  border-radius: 10px;
  background: #ffffff;
  font-weight: 600;
}

@media print {
  button,
  .settings-grid,
  #report-links-section,
  #reportBranchFilter,
  label[for="reportBranchFilter"] {
    display: none !important;
  }

  .card,
  .wide-card {
    max-width: none;
    border: 0;
    box-shadow: none;
  }

  #reports-content {
    display: block !important;
  }
}
