/* Owner app: phone-first agenda */
body.owner { min-height: 100dvh; padding-bottom: env(safe-area-inset-bottom); }

/* Lock screen */
.lock { min-height: 100dvh; display: grid; place-items: center; padding: 24px var(--gutter); }
.lock[hidden] { display: none; }
.lock-card { width: min(100%, 380px); display: grid; gap: 16px; text-align: center; }
.lock-card img { margin: 0 auto; border-radius: 16px; }
.lock-card h1 { font-size: 56px; }
.lock-sub { margin: -10px 0 8px; color: var(--muted); }
.lock-card .field { text-align: left; }
.lock-card input { font-size: 22px; letter-spacing: .3em; text-align: center; }
.lock-hint { color: var(--muted); font-size: 13px; margin: 0; }

/* App shell */
.app { width: 100%; max-width: 720px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 18px) var(--gutter) calc(40px + var(--badge-h, 0px)); }
.app-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 18px; }
.app-head h1 { font-size: 52px; }
.app-date { color: var(--accent); margin: 0 0 6px; }
.app-head-actions { display: flex; gap: 8px; position: relative; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--ink-2); cursor: pointer; font-size: 20px; line-height: 1; }
.icon-btn:hover { border-color: var(--bone-2); }
.icon-btn.spin { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.menu-pop { position: absolute; right: 0; top: 52px; z-index: 30; min-width: 230px; display: grid; padding: 6px; border-radius: 14px;
  background: var(--ink-3); border: 1px solid var(--line); box-shadow: 0 20px 40px -10px rgba(0, 0, 0, .7); }
.menu-pop a, .menu-pop button { text-align: left; padding: 12px 14px; border-radius: 9px; background: none; border: 0; cursor: pointer; text-decoration: none; font-weight: 600; font-size: 15px; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--ink-4); }
.owner-demo { border-radius: 12px; margin-bottom: 16px; border: 1px solid #3d2418; }

/* Stats */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.stat { background: var(--ink-2); border: 1px solid var(--line-soft); border-radius: var(--r); padding: 16px; display: grid; gap: 2px; }
.stat .mono { color: var(--muted); font-size: 11px; }
.stat strong { font-family: var(--display); font-weight: 900; font-size: 44px; line-height: 1; }
.stat small { color: var(--bone-2); font-size: 14px; }

/* Next up */
.next-up { background: var(--bone); color: var(--ink); border-radius: var(--r); padding: 18px; margin-bottom: 18px; display: grid; gap: 4px; }
.next-up .mono { color: #7a7368; font-size: 11px; }
.next-up h2 { font-size: 40px; }
.next-up p { margin: 0; font-weight: 600; }
.next-up .when { color: #b3321b; font-weight: 800; }
.next-up .actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.next-up .btn-ghost { border-color: #cfc7ba; color: var(--ink); }

/* Range tabs */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 999px; background: var(--ink-2); border: 1px solid var(--line-soft); margin-bottom: 18px; }
.seg button { height: 40px; border-radius: 999px; border: 0; background: none; cursor: pointer; font-weight: 700; font-size: 14px; color: var(--bone-2); }
.seg button[aria-selected="true"] { background: var(--bone); color: var(--ink); }

/* Agenda */
.agenda-day { margin-bottom: 24px; }
.agenda-day h3 { font-size: 24px; display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.agenda-day h3 small { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--muted); font-weight: 500; }
.appt { display: grid; grid-template-columns: 76px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.appt-time { font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1; padding-top: 2px; }
.appt-time small { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); font-weight: 500; margin-top: 6px; letter-spacing: .04em; }
.appt-name { font-weight: 800; font-size: 17px; }
.appt-svc { color: var(--bone-2); font-size: 15px; }
.appt-svc b { color: var(--bone); }
.appt-notes { margin: 6px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--ink-2); color: var(--bone-2); font-size: 14px; border-left: 2px solid var(--accent); }
.appt-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: none; display: inline-flex; align-items: center;
  font-size: 13px; font-weight: 700; text-decoration: none; cursor: pointer; }
.chip:hover { border-color: var(--bone-2); }
.chip-danger { color: #ff8a73; border-color: #4a2a22; }
.chip-danger:hover { border-color: #ff8a73; }
.appt.blocked { opacity: .6; }
.appt.blocked .appt-name { font-weight: 600; color: var(--muted); }
.appt.past { opacity: .45; }
.appt.now .appt-time { color: var(--accent); }
.empty { text-align: center; padding: 40px 12px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--r); }
.empty strong { display: block; font-family: var(--display); font-size: 30px; text-transform: uppercase; color: var(--bone); margin-bottom: 6px; }
.app-foot { color: var(--muted); text-align: center; margin-top: 18px; }

.toast { position: fixed; left: 50%; bottom: calc(20px + var(--badge-h, 0px) + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60;
  background: var(--bone); color: var(--ink); padding: 12px 18px; border-radius: 12px; font-weight: 700; box-shadow: 0 20px 40px -10px rgba(0, 0, 0, .7); }
