/* ===== APP PAGES ===== */
.page-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 40px 100px;
}

.page-header { margin-bottom: 40px; }

.page-subtitle {
  font-size: 16px;
  color: var(--fg-muted);
  line-height: 1.6;
  max-width: 520px;
  margin-top: 12px;
}

/* ===== NAV LINKS ===== */
.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}
.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-link:hover { color: var(--green); }

.btn-nav {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
  border: none;
}
.btn-nav--primary {
  background: var(--green);
  color: var(--white);
}
.btn-nav--primary:hover { background: var(--green-light); }

/* ===== FORMS ===== */
.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 4px 20px rgba(27, 67, 50, 0.07);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group { margin-bottom: 24px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.required { color: #DC2626; }

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--fg);
  background: var(--bg);
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}
.form-input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(27, 67, 50, 0.1);
}
.form-input::placeholder { color: #A8B5A0; }

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235C6B5E' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
  cursor: pointer;
}

.form-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 8px 0 28px;
}

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

/* ===== CHECKBOX GRID ===== */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--fg);
  cursor: pointer;
  padding: 10px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all 0.15s;
  user-select: none;
}
.checkbox-label:hover {
  background: #E8F0E4;
  border-color: var(--green-light);
}
.checkbox-label input[type="checkbox"] {
  display: none;
}
.checkbox-custom {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border);
  border-radius: 5px;
  flex-shrink: 0;
  transition: all 0.15s;
  position: relative;
}
.checkbox-label input:checked + .checkbox-custom {
  background: var(--green);
  border-color: var(--green);
}
.checkbox-label input:checked + .checkbox-custom::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 5px;
  height: 9px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  text-decoration: none;
  line-height: 1;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-primary {
  background: var(--green);
  color: var(--white);
  width: 100%;
}
.btn-primary:hover:not(:disabled) { background: var(--green-light); }

.btn-secondary {
  background: var(--bg-alt);
  color: var(--fg);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: #E8F0E4; }

.btn-success {
  background: var(--green);
  color: var(--white);
}
.btn-success:hover { background: var(--green-light); }

.btn-sm {
  padding: 8px 18px;
  font-size: 13px;
  border-radius: 8px;
}

/* ===== FORM MESSAGES ===== */
.form-message {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
}
.form-message--success {
  background: #DCFCE7;
  color: #166534;
  border: 1px solid #BBF7D0;
}
.form-message--error {
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FECACA;
}

.back-link {
  margin-top: 32px;
  font-size: 14px;
}
.back-link a {
  color: var(--fg-muted);
  text-decoration: none;
}
.back-link a:hover { color: var(--green); }

/* ===== JOB CARDS ===== */
.job-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.job-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(27, 67, 50, 0.05);
  transition: all 0.2s;
}

.job-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.job-service {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--fg);
  text-transform: capitalize;
}

.job-date {
  font-size: 12px;
  font-weight: 600;
  color: var(--amber);
  background: #FFF8EC;
  border: 1px solid #FDE68A;
  padding: 4px 10px;
  border-radius: 20px;
}

.job-address, .job-homeowner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--fg-muted);
  margin-bottom: 8px;
}

.job-homeowner { color: var(--fg-muted); font-size: 13px; }

.job-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.job-time {
  font-size: 12px;
  color: var(--fg-muted);
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 64px 40px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
}
.empty-state-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 8px;
}
.empty-state-body {
  font-size: 15px;
  color: var(--fg-muted);
  margin-bottom: 28px;
}

/* ===== PRO ID INPUT ===== */
.pro-id-input-section {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 24px;
  margin-top: 8px;
}
.pro-id-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}
.pro-id-row .form-input { flex: 1; max-width: 200px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .page-container { padding: 40px 24px 80px; }
  .form-card { padding: 28px 20px; }
  .form-row { grid-template-columns: 1fr; }
  .checkbox-grid { grid-template-columns: 1fr 1fr; }
  .nav-links .btn-nav { display: none; }
}