/* APPZUZU Driver Income Dashboard — retained app styles and brand presentation */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #0f1419;
  --card: #1a2332;
  --card-border: #2a3544;
  --text: #f0f4f8;
  --muted: #9aabbc;
  --primary: #06c167;
  --primary-hover: #05a557;
  --danger: #e74c3c;
  --danger-hover: #c0392b;
  --accent: #3d8bfd;
  --accent-alt: #a78bfa;
  --input-bg: #0d1218;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.app {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem 1rem 2.5rem;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 1.25rem;
  padding-top: 0.5rem;
}

.header h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.week-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.15rem 1.1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.card h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 600;
}

/* Form */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}

input[type="date"],
input[type="number"] {
  width: 100%;
  padding: 0.7rem 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  min-height: 44px;
}

input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  border-color: var(--primary);
}

input::placeholder {
  color: #5a6a7a;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1.15rem;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  width: 100%;
  background: var(--primary);
  color: #062416;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
  font-size: 0.875rem;
  min-height: 38px;
  padding: 0.4rem 0.75rem;
  white-space: nowrap;
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

.btn-icon {
  background: transparent;
  color: var(--danger);
  border: 1px solid transparent;
  min-height: 36px;
  min-width: 36px;
  padding: 0.35rem 0.5rem;
  font-size: 0.8rem;
  border-radius: 6px;
}

.btn-icon:hover {
  background: rgba(231, 76, 60, 0.15);
  border-color: var(--danger);
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.stat {
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 0.85rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
}

/* Targets */
.target {
  margin-bottom: 1.25rem;
}

.target:last-child {
  margin-bottom: 0;
}

.target-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.5rem;
}

.target-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.target-remaining {
  font-size: 0.85rem;
  color: var(--muted);
}

.target-remaining.met {
  color: var(--primary);
  font-weight: 600;
}

.progress-bar {
  height: 12px;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), #3dd68c);
  border-radius: 999px;
  transition: width 0.35s ease;
  max-width: 100%;
}

.progress-fill-alt {
  background: linear-gradient(90deg, var(--accent), var(--accent-alt));
}

.target-pct {
  margin: 0.4rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Shift list */
.list-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.list-header h2 {
  margin: 0;
}

.list-hint {
  margin: 0 0 0.85rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -0.25rem;
  padding: 0 0.25rem;
}

.shifts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 520px;
}

.shifts-table th,
.shifts-table td {
  padding: 0.65rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--card-border);
  white-space: nowrap;
}

.shifts-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.shifts-table td:last-child,
.shifts-table th:last-child {
  text-align: right;
  width: 1%;
}

.empty-msg {
  margin: 0.75rem 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.empty-msg.hidden,
.shifts-table.hidden {
  display: none;
}

/* Larger screens */
@media (min-width: 560px) {
  .app {
    padding: 1.5rem 1.25rem 3rem;
  }

  .form-grid {
    grid-template-columns: 1fr 1fr;
  }

  .form-grid label:last-of-type {
    grid-column: 1 / -1;
  }

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

  .btn-primary {
    width: auto;
    min-width: 160px;
  }
}

@media (min-width: 720px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .stat:nth-child(5),
  .stat:nth-child(6),
  .stat:nth-child(7) {
    /* keep remaining stats balanced on wide layouts */
  }
}

/* APPZUZU presentation; calculations and storage are unchanged. */
:root{--bg:#08090a;--card:#111315;--card-border:#3c2d24;--text:#f3eee8;--muted:#b7afa6;--primary:#e5aa79;--primary-hover:#f0bd8b;--accent:#c58c59;--accent-alt:#f0c28f;--input-bg:#0b0d0f;--radius:6px}
.driver-dashboard{max-width:1180px;padding:30px 24px 44px}
.driver-dashboard .header{text-align:left;padding:0;margin-bottom:22px}
.driver-dashboard .header h1{font:clamp(27px,3vw,38px)/1.12 Georgia,serif;letter-spacing:-.025em;max-width:850px;margin:10px 0 12px}
.driver-dashboard .dashboard-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.driver-dashboard .card{padding:22px;margin:0;min-width:0}
.driver-dashboard .card h2{font:23px/1.2 Georgia,serif;letter-spacing:-.02em}
.driver-dashboard .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.driver-dashboard .stat-value{font-size:21px}
.driver-dashboard .btn-primary{color:#1d130c;background:linear-gradient(135deg,#efb780,#c78451)}
.driver-dashboard .btn-primary:hover{background:#f0bd8b}
.driver-dashboard .progress-fill{background:linear-gradient(90deg,#b47d4e,#efba86)}
.driver-dashboard .progress-fill-alt{background:linear-gradient(90deg,#8e6548,#e7bd8b)}
.driver-dashboard .targets-card{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:16px 30px}
.driver-dashboard .targets-card h2{grid-column:1/-1;margin-bottom:0}
.driver-dashboard .target{margin:0}
.driver-dashboard .list-card{grid-column:1/-1}
.driver-dashboard .storage-note{font-size:13px;line-height:1.6;color:var(--muted);max-width:820px;margin:14px 0 0}
.driver-dashboard .app-access{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 12px}
.driver-dashboard .free-note{font-size:13px;color:var(--muted)}
.driver-dashboard .back-link{font-size:13px;min-height:44px;display:inline-flex;align-items:center;color:#e5aa79;text-decoration:none}
.driver-dashboard .btn-icon{min-height:44px;min-width:52px}
.driver-dashboard .form-grid{gap:14px}
.driver-dashboard .form-grid input{min-width:0;min-height:46px}
.driver-dashboard .shifts-table th{font-size:12px}
.driver-dashboard .btn:focus-visible{outline:2px solid #f0bd8b;outline-offset:4px}
@media(max-width:760px){.driver-dashboard{padding:24px 18px 36px}.driver-dashboard .dashboard-grid{grid-template-columns:1fr}.driver-dashboard .targets-card{grid-template-columns:1fr}.driver-dashboard .card{padding:20px 16px}.driver-dashboard .form-grid{grid-template-columns:1fr}.driver-dashboard .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.driver-dashboard .btn-primary{width:100%}}
@media(prefers-reduced-motion:reduce){.driver-dashboard .progress-fill,.driver-dashboard .btn{transition:none}}
