/* Cleaner Portal Styles
   Navy/gold palette consistent with admin-*.ejs inline styles */

:root {
  --navy: #1a2744;
  --navy-light: #2a3d5c;
  --gold: #d4af37;
  --gold-light: #e5c55a;
  --white: #ffffff;
  --gray-50: #f9f9f9;
  --gray-100: #f4f4f4;
  --gray-200: #e8e8e8;
  --gray-500: #888888;
  --gray-700: #555555;
  --green: #1a7a4a;
  --red: #dc2626;
}

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

body {
  font-family: Arial, sans-serif;
  background: var(--gray-100);
  color: #333;
  min-height: 100vh;
}

/* ─── Portal Container ─────────────────────────────────────────────────────── */

.portal-container {
  max-width: 480px;
  margin: 60px auto;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.10);
  padding: 40px 36px;
}

.portal-container-wide {
  max-width: 800px;
}

.portal-container-narrow {
  max-width: 520px;
}

/* ─── Portal Header ────────────────────────────────────────────────────────── */

.portal-header {
  text-align: center;
  margin-bottom: 32px;
}

.portal-header h1 {
  color: var(--navy);
  font-size: 22px;
  margin-bottom: 6px;
}

.portal-header p {
  color: var(--gray-500);
  font-size: 14px;
}

.portal-header-row {
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.portal-header-row h1 {
  font-size: 26px;
  color: var(--navy);
}

.cleaner-badge {
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  margin-top: 6px;
}

/* ─── Logo Mark ───────────────────────────────────────────────────────────── */

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--navy);
  color: var(--gold);
  font-size: 24px;
  font-weight: bold;
  border-radius: 10px;
  margin-bottom: 16px;
}

.logo-mark-sm {
  width: 32px;
  height: 32px;
  font-size: 16px;
  border-radius: 7px;
  margin-bottom: 0;
}

/* ─── Navigation ──────────────────────────────────────────────────────────── */

.portal-nav {
  background: var(--navy);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 15px;
  font-weight: bold;
  margin-right: 8px;
}

.nav-links {
  display: flex;
  gap: 4px;
  flex: 1;
}

.nav-link {
  color: rgba(255,255,255,0.70);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
  background: rgba(255,255,255,0.10);
  color: var(--white);
}

.nav-link.active {
  background: rgba(255,255,255,0.15);
  color: var(--white);
}

.nav-form {
  margin-left: auto;
}

/* ─── Forms ───────────────────────────────────────────────────────────────── */

.portal-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.form-group label {
  font-size: 13px;
  font-weight: bold;
  color: var(--navy);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: 7px;
  font-size: 15px;
  color: #222;
  background: var(--white);
  transition: border-color 0.15s;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--navy);
}

.form-group input:disabled {
  background: var(--gray-100);
  color: var(--gray-500);
  cursor: not-allowed;
}

.field-hint {
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.5;
}

.required {
  color: var(--red);
}

/* ─── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background 0.15s, opacity 0.15s;
}

.btn-primary {
  background: var(--gold);
  color: var(--navy);
}

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

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-block {
  width: 100%;
  padding: 12px;
  font-size: 15px;
}

.btn-ghost {
  background: transparent;
  color: rgba(255,255,255,0.80);
  border: 1px solid rgba(255,255,255,0.30);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.10);
  color: var(--white);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

/* ─── Alerts ───────────────────────────────────────────────────────────────── */

.alert {
  padding: 12px 16px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: bold;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
}

/* ─── Dashboard ───────────────────────────────────────────────────────────── */

.dashboard-section {
  margin-bottom: 32px;
}

.section-title {
  font-size: 15px;
  font-weight: bold;
  color: var(--navy);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--gray-200);
}

.quick-stats {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.stat-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 12px 20px;
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 28px;
  font-weight: bold;
  color: var(--navy);
  line-height: 1;
}

.stat-label {
  display: block;
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 4px;
}

/* ─── Earnings ─────────────────────────────────────────────────────────────── */

.earnings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.earnings-card {
  background: var(--navy);
  color: var(--white);
  border-radius: 8px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.earnings-month {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
}

.earnings-amount {
  font-size: 20px;
  font-weight: bold;
  color: var(--gold);
}

/* ─── Job Cards ───────────────────────────────────────────────────────────── */

.jobs-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.job-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.job-id {
  font-size: 12px;
  color: var(--gray-500);
}

.job-customer {
  font-size: 16px;
  font-weight: bold;
  color: var(--navy);
}

.job-service {
  font-size: 13px;
  color: var(--gray-700);
}

.job-details {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--gray-700);
}

.job-detail {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.job-address {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
}

/* ─── Status Badges ────────────────────────────────────────────────────────── */

.status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
}

.status-booked { background: #e8f0fe; color: #1a56db; }
.status-in_progress { background: #fef3c7; color: #92400e; }
.status-completed { background: #d1fae5; color: #065f46; }
.status-paid { background: var(--green); color: white; }

/* ─── Empty State ─────────────────────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 40px;
  color: var(--gray-500);
  font-size: 15px;
}

/* ─── Profile Meta ─────────────────────────────────────────────────────────── */

.profile-meta {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-200);
  font-size: 12px;
  color: var(--gray-500);
}

.profile-meta p {
  margin-bottom: 4px;
}

/* ─── Portal Footer ───────────────────────────────────────────────────────── */

.portal-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--gray-500);
}

.portal-footer a {
  color: var(--navy);
  font-weight: bold;
  text-decoration: none;
}

.portal-footer a:hover {
  text-decoration: underline;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .portal-container {
    margin: 20px 16px;
    padding: 28px 20px;
  }

  .portal-header-row {
    flex-direction: column;
    gap: 14px;
  }

  .quick-stats {
    width: 100%;
  }

  .stat-box {
    flex: 1;
  }

  .portal-nav {
    padding: 0 16px;
    gap: 10px;
  }

  .nav-link {
    font-size: 13px;
    padding: 6px 10px;
  }
}