:root {
  --bg: #000;
  --panel: #0e1212;
  --accent: #e60023;          /* WALZ red accent */
  --accent2: #49ffd7;         /* optional turquoise */
  --muted: #a9b2b0;
  --border: #1f2524;
  --table-h: #121818;
}

/* =========================
   BASE
   ========================= */
body.dash-body {
  background: var(--bg);
  color: #fff;
  font-family: Arial, sans-serif;
  min-height: 100vh;
  margin: 0;
}

/* =========================
   TOP BAR
   ========================= */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0a0a0a;
  border-bottom: 1px solid #141414;
  padding: 12px 20px;
}

.topbar-left h2 {
  margin: 0;
  font-size: 18px;
}

.topbar-left .subtitle {
  font-size: 11px;
  color: #888;
}

.link-orange {
  color: #fff;
  background: var(--accent);
  padding: 5px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  font-weight: bold;
}

.link-orange:hover {
  background: #ff4d5c;  /* lighter red hover */
  color: #000;
}

/* Right side of topbar: site switch + viewing + logout */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
}

.site-switch-form {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 6px;
}

.site-input {
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid #444;
  font-size: 12px;
  min-width: 140px;
  background: #ffffff;
  color: #000;
}

.site-load-btn {
  padding: 5px 10px;
  border-radius: 6px;
  border: none;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
}

.site-load-btn:hover {
  background: #ff4d5c;
  color: #000;
}

.current-site-label {
  font-size: 11px;
  color: #ccc;
}

/* =========================
   FILTER BAR
   ========================= */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 20px 8px;
  background: transparent;
}

.filter-bar label {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  color: var(--muted);
}

.filter-bar input[type="date"],
.filter-bar select {
  background: #0b0f0f;
  border: 1px solid #2b3534;
  color: #fff;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 13px;
  margin-top: 3px;
}

.btn-primary {
  background: #74918D;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  color: #fff;
  font-weight: bold;
  height: 34px;
  align-self: flex-end;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--accent2);
  color: #000;
}

/* =========================
   DAILY / WEEKLY / MONTHLY TOTALS
   ========================= */
.daily-total-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 4px 20px 10px;
}

.daily-total-card {
  display: inline-block;
  background: #f2f2f2;
  border-radius: 12px;
  padding: 10px 16px;
  border: 1px solid #d0d0d0;
}

.daily-total-card h3 {
  margin: 0 0 4px 0;
  font-size: 13px;
  font-weight: 600;
  color: #222;
}

.daily-total-values {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

.daily-total-units {
  font-size: 12px;
  font-weight: 600;
  color: #444;
}

.daily-total-secondary {
  font-size: 12px;
  color: #555;
}

/* =========================
   TABLE (BASE DARK THEME)
   ========================= */
.table-wrap {
  padding: 10px 20px 30px;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  background: #0d1111;
  border: 1px solid #171d1d;
  border-radius: 10px;
  overflow: hidden;
}

.history-table thead th {
  background: var(--table-h);
  color: var(--accent2);
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 10px;
  border-bottom: 1px solid #171d1d;
}

.history-table tbody td {
  padding: 9px 10px;
  font-size: 13px;
}

.history-table tbody tr:hover {
  background: #151d1e;
}

.actions-col,
.actions-cell {
  white-space: nowrap;
  text-align: right;
}

/* =========================
   ACTION BUTTONS
   ========================= */
.btn-small {
  background: #1d2323;
  color: #fff;
  border: 1px solid #2b3534;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 12px;
  margin-left: 4px;
  cursor: pointer;
}

.btn-small:hover {
  background: var(--accent2);
  color: #000;
}

/* Delete / danger buttons use Walz red */
.btn-danger {
  background: var(--accent);
  border-color: var(--accent);
}

.btn-danger:hover {
  background: #b3001a;  /* darker red hover */
}

/* =========================
   MOBILE
   ========================= */
@media (max-width: 900px) {
  .filter-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .actions-cell {
    text-align: left;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .topbar-right {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* =========================
   AUTH PAGES (LOGIN / REGISTER)
   ========================= */
.rx-auth-page {
  background: radial-gradient(circle, rgba(0,0,0,1) 0%, #000 65%, #000 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  justify-content: center;
  font-family: Arial, sans-serif;
}

.rx-auth-panel {
  background: #f2f2f2 !important;                 /* light card */
  border: 1px solid rgba(230,0,35,0.35);          /* Walz red frame */
  box-shadow: 0 0 35px rgba(0,0,0,0.45);
  border-radius: 18px;
  width: min(420px, 92vw);
  padding: 28px 30px 30px;
}

.rx-auth-header {
  text-align: center;
  margin-bottom: 18px;
}

.rx-title {
  margin: 0;
  color: #000;                                    /* dark text for light card */
  font-size: 20px;
  font-weight: 600;
}

.rx-subtitle {
  margin: 3px 0 0;
  color: #333;                                    /* softer gray */
  font-size: 12px;
}

.rx-auth-form {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 8px;
}

.rx-label {
  color: #000;                                    /* dark labels */
  font-size: 12px;
}

.rx-input {
  background: #ffffff;                            /* light input */
  border: 1px solid #bfbfbf;
  border-radius: 8px;
  padding: 8px 10px;
  color: #000;
  font-size: 13px;
  outline: none;
}

.rx-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(230,0,35,0.25);
}

.rx-btn-primary {
  background: var(--accent);
  border: none;
  border-radius: 8px;
  padding: 9px 0;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  margin-top: 6px;
  cursor: pointer;
  transition: 0.15s ease-in-out;
}

.rx-btn-primary:hover {
  background: #ff4d5c;                            /* lighter red hover */
  color: #000;
}

.rx-auth-footer {
  margin-top: 14px;
  text-align: center;
  font-size: 12px;
  color: #555;
}

.rx-link {
  color: var(--accent);
  text-decoration: none;
  margin-left: 4px;
}

.rx-link:hover {
  text-decoration: underline;
}

.rx-flash {
  background: rgba(230,0,35,0.12);
  border: 1px solid rgba(230,0,35,0.3);
  color: #000;                                    /* readable on light card */
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.rx-auth-copy {
  color: #5d6664;
  font-size: 11px;
  text-align: center;
}

/* LOGO */
.rx-auth-logo {
  display: block;
  margin: 0 auto 10px auto;
  transform: none;
  max-width: 260px;
  height: auto;
}

@media (max-width: 480px) {
  .rx-auth-logo {
    transform: translateX(2px);
    max-width: 200px;
  }
}

/* =========================
   FORGOT PASSWORD PAGE
   ========================= */
.rx-forgot-wrapper {
  background: #0e1212;
  border: 1px solid rgba(230,0,35,0.35);
  border-radius: 18px;
  box-shadow: 0 0 35px rgba(0,0,0,0.45);
  width: min(380px, 92vw);
  padding: 26px 28px 28px;
  margin: 40px auto;
  text-align: center;
  color: #fff;
}

.rx-forgot-wrapper h1 {
  font-size: 18px;
  margin-bottom: 6px;
  color: #fff;
}

.rx-forgot-wrapper p {
  font-size: 12px;
  color: #b7c0bf;
  margin-bottom: 14px;
}

.rx-forgot-wrapper input[type="email"] {
  background: #050707;
  border: 1px solid #1f2524;
  border-radius: 8px;
  padding: 8px 10px;
  color: #fff;
  width: 100%;
  margin-bottom: 10px;
}

.rx-forgot-wrapper button {
  background: var(--accent);
  border: none;
  border-radius: 8px;
  padding: 9px 0;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  width: 100%;
  transition: 0.15s ease-in-out;
}

.rx-forgot-wrapper button:hover {
  background: #ff4d5c;
  color: #000;
}

.rx-forgot-wrapper a {
  color: var(--accent);
  font-size: 12px;
  text-decoration: none;
}

.rx-forgot-wrapper a:hover {
  text-decoration: underline;
}

/* =========================
   HISTORY PAGE LIGHT THEME
   ========================= */

/* Make history/dashboard pages use the same light feel as login card */
.history-page {
  background: #e9e9e9 !important;      /* whole page background (light) */
  min-height: 100vh;
}

/* Filter bar text + inputs on history page: all black on light */
.history-page .filter-bar label {
  color: #000;
}

.history-page .filter-bar input[type="date"],
.history-page .filter-bar select {
  background: #ffffff;
  border: 1px solid #bfbfbf;
  color: #000;
}

.history-page .btn-primary {
  background: var(--accent);
  color: #fff;
}

/* History table container matches light login card */
.history-page .table-wrap {
  background: #f2f2f2 !important;      /* same as auth panel */
  border-radius: 18px;
  padding: 20px;
}

/* Daily total card on history should blend with light theme */
.history-page .daily-total-card {
  background: #ffffff;
}

/* Table itself becomes light-themed inside history page */
.history-page .history-table {
  background: #ffffff !important;
  border: 1px solid #d0d0d0 !important;
}

.history-page .history-table thead th {
  background: #f5f5f5 !important;
  color: #333 !important;
  border-bottom: 1px solid #d0d0d0 !important;
}

/* WALZ – black row separator lines */
.history-table tbody tr td {
  border-bottom: 1px solid #000 !important;
}

.history-table tbody tr:last-child td {
  border-bottom: none !important;
}

.history-page .history-table tbody td {
  color: #000 !important;
}

.history-page .history-table tbody tr:hover {
  background: #ececec !important;
}
