/* Curo UI · component styles built on tokens.css */

.app { font-family: var(--curo-font); font-size: 14px; line-height: 20px; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.app *, .app *::before, .app *::after { box-sizing: border-box; }
.app button, .app input, .app select, .app textarea { font: inherit; color: inherit; }
.app p { margin: 0; }
.app a { color: var(--accent-text); }
.app :focus-visible, .app .is-focus-ring { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Layout */
.shell { display: flex; min-height: 100vh; }
.shell-fixed { display: flex; height: 100vh; overflow: hidden; }
.main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 56px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 24px; border-bottom: 1px solid var(--border); background: var(--bg); }
.page { width: 100%; max-width: 1080px; margin: 0 auto; padding: 40px 40px 64px; display: flex; flex-direction: column; gap: 32px; }
.page-wide { max-width: 1200px; }
.stack { display: flex; flex-direction: column; }
.hstack { display: flex; align-items: center; }
.spacer { flex: 1 1 auto; }
.wrap { flex-wrap: wrap; }

/* Type */
.h1 { font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -0.015em; margin: 0; }
.h-hero { font-size: 32px; line-height: 40px; font-weight: 600; letter-spacing: -0.025em; margin: 0; }
.h2 { font-size: 16px; line-height: 24px; font-weight: 600; letter-spacing: -0.005em; margin: 0; }
.h3 { font-size: 14px; line-height: 20px; font-weight: 600; margin: 0; }
.sub { color: var(--text-2); }
.muted { color: var(--text-3); }
.small { font-size: 13px; line-height: 20px; }
.xs { font-size: 12px; line-height: 16px; }
.mono { font-family: var(--curo-mono); font-size: 12px; }
.strong { font-weight: 600; }
.medium { font-weight: 500; }
.overline { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--text-3); }
.tnum { font-variant-numeric: tabular-nums; }
.strike { text-decoration: line-through; color: var(--text-3); }

/* Brand */
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 18px; letter-spacing: -0.03em; color: var(--text); text-decoration: none; }
.brand svg { width: 22px; height: 22px; flex: none; }

/* Sidebar */
.sidebar { width: 248px; height: 100%; min-height: 100%; border-right: 1px solid var(--border); background: var(--bg); display: flex; flex-direction: column; gap: 4px; padding: 12px; }
.sidebar.collapsed { width: 64px; align-items: center; padding: 12px 10px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 8px; color: var(--text-2); text-decoration: none; font-weight: 500; transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--border); }
.nav-item .count { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--accent-text); background: var(--accent-soft); border-radius: 999px; height: 20px; min-width: 20px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; }
.sidebar.collapsed .nav-item { width: 40px; height: 40px; padding: 0; justify-content: center; }

/* Cards & lists */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--border); min-height: 56px; }
.list > .row:first-child { border-top: 0; }
.row-hover:hover { background: var(--surface-2); }
.divider { height: 1px; background: var(--border); border: 0; margin: 0; width: 100%; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 500; cursor: pointer; white-space: nowrap; text-decoration: none; transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 13px; border-radius: 6px; gap: 6px; }
.btn-lg { height: 44px; padding: 0 18px; font-size: 15px; }
.btn-icon { width: 36px; padding: 0; }
.btn-sm.btn-icon { width: 28px; }
.btn-lg.btn-icon { width: 44px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn .pill { background: var(--pill-bg); border-radius: 999px; font-size: 12px; height: 20px; min-width: 20px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent-text); font-weight: 500; cursor: pointer; text-decoration: none; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-weight: 500; font-size: 13px; line-height: 20px; color: var(--text); }
.input { height: 36px; width: 100%; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); padding: 0 12px; transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease); }
.input::placeholder { color: var(--text-3); }
.input:focus, .input.is-focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.input.is-error { border-color: var(--danger); }
.input-lg { height: 44px; font-size: 15px; }
textarea.input { height: auto; padding: 8px 12px; resize: vertical; line-height: 20px; }
select.input { appearance: none; padding-right: 32px; background-image: none; }
.help { font-size: 12px; line-height: 16px; color: var(--text-3); }
.help.err { color: var(--danger); }
.select-wrap { position: relative; display: flex; }
.select-wrap .ic { position: absolute; right: 10px; top: 50%; margin-top: -8px; pointer-events: none; color: var(--text-3); }

/* Chips, badges, kbd */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; text-decoration: none; transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); }
.chip-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.chip-accent:hover { color: var(--accent-fg); }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 12px; line-height: 16px; font-weight: 500; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.badge-accent { background: var(--accent-soft); color: var(--accent-text); }
.badge-warn { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-outline { background: transparent; box-shadow: inset 0 0 0 1px var(--border-strong); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.kbd { font-family: var(--curo-mono); font-size: 11px; height: 20px; min-width: 20px; padding: 0 5px; border: 1px solid var(--border); border-radius: 4px; color: var(--text-3); display: inline-flex; align-items: center; justify-content: center; background: var(--surface); }

/* Avatars */
.avatar { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex: none; }
.avatar-sm { width: 20px; height: 20px; font-size: 10px; }
.avatar-lg { width: 40px; height: 40px; font-size: 15px; }
.av-sam { background: var(--avatar-1-bg); color: var(--avatar-1-fg); }
.av-priya { background: var(--avatar-2-bg); color: var(--avatar-2-fg); }
.av-leo { background: var(--avatar-3-bg); color: var(--avatar-3-fg); }
.av-guest { background: var(--surface-3); color: var(--text-2); }
.av-ai { background: var(--accent-soft); color: var(--accent-text); }
.site-av { width: 28px; height: 28px; border-radius: 7px; background: #9B2222; color: #F4ECDF; font-family: "DM Serif Display", Georgia, serif; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; flex: none; }

/* Meter */
.meter { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.meter-sm { height: 4px; }
.meter-warn > span { background: var(--warning); }

/* Segmented & switch */
.seg { display: inline-flex; padding: 2px; gap: 2px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); }
.seg button { height: 28px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; font-size: 13px; font-weight: 500; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--border); }
.seg-icon button { width: 32px; padding: 0; }
.switch { width: 36px; height: 20px; border-radius: 999px; background: var(--surface-3); border: 0; position: relative; flex: none; padding: 0; cursor: pointer; box-shadow: inset 0 0 0 1px var(--border-strong); transition: background var(--dur-fast) var(--ease); }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 2px rgba(0,0,0,0.25); transition: left var(--dur-fast) var(--ease); }
.switch[aria-checked="true"] { background: var(--accent); box-shadow: none; }
.switch[aria-checked="true"]::after { left: 18px; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); }
.tab { height: 40px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-weight: 500; text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab[aria-current="page"] { color: var(--text); border-bottom-color: var(--text); }

/* Icons */
.ic { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ic-lg { width: 20px; height: 20px; }
.ic-xl { width: 24px; height: 24px; }
.ic-dots { stroke-width: 3; }

/* Toast */
.toast { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 6px 0 14px; border-radius: 10px; background: var(--inverse-bg); color: var(--inverse-fg); box-shadow: var(--shadow-pop); font-weight: 500; }
.toast .toast-action { height: 32px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--inverse-accent); font-weight: 600; cursor: pointer; }
.toast .toast-x { width: 32px; height: 32px; border: 0; background: transparent; color: var(--inverse-fg); opacity: 0.7; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }

/* Drawer, palette, popover */
.drawer { width: 360px; flex: none; border-left: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; }
.palette { width: 640px; max-width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-pop); overflow: hidden; }
.popover { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-pop); }
.scrim { position: absolute; inset: 0; background: var(--overlay); }

/* Ask bar */
.askbar { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 8px 8px 20px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); box-shadow: var(--shadow-pop); }
.askbar.is-focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.askbar input { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; font-size: 17px; line-height: 24px; height: 44px; outline: none; }
.askbar input::placeholder { color: var(--text-3); }
.spark { color: var(--accent); }

/* Empty & loading */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 48px 24px; }
.empty-ic { width: 48px; height: 48px; border-radius: 12px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--text-3); }
.skel { background: var(--surface-2); border-radius: 6px; animation: curo-pulse 1.6s ease-in-out infinite; }
@keyframes curo-pulse { 50% { opacity: 0.5; } }
.spin { animation: curo-spin 0.9s linear infinite; }
@keyframes curo-spin { to { transform: rotate(360deg); } }
.fade-in { animation: curo-in var(--dur) var(--ease) both; }
@keyframes curo-in { from { opacity: 0; transform: translateY(4px); } }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 8px; background: var(--surface-2); color: var(--text); }
.notice-warn { background: var(--warning-soft); }
.notice-warn .ic { color: var(--warning); }
.notice-danger { background: var(--danger-soft); }
.notice-danger .ic { color: var(--danger); }
.notice-info { background: var(--info-soft); }
.notice-info .ic { color: var(--info); }

/* Table */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-weight: 500; color: var(--text-3); font-size: 12px; line-height: 16px; padding: 10px 20px; border-bottom: 1px solid var(--border); }
.tbl td { padding: 12px 20px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }

/* Diff */
.diff { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.diff-cell { border-radius: 8px; padding: 12px; border: 1px solid var(--border); background: var(--surface-2); }
.diff-cell.after { background: var(--accent-soft); border-color: transparent; }

/* Photo placeholders (stand-ins for the client's photography) */
.ph { position: relative; overflow: hidden; display: flex; align-items: flex-end; border-radius: 8px; color: #fff; }
.ph-label { margin: 8px; font-size: 11px; line-height: 16px; font-weight: 500; padding: 2px 6px; border-radius: 4px; background: rgba(0,0,0,0.55); color: #fff; }
.ph-chicken { background: #B98552; }
.ph-terrace { background: #6F7F5E; }
.ph-frites { background: #D2AE6E; }
.ph-dessert { background: #6B4A3A; }
.ph-room { background: #8E3A2C; }
.ph-team { background: #4D5A6B; }
.ph-exterior { background: #3E3A36; }
.ph-bar { background: #A56A3D; }

/* Mobile */
.phone { width: 390px; height: 844px; overflow: hidden; position: relative; display: flex; flex-direction: column; }
.phone-scroll { flex: 1 1 auto; overflow: auto; }
.tabbar { height: 88px; flex: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: start; padding: 6px 8px 28px; border-top: 1px solid var(--border); background: var(--surface); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 52px; color: var(--text-3); text-decoration: none; font-size: 11px; font-weight: 500; }
.tabbar a[aria-current="page"] { color: var(--text); }
.tabbar .ask-tab { width: 52px; height: 52px; border-radius: 16px; background: var(--accent); color: var(--accent-fg); margin: -2px auto 0; gap: 0; }
.sheet { background: var(--surface); border-top-left-radius: 16px; border-top-right-radius: 16px; box-shadow: var(--shadow-pop); border: 1px solid var(--border); border-bottom: 0; }
.grabber { width: 36px; height: 4px; border-radius: 999px; background: var(--border-strong); margin: 8px auto 0; }

/* Editor overlays (drawn over the client's page) */
.ed-wrap { position: relative; }
.ed-hover { outline: 1.5px dashed var(--accent); outline-offset: 4px; border-radius: 2px; }
.ed-sel { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
.ed-tag { position: absolute; left: -6px; top: -32px; height: 22px; padding: 0 8px; display: inline-flex; align-items: center; gap: 4px; background: var(--accent); color: var(--accent-fg); font-family: var(--curo-font); font-size: 12px; font-weight: 500; border-radius: 6px; white-space: nowrap; }
.ed-bar { position: absolute; display: flex; align-items: center; gap: 2px; padding: 4px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-pop); font-family: var(--curo-font); font-size: 13px; z-index: 3; }
.ed-bar .btn { height: 30px; }
.ed-ask { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 999px; background: var(--accent); color: var(--accent-fg); border: 0; font-family: var(--curo-font); font-size: 13px; font-weight: 500; cursor: pointer; box-shadow: var(--shadow-pop); white-space: nowrap; }
.caret { display: inline-block; width: 2px; height: 1em; background: var(--accent); vertical-align: -0.12em; margin-left: 1px; animation: curo-blink 1s steps(1) infinite; }
@keyframes curo-blink { 50% { opacity: 0; } }
.rv-changed { background: var(--highlight); box-shadow: 0 0 0 2px var(--accent); border-radius: 4px; }
.rv-pin { position: absolute; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-fg); font-family: var(--curo-font); font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.coach { position: absolute; width: 320px; padding: 20px; z-index: 5; }
.spot { position: absolute; border-radius: 10px; box-shadow: 0 0 0 9999px var(--overlay); outline: 2px solid var(--accent); outline-offset: 2px; pointer-events: none; z-index: 4; }

/* Client sample site (Royale) — its own brand, not Curo's */
.rs { background: #F4ECDF; color: #231A14; font-family: "Geist", system-ui, sans-serif; }
.rs-display { font-family: "DM Serif Display", Georgia, serif; font-weight: 400; letter-spacing: -0.01em; }
.rs-red { color: #9B2222; }
.rs-btn { display: inline-flex; align-items: center; height: 44px; padding: 0 20px; background: #9B2222; color: #F4ECDF; border-radius: 999px; font-weight: 600; text-decoration: none; font-size: 14px; }
.rs-rule { height: 1px; background: rgba(35,26,20,0.18); }

@media (prefers-reduced-motion: reduce) {
  .app *, .app *::before, .app *::after { animation: none !important; transition: none !important; }
}
