/* ─── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  color: #1a1a1a;
  background: #f5f5f5;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* ─── Login View ────────────────────────────────────────────── */
#loginView {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-height: 100vh;
  width: 100%;
}

#loginView h1 {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
}

#loginBtn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: box-shadow 0.2s, border-color 0.2s;
}

#loginBtn:hover {
  border-color: #aaa;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

/* ─── App View ──────────────────────────────────────────────── */
#appView {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ─── Cards (shared section style) ─────────────────────────── */
#language,
#type,
#dates,
#include,
#run {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 16px;
}

h2 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
  margin-bottom: 12px;
}

/* ─── Language Bar ──────────────────────────────────────────── */
#language {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
}

#languageToggle,
#logoutBtn {
  background: none;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  color: #555;
  transition: border-color 0.2s, color 0.2s;
}

#languageToggle:hover,
#logoutBtn:hover {
  border-color: #aaa;
  color: #1a1a1a;
}

/* ─── Checkboxes (Reports & Accounts) ──────────────────────── */
#reports,
#accounts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#reports label,
#accounts label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
}

#reports input[type="checkbox"],
#accounts input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #4f46e5;
  cursor: pointer;
}

/* ─── Date Toggle ───────────────────────────────────────────── */
#dateToggle {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

#presetBtn,
#customBtn {
  flex: 1;
  padding: 6px 0;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  color: #555;
  transition: all 0.2s;
}

#presetBtn:hover,
#customBtn:hover {
  border-color: #aaa;
  color: #1a1a1a;
}

.date-toggle-active {
  background: #4f46e5 !important;
  border-color: #4f46e5 !important;
  color: #fff !important;
}

/* ─── Preset Select ─────────────────────────────────────────── */
#presetRanges {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  color: #1a1a1a;
  background: #fff;
  cursor: pointer;
}

#presetRanges:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* ─── Custom Date Inputs ────────────────────────────────────── */
#dateInputs,
#balanceSheetDate {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

#dateInputs label,
#balanceSheetDate label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: #555;
}

#dateInputs input[type="date"],
#balanceSheetDate input[type="date"] {
  padding: 7px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  color: #1a1a1a;
}

#dateInputs input[type="date"]:focus,
#balanceSheetDate input[type="date"]:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* ─── Run Button ────────────────────────────────────────────── */
#runBtn {
  width: 100%;
  padding: 10px;
  background: #4f46e5;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

#runBtn:hover {
  background: #4338ca;
}

#runBtn:disabled {
  background: #a5b4fc;
  cursor: not-allowed;
}

/* ─── Progress Bar ──────────────────────────────────────────── */
#progress {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#progressBar {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

#progressFill {
  height: 100%;
  width: 0%;
  background: #4f46e5;
  border-radius: 999px;
  transition: width 0.3s ease;
}

#progressLabel {
  font-size: 12px;
  color: #888;
  text-align: right;
}

#runningText {
  font-size: 12px;
  color: #888;
  text-align: center;
  letter-spacing: 0.03em;
}