:root {
  --bg: #f9fafb;
  --surface: #ffffff;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --text: #111827;
  --text-muted: #6b7280;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --green: #16a34a;
  --red: #dc2626;
  --yellow: #d97706;
  --orange: #ea580c;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
  padding-bottom: 48px;
}

.header {
  margin-bottom: 24px;
}

.header-split {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
}

.subtitle {
  display: block;
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 2px;
}

.tech-name {
  color: var(--text);
  font-size: 14px;
  margin-top: 4px;
}

.sign-out {
  color: var(--accent);
  font-size: 14px;
  text-decoration: none;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
}

.sign-out:active { color: var(--accent-hover); }

.title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

.lede {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 24px;
}

.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--red);
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
}

.empty {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  color: var(--text-muted);
  font-size: 15px;
  text-align: center;
}

.sign-in-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

input[type="tel"] {
  font-size: 16px;
  padding: 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}

input[type="tel"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

input[type="hidden"] {
  display: none;
}

.btn {
  font-size: 16px;
  font-weight: 500;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  width: 100%;
  font-family: inherit;
}

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

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

.btn[disabled] {
  background: var(--green);
  color: #fff;
  cursor: default;
}

.job-list {
  display: flex;
  flex-direction: column;
}

.job-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.badge-urgency { background: #f3f4f6; color: var(--text-muted); }
.badge-urgency.urgency-emergency { background: #fef2f2; color: var(--red); }
.badge-urgency.urgency-high { background: #fff7ed; color: var(--orange); }
.badge-urgency.urgency-normal { background: #eff6ff; color: var(--accent); }

.badge-status { background: #f3f4f6; color: var(--text-muted); }
.badge-status.status-pending { background: #f3f4f6; color: var(--text-muted); }
.badge-status.status-assigned { background: #eff6ff; color: var(--accent); }
.badge-status.status-en_route { background: #fef3c7; color: var(--yellow); }
.badge-status.status-on_site { background: #ede9fe; color: #6d28d9; }

.job-type {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  text-transform: capitalize;
}

.customer {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}

.address {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.description {
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.start-form {
  margin-top: 8px;
}

.started {
  margin-top: 12px;
  padding: 10px 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.started-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.started-time {
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
}

.job-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.detail-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.detail-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.detail-value {
  font-size: 16px;
  color: var(--text);
}

.chevron {
  float: right;
  color: var(--text-muted);
  font-size: 20px;
  line-height: 1;
  margin-top: -4px;
}

.badge-status.status-started { background: #f0fdf4; color: var(--green); }
