/* Private: a web adaptation of Apple's clarity, typography and touch-target guidance. */
:root {
  color-scheme: light;
  --blue: #1982c4;
  --action: #126da8;
  --action-hover: #0b578b;
  --navy: #15344d;
  --ink: #1d1d1f;
  --muted: #565e68;
  --line: #dce1e6;
  --control-line: #87929d;
  --bg: #f5f5f7;
  --pale: #eaf4fb;
  --danger: #b42318;
  --radius: 18px;
}
* { box-sizing: border-box; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 1000; min-height: 44px; padding: 12px 18px; border-radius: 10px; color: #fff; background: var(--action); transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); }
html { font-size: 17px; -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); background: var(--bg); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; font-size: 1rem; line-height: 1.5; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; outline-offset: 4px; }
button { cursor: pointer; transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease; }
button:disabled { opacity: .6; cursor: not-allowed; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--action); }
a { color: var(--action); text-underline-offset: 3px; }
img, svg { max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 2rem; line-height: 1.18; letter-spacing: -.035em; font-weight: 700; margin-bottom: 12px; }
h2 { font-size: 1.3rem; line-height: 1.3; letter-spacing: -.02em; margin-bottom: 10px; font-weight: 650; }
h3 { font-size: 1.06rem; line-height: 1.4; margin-bottom: 6px; font-weight: 650; }
p { line-height: 1.6; }
.muted { color: var(--muted); margin-bottom: 0; }
.eyebrow { color: var(--action); font-size: 14px; line-height: 1.5; font-weight: 650; letter-spacing: .075em; margin-bottom: 12px; }
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 272px; position: fixed; inset: 0 auto 0 0; height: 100vh; height: 100dvh; padding: 28px 20px 20px; display: flex; flex-direction: column; flex-shrink: 0; overflow-y: auto; background: #f8f9fb; border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-size: 28px; line-height: 1.15; letter-spacing: -.035em; font-weight: 700; min-width: 0; }
.brand img { width: 48px; height: 48px; flex-shrink: 0; object-fit: contain; border-radius: 12px; }
.brand-sub { display: block; margin-top: 7px; font-size: 14px; line-height: 1.35; letter-spacing: .025em; font-weight: 500; color: var(--muted); }
.nav-label { margin: 34px 12px 14px; font-size: 14px; font-weight: 600; letter-spacing: .055em; color: var(--muted); }
.nav-item { width: 100%; min-height: 50px; margin: 0 0 6px; padding: 12px 14px; border: 0; border-radius: 12px; background: transparent; color: #424a53; display: flex; align-items: center; gap: 12px; text-align: left; font-size: 16px; font-weight: 550; line-height: 1.4; }
.nav-item span { flex: 0 0 24px; text-align: center; font-size: 23px; line-height: 1; }
.nav-item:hover { background: #e9eef3; }
.nav-item.active { background: #dfedf8; color: #0e5f95; font-weight: 650; }
.sidebar-foot { margin: 18px 4px; color: var(--muted); font-size: 14px; line-height: 1.4; letter-spacing: .015em; }
.status-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: #287d57; }
.main { width: calc(100% - 272px); min-width: 0; margin-left: 272px; }
.topbar { position: sticky; top: 0; z-index: 30; min-height: 88px; padding: 20px 32px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px 24px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); font-size: 16px; }
.breadcrumb { color: var(--muted); line-height: 1.5; }
.breadcrumb span { margin: 0 10px; color: #6e7780; }
.breadcrumb strong { color: var(--ink); font-weight: 600; }
.top-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--ink); min-width: 0; }
#ownerName { font-size: 16px; font-weight: 550; overflow-wrap: anywhere; }
.owner-avatar { display: grid; place-items: center; width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; color: var(--action); background: var(--pale); font-size: 17px; font-weight: 650; }
.text-button, .secondary, .primary, .white-button, .mini-button, .signout-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--action); font-size: 16px; font-weight: 600; line-height: 1.4; text-align: center; text-decoration: none; }
.text-button:hover, .secondary:hover, .mini-button:hover { background: var(--pale); border-color: #bfd5e5; }
.primary { background: var(--action); border-color: var(--action); color: #fff; min-height: 48px; padding: 12px 20px; }
.primary:hover { background: var(--action-hover); border-color: var(--action-hover); }
.signout-button { color: var(--danger); border-color: #dfaaa5; background: #fff8f7; min-width: 112px; white-space: nowrap; }
.signout-button:hover { color: #8f1d15; border-color: #c77b74; background: #ffe9e6; }
.button-icon { width: 20px; height: 20px; flex-shrink: 0; }
.sidebar-signout { width: 100%; margin-top: auto; justify-content: flex-start; padding-inline: 14px; }
.password-action { white-space: nowrap; }
.content { max-width: 1400px; margin: 0 auto; padding: 36px 32px 28px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px 20px; margin-bottom: 24px; }
.page-heading h1 { margin: 0; }
.page-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.page-heading > div { min-width: 0; }
.page-heading p { color: var(--muted); font-size: 17px; }
.page-heading > button { flex-shrink: 0; }
.pill { display: inline-flex; align-items: center; max-width: 100%; padding: 7px 12px; border-radius: 999px; background: var(--pale); color: #115f94; font-size: 14px; line-height: 1.45; font-weight: 600; overflow-wrap: anywhere; }
.stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin: 0 0 28px; }
.stat { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.stat-icon { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 13px; background: var(--pale); color: var(--action); font-size: 26px; }
.stat strong { display: block; font-size: 1.8rem; font-weight: 650; line-height: 1.2; letter-spacing: -.03em; }
.stat div > span { display: block; margin-top: 7px; color: var(--muted); font-size: 16px; line-height: 1.4; }
.section { margin-bottom: 34px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.section-heading h2 { font-size: 1.3rem; }
.section-heading p { color: var(--muted); font-size: 16px; }
.section-heading > .pill { flex-shrink: 0; }
.empty-state { padding: 26px; border: 1px dashed #aab7c2; border-radius: var(--radius); background: #fff; color: var(--muted); font-size: 16px; line-height: 1.6; }
.empty-state strong { display: block; margin-bottom: 6px; color: var(--ink); font-size: 17px; font-weight: 600; }
.empty-state span { display: block; }
.family-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,360px),1fr)); gap: 20px; }
.member-card { min-width: 0; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.member-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.avatar { display: grid; place-items: center; width: 46px; height: 46px; flex-shrink: 0; border-radius: 14px; background: var(--pale); color: var(--action); font-size: 21px; font-weight: 650; }
.member-head h3 { margin-bottom: 4px; }
.member-head p { color: var(--muted); font-size: 15px; margin: 0; }
.device-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.device-info { flex: 1 1 160px; min-width: 0; }
.device-info strong { display: block; font-size: 17px; line-height: 1.4; margin-bottom: 5px; overflow-wrap: anywhere; }
.device-info span { display: block; font-size: 14px; line-height: 1.55; color: var(--muted); }
.mini-button { border-color: #c5d9e8; background: var(--pale); padding: 10px 14px; font-size: 16px; }
.danger-button { border-color: #e4bdb9; background: #fff4f3; color: #a32218; }
.danger-button:hover { background: #ffe9e6; border-color: #d29a93; }
.integration-strip { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; padding-top: 26px; border-top: 1px solid var(--line); }
.integration-strip h3 { font-size: 17px; }
.integration-strip p { color: var(--muted); font-size: 15px; margin: 0; }
.integration-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.integration-chips .pill { color: #4c5865; background: #e9edf1; font-size: 14px; }
.page-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; line-height: 1.5; }
.page-footer img { width: 24px; height: 24px; flex-shrink: 0; object-fit: contain; border-radius: 6px; }
.page-footer span { margin-left: auto; }
.pending-card { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; padding: 22px; margin-bottom: 14px; background: #fff; border: 1px solid #b8d7eb; border-left: 4px solid var(--blue); border-radius: var(--radius); }
.pending-card > div:first-child { min-width: 0; flex: 1 1 300px; }
.pending-card h3 { font-size: 18px; }
.uuid, .fingerprint { display: block; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; line-height: 1.75; overflow-wrap: anywhere; word-break: break-word; }
.pending-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-width: 0; flex: 0 1 auto; }
.pending-actions select { margin-top: 0; width: auto; min-width: 150px; max-width: 100%; flex: 1 1 160px; }
.device-selector-row { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin-bottom: 16px; }
.device-selector-row label { width: 340px; max-width: 100%; margin: 0; }
.device-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.status-line { color: var(--muted); font-size: 16px; margin-bottom: 24px; overflow-wrap: anywhere; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,220px),1fr)); gap: 20px; }
.media-card { min-width: 0; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.media-image { height: 210px; display: flex; align-items: center; justify-content: center; padding: 0; background: #e8eef4; color: #465e73; font-size: 16px; text-align: center; }
.media-image img { width: 100%; height: 100%; object-fit: cover; }
.media-details { padding: 18px; }
.media-details strong { display: block; font-size: 17px; overflow-wrap: anywhere; }
.media-details p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 8px 0 16px; }
.observation-card { padding: 24px; margin-bottom: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.observation-card time { font-size: 14px; color: var(--muted); }
.observation-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 17px; line-height: 1.8; margin: 16px 0 0; }
.review-note { padding: 20px 22px; margin-bottom: 24px; border: 1px solid #c7deee; border-radius: var(--radius); background: var(--pale); color: #34566e; font-size: 16px; line-height: 1.6; }
.activity-table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; font-size: 16px; }
.activity-table th { text-align: left; padding: 16px; background: #eef1f5; color: #46515f; font-size: 15px; font-weight: 650; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.activity-table td { padding: 16px; vertical-align: top; border-bottom: 1px solid var(--line); line-height: 1.6; overflow-wrap: anywhere; }
.activity-table tr:last-child td { border-bottom: 0; }
.activity-section { margin-bottom: 30px; }
.activity-section h2 { font-size: 1.3rem; }
.location-card { padding: 22px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; font-size: 17px; overflow-wrap: anywhere; }
.location-card p { color: var(--muted); font-size: 15px; margin: 8px 0 0; }
.notice { padding: 18px 20px; margin-bottom: 24px; border: 1px solid #bad8c9; border-radius: 14px; background: #edf8f2; color: #1e6446; font-size: 16px; line-height: 1.6; }
.notice.error { color: #a02118; background: #fff2f0; border-color: #e6b9b4; }
dialog { width: calc(100% - 40px); max-width: 540px; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto; position: relative; padding: 32px; border: 1px solid var(--line); border-radius: 22px; background: #fff; color: var(--ink); box-shadow: 0 24px 100px rgba(26,39,52,.2); }
dialog::backdrop { background: rgba(27,38,50,.35); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
dialog h2 { padding-right: 28px; font-size: 1.55rem; line-height: 1.25; margin-bottom: 12px; }
dialog p { font-size: 16px; line-height: 1.6; margin-bottom: 24px; }
.dialog-close { position: absolute; inset: 12px 12px auto auto; display: grid; place-items: center; width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 50%; background: #f0f2f5; color: #47515d; font-size: 27px; line-height: 1; }
.dialog-close:hover { background: #e2e7ed; }
.full { width: 100%; }
label { display: block; margin: 22px 0; font-size: 16px; font-weight: 600; color: #333f4c; line-height: 1.5; }
input:not([type=checkbox]), select { display: block; width: 100%; min-height: 48px; padding: 12px 14px; margin-top: 9px; border: 1px solid var(--control-line); border-radius: 11px; background: #fff; color: var(--ink); font-size: 17px; line-height: 1.4; }
input::placeholder { color: #626b75; opacity: 1; }
select { cursor: pointer; }
input:focus, select:focus { outline: 3px solid var(--action); outline-offset: 2px; border-color: var(--action); }
.check-label { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding-block: 8px; font-size: 16px; font-weight: 500; line-height: 1.6; }
.check-label input { width: 24px; height: 24px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--action); }
.fine-print { color: var(--muted); font-size: 14px; line-height: 1.7; }
.auth-body { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 40px 24px; background: radial-gradient(ellipse at 20% 15%,#e7f3fb,transparent 65%),var(--bg); }
.auth-card { width: 500px; max-width: 100%; padding: 40px; border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: 0 16px 70px rgba(34,61,82,.06); }
.auth-logo { width: 76px; height: 76px; object-fit: contain; border-radius: 20px; margin-bottom: 24px; }
.auth-card h1 { font-size: 1.85rem; }
.auth-card p, .auth-card li { color: var(--muted); font-size: 16px; line-height: 1.7; }
.auth-card li + li { margin-top: 12px; }
.auth-card form { margin-top: 26px; }
.auth-foot { font-size: 14px !important; letter-spacing: .02em; text-align: center; line-height: 1.7 !important; color: var(--muted); margin: 28px 0 0; }
.error { color: #a02118; }
.password-reminder { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 10px 16px; margin-bottom: 20px; border: 1px solid #bfd9eb; border-radius: 12px; background: var(--pale); }
.password-reminder > div { flex: 1 1 160px; }
.password-reminder strong { display: block; font-size: 16px; color: #164c70; }
.password-reminder p { color: #375b75; font-size: 16px; line-height: 1.6; margin: 7px 0 0; }
.password-reminder .secondary { flex-shrink: 0; }
.password-dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.password-hint { margin: -10px 0 0 !important; }
.password-feedback { padding: 14px 16px; border-radius: 11px; font-size: 16px; line-height: 1.6; margin-bottom: 0 !important; }
.password-feedback.error { background: #fff2f0; border: 1px solid #e6b9b4; color: #a02118; }
.password-feedback.success { background: #edf8f2; border: 1px solid #bad8c9; color: #1e6446; }
#passwordDialog label { margin: 22px 0; }
[hidden] { display: none !important; }
@media (min-width: 1600px) { .content { padding-top: 44px; } }
@media (max-width: 1200px) {
  .stat { padding: 20px 18px; flex-direction: column; align-items: flex-start; }
  .pending-actions { width: 100%; }
}
@media (max-width: 1023px) {
  .shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; padding: 22px 24px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 18px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { grid-column: 1; grid-row: 1; }
  .sidebar nav { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .sidebar-signout { grid-column: 2; grid-row: 1; width: auto; margin: 0; align-self: center; justify-content: center; }
  .nav-item { margin: 0; min-height: 50px; }
  .nav-label, .sidebar-note, .sidebar-foot { display: none; }
  .main { width: 100%; margin-left: 0; }
  .topbar { padding: 20px 24px; }
  .content { padding: 30px 24px 24px; }
  .stat { flex-direction: row; align-items: center; }
}
@media (max-width: 700px) {
  h1 { font-size: 1.75rem; }
  .sidebar { padding: 18px 16px; gap: 18px 10px; }
  .brand { font-size: 26px; gap: 10px; }
  .brand img { width: 44px; height: 44px; }
  .brand-sub { font-size: 14px; letter-spacing: 0; }
  .sidebar-signout { min-width: 106px; padding-inline: 12px; }
  .nav-item { padding: 12px; gap: 8px; font-size: 16px; }
  .nav-item span { flex-basis: 21px; font-size: 22px; }
  .topbar { padding: 18px 16px; gap: 14px; }
  .breadcrumb { font-size: 15px; }
  .top-actions { width: 100%; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; }
  .top-actions .owner-avatar { grid-column: 1; grid-row: 1; }
  .top-actions #ownerName { grid-column: 2; grid-row: 1; }
  #logout { grid-column: 3; grid-row: 1; }
  #changePassword { grid-column: 1 / -1; grid-row: 2; }
  .content { padding: 26px 16px 22px; }
  .page-heading { align-items: flex-start; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
  .page-heading p { font-size: 17px; }
  .stats { gap: 10px; margin: 0 0 28px; }
  .stat { flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px 12px; }
  .stat strong { font-size: 1.75rem; }
  .stat-icon { width: 40px; height: 40px; font-size: 24px; }
  .stat div > span { font-size: 14px; line-height: 1.5; }
  .section-heading { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .section-heading p { font-size: 16px; }
  .pending-card { padding: 20px; gap: 16px; }
  .pending-card > div:first-child { flex-basis: 100%; }
  .pending-actions { width: 100%; }
  .pending-actions select { width: 100%; flex-basis: 100%; }
  .pending-actions button { flex: 1; }
  .member-card { padding: 20px; }
  .device-info { flex-basis: 100%; }
  .device-row .mini-button { flex: 1; }
  .device-selector-row { align-items: stretch; gap: 18px; }
  .device-selector-row label { width: 100%; }
  .device-actions { width: 100%; }
  .device-actions button { flex: 1 1 100%; }
  .gallery-grid { gap: 16px; }
  .media-image { height: 240px; }
  .observation-card { padding: 20px; }
  .review-note { padding: 20px; }
  .activity-table { display: block; border: 0; border-radius: 0; background: transparent; }
  .activity-table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
  .activity-table tbody { display: grid; gap: 14px; }
  .activity-table tr { display: block; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
  .activity-table td { display: grid; grid-template-columns: minmax(88px,.8fr) minmax(0,1.5fr); gap: 14px; padding: 14px 16px; font-size: 16px; border-bottom: 1px solid var(--line); }
  .activity-table td::before { content: attr(data-label); color: var(--muted); font-size: 14px; font-weight: 600; line-height: 1.7; }
  .activity-table tr:last-child td { border-bottom: 1px solid var(--line); }
  .activity-table td:last-child, .activity-table tr:last-child td:last-child { border-bottom: 0; }
  .activity-table td a { min-width: 0; }
  .location-card { padding: 20px; }
  .page-footer { align-items: flex-start; font-size: 14px; }
  .page-footer span { width: 100%; margin-left: 34px; }
  .password-reminder { padding: 10px 12px; }
  .password-reminder .secondary { width: auto; }
  .auth-body { padding: 24px 16px; }
  .auth-card { padding: 28px 24px; border-radius: 20px; }
  .auth-card h1 { font-size: 1.75rem; }
  dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); padding: 28px 24px; border-radius: 20px; }
  dialog h2 { font-size: 1.45rem; padding-right: 24px; }
  .password-dialog-actions > button { flex: 1; }
}
@media (max-width: 359px) {
  .sidebar { grid-template-columns: minmax(0,1fr); }
  .sidebar-signout { grid-column: 1; grid-row: auto; width: 100%; }
  .sidebar nav { grid-template-columns: minmax(0,1fr); }
  .stats { grid-template-columns: minmax(0,1fr); }
  .stat { flex-direction: row; align-items: center; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media (prefers-contrast: more) { :root { --muted: #303b47; --line: #a1abb5; --control-line: #5d6874; } .sidebar, .topbar { background: #fff; } }
