:root {
  --bg: #090b14;
  --card: #11172a;
  --line: #2b3658;
  --text: #e8ebf5;
  --muted: #98a3c5;
  --primary: #6e7dff;
  --primary-2: #8c97ff;
  --danger: #ff5d84;
  --success: #3ecf8e;
}

* {
  box-sizing: border-box;
  font-family: Inter, Arial, sans-serif;
}

body {
  margin: 0;
  background: radial-gradient(circle at top right, #1d2550, var(--bg) 42%);
  color: var(--text);
}

.hidden {
  display: none !important;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 14, 0.82);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: grid;
  place-items: center;
  padding: 18px;
}

.login-card {
  width: min(420px, 100%);
  background: #121a30;
  border: 1px solid #2b3658;
  border-radius: 14px;
  padding: 18px;
}

.session-modal {
  width: min(760px, 100%);
  background: #121a30;
  border: 1px solid #2b3658;
  border-radius: 14px;
  padding: 18px;
}

.session-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.modal-checkbox {
  margin-top: 10px;
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 8px;
}

.login-card h2 {
  margin-top: 0;
}

.login-card p {
  color: var(--muted);
}

.login-card #loginMessage {
  min-height: 18px;
}

.page {
  max-width: 1160px;
  margin: 0 auto;
  padding: 28px 16px 44px;
}

.card {
  background: linear-gradient(160deg, #141c34 0%, #101629 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 12px 34px rgba(5, 8, 18, 0.36);
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.tag {
  color: var(--primary-2);
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 34px;
}

h2 {
  margin: 0 0 12px;
}

h3 {
  margin: 10px 0 8px;
}

.subtitle {
  margin: 8px 0 0;
  color: var(--muted);
}

.kpis {
  display: flex;
  gap: 10px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logout-btn {
  height: 38px;
  border-radius: 10px;
  border: 1px solid #5d2a3a;
  background: linear-gradient(120deg, #321420, #40182a);
  color: #ffc6d5;
  font-weight: 700;
  padding: 0 12px;
}

.logout-btn:hover {
  filter: brightness(1.08);
}

.kpi {
  min-width: 120px;
  background: #0d1324;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}

.kpi span {
  color: var(--muted);
  font-size: 12px;
}

.kpi strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
}

.pill {
  border: 1px solid #2a3558;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--muted);
  background: #0d1324;
}

.pill.success {
  color: #9ff2cc;
  border-color: #1f7f5a;
  background: #0f2f22;
}

.pill.neutral {
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 10px;
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

input,
select,
button {
  height: 40px;
  border-radius: 10px;
}

input,
select {
  border: 1px solid #2a3558;
  background: #0c1222;
  color: var(--text);
  padding: 0 12px;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #98a3c5 50%),
    linear-gradient(135deg, #98a3c5 50%, transparent 50%);
  background-position:
    calc(100% - 16px) calc(50% - 2px),
    calc(100% - 11px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

button {
  border: none;
  background: linear-gradient(120deg, var(--primary), var(--primary-2));
  color: white;
  font-weight: 700;
  padding: 0 14px;
  cursor: pointer;
}

button.secondary {
  background: linear-gradient(120deg, #58618a, #6c779e);
}

button.ghost {
  background: transparent;
  border: 1px solid #2a3558;
  color: var(--muted);
}

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

.actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.manual-entry-grid {
  margin-top: 14px;
}

.helper {
  color: var(--muted);
  margin: 10px 0 0;
  font-size: 13px;
}

.range-quick {
  display: flex;
  gap: 8px;
  margin: 0 0 10px;
  flex-wrap: wrap;
}

.table-filter {
  margin: 0 0 10px;
}

.table-filter input {
  max-width: 360px;
}

.mini-btn {
  height: 30px;
  border-radius: 8px;
  font-size: 12px;
  padding: 0 10px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.inline-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

small {
  color: var(--muted);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid #202b4a;
  padding: 10px 8px;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-weight: 600;
}

.message {
  min-height: 20px;
  margin-top: 10px;
  font-weight: 700;
}

.message:empty {
  min-height: 0;
  margin-top: 4px;
}

#reportSummary {
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .grid.three,
  .grid.two {
    grid-template-columns: 1fr;
  }
}
