.portal-app { min-height: 100vh; display: flex; flex-direction: column; background: #f4f7f9; }
.portal-header {
  background: #0b5f7a; color: #fff; padding: 12px 20px; display: flex; align-items: center; gap: 10px;
  font-size: 18px; font-weight: 700;
}
.portal-header .btn.small { background: transparent; color: #cfeaf2; border-color: rgba(255,255,255,0.4); }
.portal-header .btn.small:hover { background: rgba(255,255,255,0.1); }
.portal-main { padding: 20px; max-width: 640px; margin: 0 auto; width: 100%; }
.portal-card {
  background: #fff; border-radius: 10px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  display: flex; flex-direction: column; gap: 12px; max-width: 360px; margin: 40px auto;
}
.portal-card h1 { font-size: 19px; margin: 0 0 4px; }
.portal-card label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #46606b; }
.portal-error {
  background: #fbe7e6; color: #a3382f; border-radius: 6px; padding: 8px 10px; font-size: 13px;
}
.portal-sub { color: #5a7078; font-size: 14px; margin: 0 0 14px; }
.hidden { display: none !important; }

.job-card {
  background: #fff; border-radius: 8px; padding: 14px 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  margin-bottom: 10px;
}
.job-card .job-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.job-card .job-date { font-size: 13px; color: #0b5f7a; font-weight: 700; }
.job-card .job-customer { font-size: 16px; font-weight: 600; margin-top: 2px; }
.job-card .job-meta { font-size: 13px; color: #5a7078; margin-top: 4px; }
/* Admin-set notes about the property itself (gate codes, pet warnings, access
   instructions, etc.) — set apart from the plain gray meta lines and from a
   one-off job-specific note, since a tech shouldn't have to hunt for these. */
.job-card .job-property-note {
  color: #7a4a00; background: #fff6e6; border: 1px solid #ffe2a8;
  border-radius: 6px; padding: 6px 8px; margin-top: 6px;
}
.job-card .job-actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.job-photos { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.job-photo { width: 90px; text-align: center; }
.job-photo img { width: 90px; height: 90px; object-fit: cover; border-radius: 6px; display: block; }
.job-photo-label { font-size: 11px; color: #5a7078; text-transform: capitalize; margin-top: 2px; }
.job-photo .btn { margin-top: 2px; padding: 2px 6px; font-size: 11px; }

.job-addons { margin-top: 10px; }
.job-addon-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.addon-chip {
  border: 1px solid #cfe0e5; background: #f4f9fa; color: #0b5f7a; border-radius: 999px;
  padding: 5px 12px; font-size: 12px; font-weight: 600; cursor: pointer;
}
.addon-chip:hover { background: #e8f2f4; }
.addon-chip.added { background: #0b5f7a; color: #fff; border-color: #0b5f7a; }

.calendar-form-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }

.owner-tabs {
  display: flex; gap: 4px; margin: 16px 0 20px; border-bottom: 1px solid #e4edf0;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.owner-tab-btn {
  background: transparent; border: none; border-bottom: 2px solid transparent; cursor: pointer;
  padding: 10px 14px; font-size: 14px; font-weight: 600; color: #6c8189; white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
}
.owner-tab-btn:hover { color: #0b5f7a; }
.owner-tab-btn.active { color: #0b5f7a; border-bottom-color: #0b5f7a; }
.owner-tab-btn .tab-count {
  background: #0b5f7a; color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700;
  padding: 1px 7px; line-height: 16px;
}
.owner-tab-panel { animation: fadein 0.15s ease; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

.owner-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 8px; }
.owner-summary-card {
  background: #fff; border-radius: 10px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  display: flex; flex-direction: column; gap: 4px;
}
.owner-summary-card .value { font-size: 22px; font-weight: 700; color: #0b5f7a; }
.owner-summary-card .label { font-size: 13px; color: #5a7078; }
.owner-summary-card .detail { font-size: 12px; color: #7a8f97; margin-top: 2px; }
.calendar-form-row label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #46606b; }
.owner-list-item {
  background: #fff; border-radius: 8px; padding: 12px 14px; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 8px;
}

/* Owner portal's service calendar (#svcCalGrid) reuses the admin's .cal-grid/.cal-cell
   classes for visual consistency, but scoped tighter here — the admin calendar has a
   sidebar and more chrome around it, while this one is meant to sit inline in a
   narrower content column, so the same cell size read as oversized. These overrides
   only match inside #svcCalGrid, so the shared admin calendar is untouched. */
#svcCalGrid, #techCalGrid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
#svcCalGrid .cal-cell, #techCalGrid .cal-cell { min-height: 56px; padding: 5px 6px; gap: 2px; border-radius: 8px; }
#svcCalGrid .cal-daynum, #techCalGrid .cal-daynum { font-size: 11px; width: 18px; height: 18px; }
#svcCalGrid .cal-appt-chip, #techCalGrid .cal-appt-chip { font-size: 10px; padding: 2px 5px; border-left-width: 2px; }
@media (max-width: 640px) {
  #svcCalGrid .cal-cell, #techCalGrid .cal-cell { min-height: 44px; font-size: 10px; padding: 4px; }
  #svcCalGrid .cal-daylabel, #techCalGrid .cal-daylabel { font-size: 9px; }
}

/* Booking Gantt calendar (vacation properties) is the densest view in either portal —
   7 columns of colored, labeled bars. Shrinks further than styles.css's own 700px
   breakpoint once the portal's own (narrower, max-width:640px) column gets tight. */
@media (max-width: 480px) {
  .gantt-bar { font-size: 8px; padding: 0 3px; height: 15px; }
  .gantt-daynum { width: 14px; height: 14px; font-size: 9px; }
  .gantt-legend { font-size: 11px; gap: 8px; }
}

/* Tap targets: owner/tech portal buttons are used almost entirely on phones, so these
   are sized for a thumb rather than a cursor — .btn.small's base 4px/10px padding (see
   styles.css) reads fine on a desktop mouse but is a ~22-24px target on a touchscreen,
   under the ~44px guideline, for things like Log out, Edit account, Edit/Delete
   property, and Cancel visit. Scoped to .portal-app so this doesn't change the admin
   dashboard's denser desktop button sizing. */
.portal-app .btn.small { padding: 8px 12px; font-size: 13px; }
.portal-app .btn-close { padding: 6px; min-width: 36px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; }
.owner-tab-btn { padding: 12px 14px; }
.addon-chip { padding: 8px 14px; }
