:root {
  --ink: #20302b; --muted: #74807b; --bg: #f5f4ef; --paper: #fff;
  --green: #286653; --green-2: #e1eee8; --orange: #d97b49; --orange-2: #f8e8db;
  --blue: #4b7380; --blue-2: #e2edf0; --red: #a8564e; --red-2: #f5e4e1;
  --line: #e5e5de; --shadow: 0 12px 35px rgba(36, 55, 47, .08);
  font-family: "Noto Sans TC", system-ui, sans-serif; color: var(--ink); background: var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
.auth-loading .portal, .auth-loading .sitter-shell { visibility: hidden; }
.auth-gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #f3f6f3; color: #20352e; font-family: "Noto Sans TC", sans-serif; }
.auth-gate section { width: min(420px, 100%); padding: 36px 28px; border-radius: 24px; background: #fff; box-shadow: 0 18px 50px rgba(31,79,65,.13); text-align: center; }
.auth-gate section > span { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 18px; border-radius: 18px; color: #fff; background: #2c6b58; }
.auth-gate h1 { margin: 0 0 10px; font-size: 25px; }
.auth-gate p { margin: 0 0 22px; color: #718078; line-height: 1.7; }
.auth-gate a { display: inline-block; padding: 12px 18px; border-radius: 12px; color: #fff; background: #2c6b58; text-decoration: none; font-weight: 700; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--bg); }
button, input, select, textarea { font: inherit; }
button { border: 0; color: inherit; cursor: pointer; }
svg { display: block; }
.portal { min-height: 100vh; }
.side-nav { position: fixed; z-index: 20; inset: 0 auto 0 0; width: 235px; display: flex; flex-direction: column; padding: 26px 18px; color: #dbe8e3; background: #1f4f41; }
.portal-brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 30px; color: white; text-decoration: none; }
.portal-brand .mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 13px; color: var(--green); font-size: 23px; background: #f2dcc5; }
.portal-brand strong { display: block; font-size: 18px; }.portal-brand small { display: block; margin-top: 2px; font-size: 9px; letter-spacing: .18em; opacity: .65; }
.nav-group { display: grid; gap: 5px; }
.nav-group button { display: flex; align-items: center; gap: 11px; padding: 12px 13px; text-align: left; border-radius: 11px; color: rgba(255,255,255,.65); font-size: 15px; background: transparent; }
.nav-group button:hover, .nav-group button.active { color: white; background: rgba(255,255,255,.1); }
.nav-icon { width: 21px; text-align: center; font-size: 18px; }
.side-profile { display: grid; grid-template-columns: 38px 1fr; gap: 10px; align-items: center; margin-top: auto; padding: 15px 9px 0; border-top: 1px solid rgba(255,255,255,.12); }
.profile-avatar { width: 38px; height: 38px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; color: white; font-weight: 700; background: #c48362; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }.side-profile p { min-width: 0; margin: 0; }.side-profile strong, .side-profile small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.side-profile strong { font-size: 14px; }.side-profile small { margin-top: 3px; font-size: 10px; opacity: .6; }
.portal-main { margin-left: 235px; }
.portal-topbar { position: sticky; z-index: 15; top: 0; height: 70px; display: flex; align-items: center; justify-content: space-between; padding: 0 32px; border-bottom: 1px solid rgba(35,50,45,.05); background: rgba(245,244,239,.9); backdrop-filter: blur(15px); }
.portal-topbar h1 { margin: 0; font-size: 21px; }.portal-topbar p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.top-actions { display: flex; align-items: center; gap: 9px; }.test-badge { padding: 6px 9px; border-radius: 20px; color: #8c623e; font-size: 10px; font-weight: 700; background: #f8e5c8; }.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: white; }
.portal-view { display: none; padding: 28px 32px 45px; }.portal-view.active { display: block; animation: fade .25s ease; } @keyframes fade { from { opacity: 0; transform: translateY(4px); } }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }.view-head h2 { margin: 0; font-size: 28px; }.view-head p { margin: 5px 0 0; color: var(--muted); font-size: 14px; }.view-head-actions { display: flex; gap: 8px; }
.primary, .secondary, .danger, .small-action { padding: 10px 15px; border-radius: 11px; font-size: 13px; font-weight: 700; }.primary { color: white; background: var(--green); }.secondary { color: var(--green); border: 1px solid #cfdad5; background: white; }.danger { color: var(--red); background: var(--red-2); }.small-action { padding: 8px 11px; color: var(--green); background: var(--green-2); }
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
.stat-card { position: relative; min-width: 0; padding: 18px; overflow: hidden; border: 1px solid rgba(34,48,43,.04); border-radius: 18px; background: var(--paper); box-shadow: var(--shadow); }.stat-card > span { width: 37px; height: 37px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 12px; color: var(--green); background: var(--green-2); }.stat-card:nth-child(2) > span { color: var(--orange); background: var(--orange-2); }.stat-card:nth-child(3) > span { color: var(--blue); background: var(--blue-2); }.stat-card small { color: var(--muted); font-size: 12px; }.stat-card strong { display: block; margin-top: 4px; font-size: 29px; }.stat-card em { position: absolute; right: 15px; bottom: 18px; color: var(--green); font-size: 10px; font-style: normal; }
.dashboard-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; margin-top: 17px; }
.panel { min-width: 0; padding: 20px; border: 1px solid rgba(34,48,43,.05); border-radius: 18px; background: white; box-shadow: var(--shadow); }.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }.panel-head h3 { margin: 0; font-size: 16px; }.panel-head button { color: var(--green); font-size: 12px; background: transparent; }
.schedule-list, .activity-list { display: grid; gap: 9px; }.schedule-item { display: grid; grid-template-columns: 48px 38px 1fr auto; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: #f7f6f2; }.schedule-time { color: var(--green); font-size: 13px; font-weight: 700; }.mini-avatar { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 50%; color: white; font-size: 13px; font-weight: 700; }.schedule-item p { min-width: 0; margin: 0; }.schedule-item strong, .schedule-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.schedule-item strong { font-size: 13px; }.schedule-item small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.status { display: inline-block; padding: 5px 8px; border-radius: 15px; font-size: 10px; font-weight: 700; white-space: nowrap; }.status.pending { color: #996038; background: #f8e8ce; }.status.confirmed,.status.accepted { color: var(--green); background: var(--green-2); }.status.in_progress { color: var(--blue); background: var(--blue-2); }.status.completed { color: #6f657e; background: #ece8f1; }.status.cancelled,.status.rejected,.status.voided { color: var(--red); background: var(--red-2); }
.abnormal-flag { display: inline-block; margin-left: 5px; padding: 3px 6px; border-radius: 10px; color: #9a4d3f; font-size: 12px; font-weight: 700; background: #fde5df; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.pagination span { color: var(--muted); font-size: 14px; }
.pagination button:disabled { opacity: .45; cursor: not-allowed; }
.activity-item { display: grid; grid-template-columns: 8px 1fr; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--line); }.activity-dot { width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: var(--green); }.activity-dot-error { background: var(--red); }.activity-item p { margin: 0; font-size: 12px; line-height: 1.5; }.activity-item small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 15px; }.search { min-width: 210px; flex: 1; }.control { min-height: 40px; padding: 9px 12px; outline: 0; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: white; }.control:focus { border-color: var(--green); }.toolbar select { min-width: 120px; font-size: 13px; }
.data-card { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: white; box-shadow: var(--shadow); }.data-table { width: 100%; border-collapse: collapse; }.data-table th { padding: 11px 14px; color: var(--muted); font-size: 10px; font-weight: 600; text-align: left; background: #f8f7f3; }.data-table td { padding: 13px 14px; border-top: 1px solid var(--line); font-size: 12px; vertical-align: middle; }.data-table td strong { display: block; font-size: 13px; }.data-table td small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }.row-actions { display: flex; gap: 5px; }.row-actions button { padding: 6px 8px; border-radius: 8px; font-size: 10px; background: #f0f3f1; }.row-actions .approve { color: var(--green); background: var(--green-2); }.row-actions .reject { color: var(--red); background: var(--red-2); }
.staff-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }.staff-card { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: var(--shadow); }.staff-card-head { display: grid; grid-template-columns: 50px 1fr auto; gap: 11px; align-items: center; }.staff-card .mini-avatar { width: 50px; height: 50px; font-size: 18px; }.staff-card h3 { margin: 0; font-size: 15px; }.staff-card p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }.staff-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); }.staff-meta div { padding: 9px; border-radius: 10px; background: #f7f6f2; }.staff-meta small,.staff-meta strong { display: block; }.staff-meta small { color: var(--muted); font-size: 9px; }.staff-meta strong { margin-top: 3px; font-size: 13px; }.staff-card-actions { display: flex; gap: 7px; margin-top: 12px; }.staff-card-actions button { flex: 1; }
.empty { padding: 38px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.drawer-backdrop { position: fixed; z-index: 90; inset: 0; display: none; background: rgba(27,39,34,.35); }.drawer-backdrop.open { display: block; }.drawer { position: fixed; z-index: 100; top: 0; right: 0; width: min(430px,100%); height: 100vh; padding: 25px; overflow-y: auto; background: white; box-shadow: -20px 0 60px rgba(26,38,33,.18); transform: translateX(100%); transition: .25s ease; }.drawer.open { transform: translateX(0); }.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 23px; }.drawer-head h2 { margin: 0; font-size: 21px; }.drawer-close { width: 35px; height: 35px; border-radius: 50%; background: #f1f1ed; }.detail-section { margin-top: 20px; }.detail-section h3 { margin: 0 0 9px; color: var(--muted); font-size: 10px; letter-spacing: .1em; }.detail-box { padding: 15px; border-radius: 13px; background: #f7f6f2; }.detail-row { display: grid; grid-template-columns: 85px 1fr; gap: 8px; padding: 7px 0; font-size: 12px; }.detail-row span { color: var(--muted); }.drawer-actions { display: flex; gap: 8px; margin-top: 22px; }.drawer-actions button { flex: 1; }
.detail-row .control { width: 100%; min-width: 0; }.detail-row textarea.control { resize: vertical; }
.mobile-nav { display: none; }

/* Sitter mobile app */
.sitter-shell { width: min(100%,560px); min-height: 100vh; margin: 0 auto; padding-bottom: 88px; background: #f7f5ef; box-shadow: 0 0 60px rgba(34,48,43,.09); }.sitter-header { padding: 24px 22px 18px; color: white; background: var(--green); border-radius: 0 0 27px 7px; }.sitter-header-top { display: flex; justify-content: space-between; align-items: center; }.sitter-header .portal-brand { padding: 0; }.sitter-user { width: 42px; height: 42px; display: grid; place-items: center; overflow: hidden; border: 2px solid rgba(255,255,255,.5); border-radius: 50%; background: #c48362; }.sitter-user img { width: 100%; height: 100%; object-fit: cover; }.sitter-greeting { margin-top: 28px; }.sitter-greeting small { font-size: 13px; opacity: .7; }.sitter-greeting h1 { margin: 5px 0 0; font-size: 31px; }.today-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 20px; }.today-summary div { padding: 12px 8px; text-align: center; border-radius: 13px; background: rgba(255,255,255,.1); }.today-summary strong,.today-summary small { display: block; }.today-summary strong { font-size: 21px; }.today-summary small { margin-top: 3px; font-size: 9px; opacity: .65; }.sitter-view { display: none; padding: 25px 20px; }.sitter-view.active { display: block; }.section-title { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 14px; }.section-title h2 { margin: 0; font-size: 21px; }.section-title small { color: var(--muted); font-size: 12px; }.task-list { display: grid; gap: 13px; }.task-card { overflow: hidden; border: 1px solid var(--line); border-radius: 19px 19px 7px 19px; background: white; box-shadow: var(--shadow); }.task-time { display: flex; align-items: center; justify-content: space-between; padding: 12px 15px; background: #eef3f0; }.task-time strong { color: var(--green); font-size: 16px; }.task-body { padding: 16px; }.task-main { display: grid; grid-template-columns: 48px 1fr; gap: 12px; }.pet-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; color: var(--green); font-size: 24px; background: var(--green-2); }.task-main h3 { margin: 0; font-size: 16px; }.task-main p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }.task-address { display: flex; gap: 8px; margin: 14px 0; padding: 11px; border-radius: 10px; color: #55625d; font-size: 12px; line-height: 1.5; background: #f7f6f2; }.task-actions { display: flex; gap: 7px; }.task-actions button { flex: 1; }.calendar-picker { margin: 0 0 19px; }.calendar-weekdays,.calendar-week { display: grid; grid-template-columns: repeat(7,1fr); gap: 5px; margin-bottom: 5px; }.calendar-weekdays span { display: block; text-align: center; color: var(--muted); font-size: 10px; font-weight: 700; }.calendar-cell { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2px; border: 1px solid var(--line); border-radius: 12px; background: white; }.calendar-cell.empty { visibility: hidden; border: none; }.calendar-cell em { display: block; margin-bottom: 1px; color: var(--muted); font-size: 8px; font-style: normal; }.calendar-cell strong { font-size: 15px; }.calendar-cell.active { color: white; border-color: var(--green); background: var(--green); }.calendar-cell.active em { color: rgba(255,255,255,.7); }.availability-panel { padding: 17px; border-radius: 18px; background: white; box-shadow: var(--shadow); }.slot-editor { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 13px; }.slot-toggle { padding: 10px 5px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: 13px; background: white; }.slot-toggle.active { color: var(--green); border-color: var(--green); background: var(--green-2); }.slot-toggle.booked { color: #aaa; text-decoration: line-through; background: #f2f1ed; cursor: not-allowed; }.profile-card { padding: 19px; border-radius: 19px; background: white; box-shadow: var(--shadow); }.profile-hero { text-align: center; }.profile-hero .mini-avatar { width: 72px; height: 72px; margin: auto; font-size: 26px; }.profile-hero h2 { margin: 11px 0 3px; }.profile-hero p { margin: 0; color: var(--muted); font-size: 12px; }.profile-list { margin-top: 19px; border-top: 1px solid var(--line); }.profile-list .detail-row { padding: 11px 0; border-bottom: 1px solid var(--line); }.sitter-bottom { position: fixed; z-index: 30; left: 50%; bottom: 0; width: min(100%,560px); height: calc(72px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(3,1fr); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: rgba(255,255,255,.95); transform: translateX(-50%); backdrop-filter: blur(12px); }.sitter-bottom button { display: flex; align-items: center; justify-content: center; gap: 4px; flex-direction: column; color: #929995; font-size: 10px; background: transparent; }.sitter-bottom button span { font-size: 21px; }.sitter-bottom button.active { color: var(--green); font-weight: 700; }
.service-tabs { display: flex; gap: 8px; margin-bottom: 4px; }
.service-tabs button { flex: 1; padding: 9px 5px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: 13px; font-weight: 600; background: white; }
.service-tabs button.active { color: white; border-color: var(--green); background: var(--green); }
.legend-dot { display: inline-block; width: 8px; height: 8px; margin: 0 3px 0 0; border-radius: 50%; vertical-align: middle; }
.legend-dot.cal-open { background: var(--green); }
.legend-dot.cal-closed { background: #d98a5f; }
.calendar-cell.cal-open::after, .calendar-cell.cal-closed::after { content: ""; width: 6px; height: 6px; margin-top: 2px; border-radius: 50%; }
.calendar-cell.cal-open::after { background: var(--green); }
.calendar-cell.cal-closed::after { background: #d98a5f; }
.calendar-cell.active.cal-open::after, .calendar-cell.active.cal-closed::after { background: rgba(255,255,255,.85); }
.toast { position: fixed; z-index: 150; left: 50%; bottom: 90px; max-width: calc(100% - 35px); padding: 10px 16px; border-radius: 18px; color: white; font-size: 12px; text-align: center; background: rgba(31,47,41,.92); opacity: 0; pointer-events: none; transform: translate(-50%,10px); transition: .2s; }.toast.show { opacity: 1; transform: translate(-50%,0); }

@media (max-width: 1000px) { .stats-grid { grid-template-columns: repeat(2,1fr); }.staff-grid { grid-template-columns: repeat(2,1fr); }.dashboard-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .side-nav { display: none; }.portal-main { margin-left: 0; padding-bottom: 66px; }.portal-topbar { height: 62px; padding: 0 17px; }.portal-view { padding: 20px 15px 35px; }.portal-topbar h1 { font-size: 17px; }.portal-topbar p { display: none; }.view-head { align-items: flex-start; flex-direction: column; margin-bottom: 17px; }.view-head h2 { font-size: 24px; }.stats-grid { gap: 9px; }.stat-card { padding: 14px; }.stat-card > span { margin-bottom: 12px; }.stat-card strong { font-size: 24px; }.stat-card em { display: none; }.dashboard-grid { gap: 10px; }.panel { padding: 15px; }.mobile-nav { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; height: 62px; display: grid; grid-template-columns: repeat(5,1fr); border-top: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }.mobile-nav button { display: flex; align-items: center; justify-content: center; gap: 3px; flex-direction: column; color: #8c9691; font-size: 9px; background: transparent; }.mobile-nav button span { font-size: 18px; }.mobile-nav button.active { color: var(--green); font-weight: 700; }.data-card { overflow-x: auto; }.data-table { min-width: 680px; }.staff-grid { grid-template-columns: 1fr; }.schedule-item { grid-template-columns: 44px 34px 1fr; }.schedule-item .status { grid-column: 3; width: fit-content; }.test-badge { display: none; }
}

/* Readable typography for owner and sitter workspaces. */
body { font-size: 18px; }
.auth-gate p { font-size: 16px; line-height: 1.65; }
.portal-brand strong { font-size: 21px; }
.portal-brand small { font-size: 12px; }
.nav-group button { font-size: 17px; }
.side-profile strong { font-size: 16px; }
.side-profile small { font-size: 13px; }
.portal-topbar h1 { font-size: 23px; }
.portal-topbar p { font-size: 14px; }
.test-badge { font-size: 13px; }
.view-head h2 { font-size: 31px; }
.view-head p { font-size: 16px; }
.primary, .secondary, .danger, .small-action { font-size: 15px; }
.stat-card small { font-size: 14px; }
.stat-card em { font-size: 13px; }
.panel-head h3 { font-size: 20px; }
.panel-head button { font-size: 15px; }
.schedule-time { font-size: 15px; }
.schedule-item strong { font-size: 16px; }
.schedule-item small { font-size: 14px; }
.status { font-size: 13px; }
.activity-item p { font-size: 15px; }
.activity-item small { font-size: 13px; }
.control, .toolbar select { font-size: 16px; }
.data-table th { font-size: 13px; }
.data-table td { font-size: 15px; }
.data-table td strong { font-size: 16px; }
.data-table td small { font-size: 13px; }
.row-actions button { font-size: 14px; }
.staff-card h3 { font-size: 18px; }
.staff-card p { font-size: 14px; }
.staff-meta small { font-size: 13px; }
.staff-meta strong { font-size: 16px; }
.empty { font-size: 16px; }
.drawer-head h2 { font-size: 24px; }
.detail-section h3 { font-size: 14px; }
.detail-row { font-size: 16px; }
.sitter-greeting small { font-size: 15px; }
.today-summary small { font-size: 13px; }
.section-title h2 { font-size: 24px; }
.section-title small { font-size: 14px; }
.task-time strong { font-size: 18px; }
.task-main h3 { font-size: 18px; }
.task-main p, .task-address { font-size: 15px; }
.calendar-cell em { font-size: 9px; }
.calendar-cell strong { font-size: 17px; }
.slot-toggle { font-size: 15px; }
.profile-hero p { font-size: 15px; }
.sitter-bottom button { font-size: 13px; }
.toast { font-size: 15px; }

@media (max-width: 720px) {
  .portal-topbar h1 { font-size: 21px; }
  .view-head h2 { font-size: 28px; }
  .mobile-nav button { font-size: 12px; }
}

