:root {
  --ink: #171a19;
  --ink-2: #252927;
  --paper: #f4f2ed;
  --surface: #fffefb;
  --surface-2: #ebe8e0;
  --surface-3: #dfddd6;
  --coral: #ef7b61;
  --coral-dark: #cf5c45;
  --sage: #789b88;
  --blue: #6d8fa3;
  --gold: #bf924f;
  --violet: #8f7fae;
  --red: #c95e5e;
  --text: #202321;
  --muted: #70746f;
  --border: #dedbd3;
  --shadow: 0 16px 44px rgba(33, 31, 27, .08);
  --shadow-soft: 0 4px 18px rgba(33, 31, 27, .06);
  --radius: 18px;
  --radius-sm: 11px;
  --sidebar: 252px;
  --topbar: 74px;
  --accent: var(--coral);
}

* { box-sizing: border-box; }
html { height: 100%; background: var(--paper); }
body { margin: 0; min-height: 100%; color: var(--text); background: var(--paper); font-family: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button, [role='button'] { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
svg { display: block; }
.is-hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.boot-screen { position: fixed; inset: 0; z-index: 999; display: grid; place-content: center; place-items: center; gap: 16px; background: var(--ink); color: #fff; font: 800 22px 'Manrope', sans-serif; letter-spacing: -.5px; transition: opacity .35s ease, visibility .35s ease; }
.boot-screen.is-leaving { opacity: 0; visibility: hidden; }
.brand-mark { width: 38px; height: 38px; flex: 0 0 auto; color: var(--coral); }
.brand-mark svg { width: 100%; height: 100%; fill: currentColor; }
.brand-mark .mark-line { fill: none; stroke: #f7f3e9; stroke-width: 2.4px; stroke-linejoin: round; }
.brand-mark--large { width: 60px; height: 60px; animation: breathe 1.3s ease-in-out infinite alternate; }
@keyframes breathe { from { transform: scale(.94); opacity: .72; } to { transform: scale(1); opacity: 1; } }

/* Authentication */
.auth-view { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 1.05fr) minmax(500px, .95fr); background: var(--surface); }
.auth-visual { min-height: 100vh; position: relative; overflow: hidden; padding: 42px 52px; display: flex; flex-direction: column; color: white; background:
  radial-gradient(circle at 74% 25%, rgba(239,123,97,.34), transparent 25%),
  radial-gradient(circle at 20% 90%, rgba(120,155,136,.18), transparent 24%),
  linear-gradient(145deg, #101312, #242b28 58%, #171a19); }
.auth-visual::before { content: ''; position: absolute; width: 580px; aspect-ratio: 1; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; right: -220px; top: 10%; box-shadow: 0 0 0 76px rgba(255,255,255,.018), 0 0 0 152px rgba(255,255,255,.018); }
.auth-visual::after { content: ''; position: absolute; right: 8%; bottom: 2%; width: 48%; height: 58%; opacity: .18; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 420'%3E%3Cg fill='none' stroke='%23f5efe4' stroke-width='2'%3E%3Cpath d='M151 18c-8 44-47 65-72 98-35 46-26 113 11 153 38 42 101 52 137 12 26-29 25-79 4-111-18-27-50-40-80-52-20-8-37-29-30-51 5-16 20-28 30-49Z'/%3E%3Cpath d='M87 157c28 9 50 30 63 56 13-26 36-47 64-56-3 33-28 61-64 63-35-2-60-30-63-63Z'/%3E%3Cpath d='M151 222c-29 19-49 50-53 84 28-2 47-12 53-37 6 25 25 35 52 37-4-34-23-65-52-84Z'/%3E%3Cpath d='M70 96c25 4 49 20 63 42M230 96c-24 4-48 20-62 42'/%3E%3Ccircle cx='151' cy='184' r='9'/%3E%3Cpath d='M151 309v93M124 339l27 23 27-23'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat; }
.auth-grain { pointer-events: none; position: absolute; inset: 0; opacity: .05; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E"); }
.auth-brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; font: 800 23px 'Manrope', sans-serif; letter-spacing: -.7px; }
.auth-quote { position: relative; z-index: 2; margin: auto 0; }
.auth-quote p { font: 700 clamp(42px, 5vw, 72px)/1.04 'Manrope', sans-serif; letter-spacing: -3.5px; margin: 0; }
.auth-quote em { font-style: normal; color: var(--coral); }
.auth-quote > span { display: block; color: rgba(255,255,255,.6); margin-top: 22px; font-size: 15px; }
.auth-proof { position: relative; z-index: 2; display: flex; align-items: center; gap: 20px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 28px; }
.auth-proof p { margin: 0; font-size: 13px; line-height: 1.55; color: rgba(255,255,255,.55); }
.auth-proof strong { color: rgba(255,255,255,.92); font-weight: 600; }
.avatar-stack { display: flex; }
.avatar-stack span { width: 34px; height: 34px; margin-right: -8px; display: grid; place-items: center; border-radius: 50%; border: 2px solid #1a1e1c; color: white; background: var(--sage); font-size: 9px; font-weight: 700; }
.avatar-stack span:nth-child(2) { background: var(--coral); }
.avatar-stack span:nth-child(3) { background: var(--violet); }
.auth-panel { min-height: 100vh; padding: 48px clamp(44px, 7vw, 105px) 24px; display: flex; flex-direction: column; justify-content: center; background: var(--surface); }
.auth-card { width: 100%; max-width: 470px; margin: auto; }
.auth-mobile-brand { display: none; }
.eyebrow { color: var(--coral-dark); font-size: 11px; line-height: 1; font-weight: 800; letter-spacing: 1.7px; text-transform: uppercase; margin-bottom: 16px; }
.auth-card h1 { margin: 0; font: 750 clamp(31px, 3.2vw, 43px)/1.14 'Manrope', sans-serif; letter-spacing: -1.8px; }
.auth-lead { color: var(--muted); margin: 13px 0 31px; font-size: 14px; }
.form-stack { display: grid; gap: 17px; }
.form-stack label:not(.check-label), .form-label { display: grid; gap: 8px; color: #454945; font-size: 12px; font-weight: 650; }
.form-stack input:not([type='checkbox']), .form-stack textarea, .form-stack select, .field-control { width: 100%; min-height: 49px; padding: 0 15px; border: 1px solid var(--border); outline: 0; border-radius: 10px; background: #faf9f5; color: var(--text); font-size: 14px; transition: border .2s, box-shadow .2s, background .2s; }
.form-stack textarea { min-height: 96px; padding-top: 12px; resize: vertical; }
.form-stack input:focus, .form-stack textarea:focus, .form-stack select:focus, .field-control:focus { background: white; border-color: var(--coral); box-shadow: 0 0 0 3px rgba(239,123,97,.12); }
.input-password { position: relative; }
.input-password input { padding-right: 48px !important; }
.password-toggle { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; background: transparent; color: #aaa9a5; cursor: pointer; }
.form-row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.check-label { display: inline-flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 12px; font-weight: 500; cursor: pointer; line-height: 1.5; }
.check-label input { position: absolute; opacity: 0; pointer-events: none; }
.check-label > span { position: relative; flex: 0 0 auto; width: 17px; height: 17px; border: 1px solid #c8c6bf; border-radius: 5px; background: white; }
.check-label input:checked + span { background: var(--ink); border-color: var(--ink); }
.check-label input:checked + span::after { content: ''; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.text-button { border: 0; padding: 0; background: none; color: var(--coral-dark); font-size: 12px; font-weight: 700; cursor: pointer; }
.text-button:hover { text-decoration: underline; }
.button { min-height: 44px; border: 0; border-radius: 10px; padding: 0 17px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-size: 13px; font-weight: 700; cursor: pointer; transition: transform .18s, box-shadow .18s, background .18s, border-color .18s; white-space: nowrap; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.button--primary { color: #fff; background: var(--ink); box-shadow: 0 7px 16px rgba(23,26,25,.16); }
.button--primary:hover { background: #292d2b; box-shadow: 0 9px 22px rgba(23,26,25,.2); }
.button--accent { color: white; background: var(--coral); box-shadow: 0 7px 16px rgba(207,92,69,.18); }
.button--outline { color: var(--text); background: transparent; border: 1px solid var(--border); }
.button--outline:hover { border-color: #b8b5ae; background: #faf9f5; }
.button--soft { color: var(--text); background: var(--surface-2); }
.button--ghost { min-height: 36px; background: transparent; color: var(--muted); padding: 0 10px; }
.button--danger { color: #a54949; background: #f9e9e7; }
.button--wide { width: 100%; min-height: 51px; justify-content: space-between; padding: 0 18px; }
.button--compact { min-height: 39px; }
.auth-divider { height: 42px; display: flex; align-items: center; gap: 13px; color: #aaa9a5; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.auth-divider::before, .auth-divider::after { content: ''; height: 1px; background: var(--border); flex: 1; }
.auth-footer { margin: 25px 0 0; text-align: center; color: var(--muted); font-size: 12px; }
.auth-legal { margin: auto auto 0; color: #aaa9a5; font-size: 10px; }
.back-button { border: 0; background: none; padding: 0; margin-bottom: 30px; color: var(--muted); font-size: 12px; cursor: pointer; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Application shell */
.app-shell { min-height: 100vh; --platform-banner-height: 56px; }
.platform-access-banner { position: fixed; z-index: 50; top: 0; right: 0; left: var(--sidebar); min-height: var(--platform-banner-height); padding: 8px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #34260d; background: #f4d994; border-bottom: 1px solid #d2aa4d; box-shadow: 0 4px 14px rgba(61,43,8,.12); }
.platform-access-banner__copy { min-width: 0; display: flex; align-items: center; gap: 10px; }
.platform-access-banner__copy > svg { flex: 0 0 auto; width: 19px; height: 19px; }
.platform-access-banner__copy span { min-width: 0; display: grid; gap: 1px; }
.platform-access-banner__copy strong, .platform-access-banner__copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.platform-access-banner__copy strong { font-size: 11px; }
.platform-access-banner__copy small { color: #755a22; font-size: 8.5px; }
.platform-access-banner__actions { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; }
.platform-access-banner .button { min-height: 36px; background: rgba(255,255,255,.52); box-shadow: none; }
.platform-access-banner .button--outline { border-color: rgba(79,57,14,.28); }
.platform-access-banner .button--danger { color: #843b32; background: #fff1e7; }
.app-shell.platform-access-active .workspace { padding-top: var(--platform-banner-height); }
.app-shell.platform-access-active .topbar { top: var(--platform-banner-height); }
.sidebar { position: fixed; z-index: 60; inset: 0 auto 0 0; width: var(--sidebar); padding: 20px 14px 16px; display: flex; flex-direction: column; color: rgba(255,255,255,.73); background: var(--ink); }
.sidebar-brand { height: 45px; display: flex; align-items: center; gap: 10px; padding: 0 10px; color: white; font: 800 20px 'Manrope', sans-serif; letter-spacing: -.7px; }
.sidebar-close { display: none !important; margin-left: auto; color: white !important; }
.studio-switcher { margin: 18px 0 16px; padding: 10px; display: grid; grid-template-columns: 35px 1fr auto; gap: 9px; align-items: center; border: 1px solid rgba(255,255,255,.1); border-radius: 11px; background: rgba(255,255,255,.055); cursor: pointer; }
.studio-switcher:hover { background: rgba(255,255,255,.08); }
.studio-monogram { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 9px; background: var(--coral); color: white; font-size: 11px; font-weight: 800; }
.studio-switcher div:nth-child(2) { display: grid; min-width: 0; gap: 2px; }
.studio-switcher small, .studio-switcher strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio-switcher small { color: rgba(255,255,255,.38); font-size: 8px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; }
.studio-switcher strong { color: rgba(255,255,255,.88); font-size: 11px; font-weight: 600; }
.studio-switcher > span { color: rgba(255,255,255,.38); }
.main-nav { display: grid; gap: 3px; }
.nav-label { margin: 13px 10px 7px; color: rgba(255,255,255,.27); font-size: 8px; font-weight: 800; letter-spacing: 1.3px; text-transform: uppercase; }
.nav-item { position: relative; width: 100%; height: 39px; padding: 0 11px; border: 0; border-radius: 9px; display: grid; grid-template-columns: 21px 1fr auto; align-items: center; gap: 10px; background: transparent; color: rgba(255,255,255,.57); cursor: pointer; text-align: left; font-size: 11.5px; font-weight: 550; }
.nav-item svg { width: 17px; height: 17px; }
.nav-item:hover { color: rgba(255,255,255,.9); background: rgba(255,255,255,.055); }
.nav-item.active { color: white; background: rgba(255,255,255,.105); }
.nav-item.active::before { content: ''; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 4px 4px 0; background: var(--coral); }
.nav-badge { min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px; display: grid; place-items: center; color: var(--ink); background: var(--coral); font-size: 8px; font-weight: 800; }
.sidebar-spacer { flex: 1; min-height: 16px; }
.quick-checkin { width: 100%; border: 1px solid rgba(239,123,97,.2); padding: 10px; margin-bottom: 10px; border-radius: 11px; display: grid; grid-template-columns: 34px 1fr auto; gap: 9px; align-items: center; text-align: left; color: rgba(255,255,255,.75); background: rgba(239,123,97,.08); cursor: pointer; }
.quick-checkin:hover { background: rgba(239,123,97,.13); }
.quick-checkin-icon { width: 34px; height: 34px; display: grid; place-items: center; color: white; border-radius: 8px; background: var(--coral); font-size: 20px; }
.quick-checkin > span:nth-child(2) { min-width: 0; display: grid; gap: 1px; }
.quick-checkin strong { color: rgba(255,255,255,.86); font-size: 10px; }
.quick-checkin small { color: rgba(255,255,255,.36); font-size: 8px; }
.user-menu { min-height: 52px; padding: 8px 9px; border-top: 1px solid rgba(255,255,255,.08); display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 9px; cursor: pointer; }
.user-menu:hover { background: rgba(255,255,255,.04); border-radius: 10px; }
.user-menu > div:nth-child(2) { display: grid; min-width: 0; gap: 1px; }
.user-menu strong { color: rgba(255,255,255,.83); font-size: 10px; }
.user-menu small { color: rgba(255,255,255,.37); font-size: 8px; }
.avatar { width: 34px; height: 34px; display: inline-grid; flex: 0 0 auto; place-items: center; border-radius: 50%; color: white; background: var(--sage); font-size: 9px; font-weight: 800; letter-spacing: .2px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.avatar--cream { color: var(--ink); background: #ddd1ba; }
.avatar--sm { width: 28px; height: 28px; font-size: 8px; }
.avatar--lg { width: 54px; height: 54px; font-size: 13px; }
.workspace { min-height: 100vh; margin-left: var(--sidebar); }
.topbar { position: sticky; z-index: 40; top: 0; height: var(--topbar); padding: 0 31px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid rgba(219,216,207,.8); background: rgba(244,242,237,.88); backdrop-filter: blur(14px); }
.mobile-menu, .mobile-wordmark { display: none !important; }
.global-search { height: 38px; width: min(380px, 44vw); padding: 0 11px; border: 1px solid transparent; border-radius: 9px; display: flex; align-items: center; gap: 9px; color: #888b86; background: rgba(225,222,214,.68); cursor: pointer; text-align: left; font-size: 11px; }
.global-search:hover { border-color: #d4d0c7; background: #ebe8e1; }
.global-search svg { width: 15px; height: 15px; }
.global-search span:nth-child(2) { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
kbd { padding: 2px 6px; border: 1px solid #d4d1ca; border-radius: 5px; background: rgba(255,255,255,.5); font: 9px inherit; color: #999; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.icon-button { position: relative; width: 38px; height: 38px; border: 0; border-radius: 9px; display: inline-grid; place-items: center; background: transparent; color: var(--muted); cursor: pointer; }
.icon-button:hover { background: var(--surface-2); color: var(--text); }
.icon-button svg { width: 18px; height: 18px; }
.icon-button.has-indicator::after { content: ''; position: absolute; right: 7px; top: 7px; width: 6px; height: 6px; border: 2px solid var(--paper); border-radius: 50%; background: var(--coral); }
.language-code { font-size: 10px; font-weight: 800; }
.page-content { min-height: calc(100vh - var(--topbar)); padding: 28px 31px 42px; outline: 0; }
.page-enter { animation: page-in .3s ease both; }
@keyframes page-in { from { opacity: 0; transform: translateY(4px); } }
.page-header { margin-bottom: 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.page-header h1 { margin: 0 0 5px; font: 750 27px/1.16 'Manrope', sans-serif; letter-spacing: -1.1px; }
.page-header p { margin: 0; color: var(--muted); font-size: 11.5px; }
.header-actions { display: flex; align-items: center; gap: 8px; }

/* Shared components */
.card { border: 1px solid rgba(222,219,211,.8); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-soft); }
.card-header { min-height: 63px; padding: 16px 19px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid #ebe8e1; }
.card-header h2, .section-title { margin: 0; font: 700 14px 'Manrope', sans-serif; letter-spacing: -.35px; }
.card-header p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.card-body { padding: 18px 19px; }
.link-button { border: 0; padding: 4px 0; display: inline-flex; align-items: center; gap: 5px; background: none; color: var(--coral-dark); font-size: 9px; font-weight: 700; cursor: pointer; }
.link-button:hover { text-decoration: underline; }
.status { width: fit-content; min-height: 22px; padding: 0 8px; border-radius: 12px; display: inline-flex; align-items: center; gap: 5px; font-size: 8.5px; font-weight: 700; white-space: nowrap; }
.status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status--success { color: #527a63; background: #e5f0e8; }
.status--warning { color: #9b7239; background: #f5ebd7; }
.status--info { color: #567387; background: #e3edf2; }
.status--danger { color: #a44f4b; background: #f6e3e1; }
.status--neutral { color: #777973; background: #eeece6; }
.chip { min-height: 27px; padding: 0 10px; border: 1px solid var(--border); border-radius: 14px; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); background: var(--surface); font-size: 9px; font-weight: 650; }
.chip--filled { border-color: transparent; background: var(--surface-2); color: var(--text); }
.tag { padding: 3px 7px; border-radius: 5px; color: #61655f; background: #eeece7; font-size: 8px; font-weight: 700; }
.muted { color: var(--muted); }
.empty-state { min-height: 220px; padding: 30px; display: grid; place-items: center; text-align: center; color: var(--muted); }
.empty-state-icon { width: 52px; height: 52px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 15px; background: var(--surface-2); color: var(--coral); }
.empty-state-icon svg { width: 24px; height: 24px; }
.empty-state h3 { margin: 0 0 6px; color: var(--text); font-size: 13px; }
.empty-state p { max-width: 320px; margin: 0 0 16px; font-size: 10px; line-height: 1.6; }
.toolbar { display: flex; align-items: center; gap: 8px; }
.search-field { min-width: 230px; height: 38px; padding: 0 11px; border: 1px solid var(--border); border-radius: 9px; display: flex; align-items: center; gap: 8px; background: var(--surface); }
.search-field svg { width: 15px; color: var(--muted); }
.search-field input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 10.5px; }
.segmented { padding: 3px; display: inline-flex; border: 1px solid var(--border); border-radius: 9px; background: #e9e6df; }
.segmented button { height: 30px; padding: 0 12px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; font-size: 9px; font-weight: 650; cursor: pointer; }
.segmented button.active { color: var(--text); background: white; box-shadow: 0 2px 6px rgba(30,29,27,.08); }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { height: 40px; padding: 0 14px; border-bottom: 1px solid var(--border); color: #92948e; font-size: 8px; font-weight: 800; letter-spacing: .8px; text-align: left; text-transform: uppercase; }
.data-table td { height: 57px; padding: 8px 14px; border-bottom: 1px solid #edeae4; font-size: 10px; vertical-align: middle; }
.data-table tbody tr { transition: background .15s; cursor: pointer; }
.data-table tbody tr:hover { background: #faf8f3; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.table-person { display: flex; align-items: center; gap: 10px; }
.table-person > span { display: grid; gap: 2px; }
.table-person strong { font-size: 10.5px; }
.table-person small { color: var(--muted); font-size: 8.5px; }
.table-actions { display: flex; justify-content: flex-end; }
.more-button { width: 30px; height: 30px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; }
.more-button:hover { background: var(--surface-2); }
.pagination { min-height: 52px; padding: 0 16px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 9px; }
.pagination-buttons { display: flex; gap: 4px; }
.pagination-buttons button { min-width: 29px; height: 29px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--muted); font-size: 9px; cursor: pointer; }
.pagination-buttons button.active { color: white; border-color: var(--ink); background: var(--ink); }

/* Platform administration */
.platform-toolbar { margin-bottom: 17px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.platform-toolbar .search-field { width: min(520px, 100%); }
.platform-toolbar .search-field .link-button { flex: 0 0 auto; }
.platform-studio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 14px; }
.platform-studio-card { min-width: 0; padding: 18px; display: grid; gap: 17px; }
.platform-studio-card__head { min-width: 0; display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 11px; }
.platform-studio-card__head .studio-monogram { width: 42px; height: 42px; }
.platform-studio-card__head h2 { margin: 0; overflow: hidden; color: var(--text); font: 700 13px 'Manrope',sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.platform-studio-card__head p { margin: 4px 0 0; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.platform-studio-card__details { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.platform-studio-card__details > div { min-width: 0; display: grid; gap: 3px; }
.platform-studio-card__details small { color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .45px; text-transform: uppercase; }
.platform-studio-card__details strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.platform-empty { grid-column: 1 / -1; }
.platform-pagination { margin-top: 17px; display: flex; justify-content: flex-end; gap: 8px; }

/* Dashboard */
.welcome-header { margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.welcome-header h1 { margin: 0 0 5px; font: 750 27px 'Manrope', sans-serif; letter-spacing: -1.1px; }
.welcome-header h1 span { color: var(--coral-dark); }
.welcome-header p { margin: 0; color: var(--muted); font-size: 11px; }
.date-pill { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; }
.date-pill svg { width: 15px; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 15px; }
.metric-card { min-height: 113px; padding: 16px 17px; position: relative; overflow: hidden; }
.metric-top { display: flex; align-items: center; justify-content: space-between; }
.metric-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: var(--coral-dark); background: #f9e8e2; }
.metric-icon svg { width: 15px; height: 15px; }
.metric-icon--sage { color: #587463; background: #e2ece5; }
.metric-icon--blue { color: #537287; background: #e1ebf0; }
.metric-icon--gold { color: #8c6a37; background: #f2e8d5; }
.metric-change { color: #5c8169; font-size: 8px; font-weight: 700; }
.metric-change--down { color: var(--red); }
.metric-value { margin-top: 10px; font: 750 21px 'Manrope', sans-serif; letter-spacing: -.8px; }
.metric-label { margin-top: 1px; color: var(--muted); font-size: 8.5px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(270px, .72fr); gap: 15px; }
.dashboard-main { display: grid; gap: 15px; }
.dashboard-side { display: grid; align-content: start; gap: 15px; }
.today-agenda { min-height: 387px; }
.agenda-toolbar { display: flex; align-items: center; gap: 10px; }
.team-faces { display: flex; }
.team-faces .avatar { margin-left: -5px; border: 2px solid white; }
.team-faces .avatar:first-child { margin-left: 0; }
.agenda-body { padding: 9px 19px 17px; }
.agenda-row { display: grid; grid-template-columns: 50px 12px 1fr auto; gap: 12px; align-items: stretch; min-height: 64px; }
.agenda-time { padding-top: 10px; font-size: 9px; font-weight: 700; color: var(--text); }
.agenda-time small { display: block; color: #aaa; font-size: 7px; margin-top: 2px; }
.agenda-line { display: flex; flex-direction: column; align-items: center; }
.agenda-dot { flex: 0 0 auto; width: 8px; height: 8px; margin-top: 12px; border: 2px solid white; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 1px var(--coral); }
.agenda-line::after { content: ''; flex: 1; width: 1px; background: #e4e1da; }
.agenda-row:last-child .agenda-line::after { display: none; }
.agenda-detail { padding: 8px 0 12px; }
.agenda-detail strong { display: block; font-size: 10.5px; line-height: 1.4; }
.agenda-detail span { display: block; margin-top: 3px; color: var(--muted); font-size: 8.5px; }
.agenda-staff { padding-top: 8px; }
.mini-activity { display: flex; align-items: center; gap: 10px; }
.mini-activity-icon { width: 33px; height: 33px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.mini-activity-icon svg { width: 15px; }
.mini-activity > div:nth-child(2) { min-width: 0; flex: 1; }
.mini-activity strong { display: block; font-size: 9.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-activity span { display: block; color: var(--muted); font-size: 8px; margin-top: 3px; }
.activity-list { display: grid; gap: 14px; }
.quick-actions-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.quick-action { min-height: 69px; padding: 11px; border: 1px solid var(--border); border-radius: 11px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; color: var(--text); background: white; cursor: pointer; font-size: 8.5px; font-weight: 700; text-align: left; }
.quick-action:hover { border-color: #c9c5bc; transform: translateY(-1px); }
.quick-action svg { width: 16px; color: var(--coral-dark); }
.capacity-row { display: grid; gap: 6px; }
.capacity-label { display: flex; justify-content: space-between; font-size: 8.5px; }
.capacity-label span { color: var(--muted); }
.progress { height: 5px; border-radius: 4px; overflow: hidden; background: var(--surface-2); }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--coral); }

/* Calendar */
.calendar-shell { overflow: hidden; }
.calendar-toolbar { min-height: 70px; padding: 12px 15px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--border); }
.date-navigator { display: flex; align-items: center; gap: 6px; }
.date-navigator strong { min-width: 165px; text-align: center; font: 700 12px 'Manrope', sans-serif; }
.square-button { width: 31px; height: 31px; border: 1px solid var(--border); border-radius: 7px; display: grid; place-items: center; background: white; color: var(--muted); cursor: pointer; }
.square-button:hover { background: var(--surface-2); }
.square-button svg { width: 14px; }
.staff-filter { display: flex; align-items: center; gap: 7px; }
.staff-filter > span { color: var(--muted); font-size: 8px; }
.staff-filter button { position: relative; padding: 0; border: 2px solid transparent; border-radius: 50%; background: transparent; cursor: pointer; }
.staff-filter button.active { border-color: var(--coral); }
.calendar-scroll { overflow: auto; max-height: calc(100vh - 236px); background: white; }
.calendar-grid { min-width: 790px; display: grid; grid-template-columns: 54px repeat(var(--days, 3), minmax(205px, 1fr)); position: relative; }
.calendar-corner, .calendar-day-head { position: sticky; top: 0; z-index: 8; height: 58px; border-bottom: 1px solid var(--border); background: rgba(255,254,251,.97); }
.calendar-corner { left: 0; z-index: 9; border-right: 1px solid var(--border); }
.calendar-day-head { padding: 9px 12px; border-right: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.calendar-day-head div { display: grid; gap: 2px; }
.calendar-day-head small { color: var(--muted); font-size: 7.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; }
.calendar-day-head strong { font-size: 11px; }
.calendar-day-head.is-today strong { color: var(--coral-dark); }
.calendar-day-head.is-today::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; background: var(--coral); }
.calendar-time { position: sticky; left: 0; z-index: 5; height: 66px; padding: 7px 8px; border-right: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 8px; text-align: right; }
.calendar-cell { position: relative; height: 66px; border-right: 1px solid var(--border); border-bottom: 1px solid #eeece7; background: linear-gradient(to bottom, transparent 49%, rgba(232,229,222,.45) 50%, transparent 51%); }
.calendar-cell:hover { background-color: #faf8f4; }
.calendar-event { position: absolute; z-index: 4; left: 5px; right: 5px; top: 4px; min-height: 58px; padding: 7px 8px 6px 10px; overflow: hidden; border: 0; border-left: 3px solid var(--event-color, var(--coral)); border-radius: 7px; background: color-mix(in srgb, var(--event-color, var(--coral)) 14%, white); cursor: grab; text-align: left; box-shadow: 0 2px 4px rgba(30,29,26,.04); }
.calendar-event:active { cursor: grabbing; }
.calendar-event strong { display: block; font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calendar-event span { display: block; margin-top: 3px; color: #676b66; font-size: 7.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calendar-event small { position: absolute; right: 6px; bottom: 5px; font-size: 7px; color: #777; }
.calendar-now { pointer-events: none; position: absolute; z-index: 7; left: 54px; right: 0; height: 1px; background: var(--coral); }
.calendar-now::before { content: ''; position: absolute; left: -3px; top: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--coral); }

/* Customers */
.customer-toolbar { margin-bottom: 13px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.customer-grid { display: grid; grid-template-columns: repeat(3, minmax(220px, 1fr)); gap: 12px; }
.customer-card { min-height: 175px; padding: 17px; cursor: pointer; transition: transform .18s, box-shadow .18s, border-color .18s; }
.customer-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #ccc8bf; }
.customer-card-head { display: flex; justify-content: space-between; align-items: flex-start; }
.customer-avatar { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 13px; color: #476655; background: #dcebe1; font: 750 11px 'Manrope', sans-serif; }
.customer-card:nth-child(3n+2) .customer-avatar { color: #82564c; background: #f3ded8; }
.customer-card:nth-child(3n) .customer-avatar { color: #596c7b; background: #dde8ee; }
.customer-card h3 { margin: 12px 0 2px; font-size: 11px; }
.customer-card .contact { color: var(--muted); font-size: 8.5px; }
.customer-meta { margin-top: 14px; padding-top: 12px; border-top: 1px solid #ebe8e1; display: flex; justify-content: space-between; color: var(--muted); font-size: 8px; }
.customer-meta strong { color: var(--text); font-size: 9px; }
.view-toggle { display: flex; }
.view-toggle button { width: 33px; height: 33px; border: 1px solid var(--border); background: white; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.view-toggle button:first-child { border-radius: 8px 0 0 8px; }
.view-toggle button:last-child { border-left: 0; border-radius: 0 8px 8px 0; }
.view-toggle button.active { color: var(--text); background: var(--surface-2); }
.view-toggle svg { width: 14px; }

/* Detail panels */
.detail-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, .55fr); gap: 15px; }
.profile-cover { height: 95px; position: relative; border-radius: var(--radius) var(--radius) 0 0; background: linear-gradient(120deg, #1b211e, #3e5148); overflow: hidden; }
.profile-cover::after { content: ''; position: absolute; inset: 0; opacity: .16; background-image: radial-gradient(circle at 20% 50%, white 0 1px, transparent 1px), radial-gradient(circle at 70% 25%, white 0 1px, transparent 1px); background-size: 25px 25px, 31px 31px; }
.profile-summary { padding: 0 20px 18px; }
.profile-summary .customer-avatar { width: 64px; height: 64px; margin-top: -33px; position: relative; z-index: 2; border: 4px solid white; border-radius: 18px; font-size: 15px; }
.profile-heading { margin-top: 9px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.profile-heading h2 { margin: 0 0 4px; font: 750 17px 'Manrope', sans-serif; }
.profile-heading p { margin: 0; color: var(--muted); font-size: 9px; }
.profile-facts { margin-top: 16px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.profile-fact { padding: 10px; border-radius: 9px; background: #f5f3ed; }
.profile-fact small { display: block; color: var(--muted); font-size: 7.5px; margin-bottom: 3px; }
.profile-fact strong { font-size: 9px; }
.tabs { min-height: 43px; padding: 0 19px; border-bottom: 1px solid var(--border); display: flex; gap: 24px; }
.tabs button { position: relative; border: 0; background: transparent; color: var(--muted); font-size: 9px; font-weight: 650; cursor: pointer; }
.tabs button.active { color: var(--text); }
.tabs button.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--coral); }
.tattoo-gallery { padding: 16px 19px 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tattoo-tile { position: relative; aspect-ratio: 1.1; overflow: hidden; border-radius: 11px; color: white; background: #26302c; cursor: pointer; }
.tattoo-tile::before { content: ''; position: absolute; inset: 0; opacity: .55; background: var(--art, radial-gradient(circle, #7b9988, transparent 60%)); }
.tattoo-tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(0,0,0,.74)); }
.tattoo-tile span { position: absolute; z-index: 2; left: 10px; bottom: 9px; font-size: 8px; font-weight: 650; }
.note-item { padding: 13px 0; border-bottom: 1px solid #ece9e3; }
.note-item:last-child { border: 0; }
.note-item p { margin: 0 0 5px; font-size: 9px; line-height: 1.5; }
.note-item small { color: var(--muted); font-size: 8px; }

/* Team */
.team-grid { display: grid; grid-template-columns: repeat(4, minmax(190px, 1fr)); gap: 12px; }
.team-card { overflow: hidden; }
.team-card-color { height: 5px; background: var(--staff-color, var(--coral)); }
.team-card-body { padding: 17px; }
.team-card-head { display: flex; align-items: center; gap: 11px; }
.team-card-head > div:nth-child(2) { min-width: 0; }
.team-card h3 { margin: 0 0 2px; font-size: 11px; }
.team-card p { margin: 0; color: var(--muted); font-size: 8.5px; }
.team-card-stats { margin: 15px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.team-stat { padding: 9px; border-radius: 9px; background: #f3f1eb; }
.team-stat strong { display: block; font: 700 12px 'Manrope', sans-serif; }
.team-stat small { color: var(--muted); font-size: 7.5px; }
.availability { padding-top: 12px; border-top: 1px solid #ebe8e1; display: flex; justify-content: space-between; align-items: center; font-size: 8px; }
.vacation-layout { display: grid; grid-template-columns: 1.25fr .75fr; gap: 15px; margin-top: 15px; }
.week-schedule { padding: 18px; display: grid; grid-template-columns: 90px repeat(7, minmax(75px, 1fr)); gap: 1px; background: var(--border); }
.week-schedule > div { min-height: 51px; padding: 8px; background: var(--surface); font-size: 8px; }

/* Workflows */
.workflow-hero { min-height: 195px; padding: 25px 27px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 30px; color: white; border: 0; background: linear-gradient(128deg, #1c211f, #34443d); overflow: hidden; position: relative; }
.workflow-hero::after { content: ''; position: absolute; width: 330px; height: 330px; right: -100px; top: -100px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; box-shadow: 0 0 0 45px rgba(255,255,255,.018), 0 0 0 90px rgba(255,255,255,.018); }
.workflow-hero-copy { position: relative; z-index: 2; max-width: 560px; }
.workflow-hero .eyebrow { color: #ff9c84; }
.workflow-hero h2 { margin: 0 0 9px; font: 750 24px 'Manrope', sans-serif; letter-spacing: -1px; }
.workflow-hero p { margin: 0 0 18px; color: rgba(255,255,255,.58); font-size: 10px; line-height: 1.6; }
.qr-mini { position: relative; z-index: 2; width: 126px; height: 126px; padding: 10px; border-radius: 13px; background: white; box-shadow: 0 15px 35px rgba(0,0,0,.25); }
.qr-pattern { width: 100%; height: 100%; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 29 29'%3E%3Cpath fill='%23171a19' d='M1 1h8v8H1zm2 2v4h4V3zm17-2h8v8h-8zm2 2v4h4V3zM1 20h8v8H1zm2 2v4h4v-4zm9-20h2v3h3v2h-3v3h-2zm-1 10h3v2h3v-3h3v3h-2v3h3v3h-2v3h-3v-2h-3v2h-2v-4h3v-3h-4v-2h2zm11-1h6v2h-3v3h3v2h-6v-2h2v-3h-2zm-11 15h3v2h-3zm6-1h3v3h-3zm5-4h2v3h4v4h-2v-2h-5v-3z'/%3E%3C/svg%3E"); background-size: 100% 100%; }
.workflow-grid { margin-top: 15px; display: grid; grid-template-columns: 1.3fr .7fr; gap: 15px; }
.template-list { display: grid; }
.template-item { min-height: 64px; padding: 10px 0; border-bottom: 1px solid #ebe8e1; display: grid; grid-template-columns: 37px 1fr auto; gap: 11px; align-items: center; }
.template-item:last-child { border: 0; }
.template-icon { width: 37px; height: 37px; border-radius: 9px; display: grid; place-items: center; color: var(--coral-dark); background: #f7e5df; }
.template-icon svg { width: 16px; }
.template-item strong { display: block; font-size: 9.5px; }
.template-item p { margin: 3px 0 0; color: var(--muted); font-size: 7.5px; }
.workflow-step-list { display: grid; gap: 13px; }
.workflow-step { display: grid; grid-template-columns: 25px 1fr; gap: 10px; align-items: start; }
.workflow-step > span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--ink); font-size: 8px; font-weight: 800; }
.workflow-step strong { display: block; font-size: 9px; margin: 2px 0 3px; }
.workflow-step p { margin: 0; color: var(--muted); font-size: 7.5px; line-height: 1.5; }

/* Finance, reports and vouchers */
.finance-tabs { margin-bottom: 16px; }
.invoice-total { font-weight: 750; }
.cash-layout { display: grid; grid-template-columns: 1fr 300px; gap: 15px; }
.register-total { padding: 22px; color: white; background: var(--ink); }
.register-total small { color: rgba(255,255,255,.48); font-size: 8px; }
.register-total strong { display: block; margin: 5px 0 13px; font: 750 28px 'Manrope', sans-serif; letter-spacing: -1px; }
.payment-split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.payment-split div { padding: 10px; border-radius: 8px; background: rgba(255,255,255,.07); }
.payment-split span { display: block; font-size: 8px; color: rgba(255,255,255,.46); }
.payment-split b { font-size: 10px; }
.chart-card { min-height: 290px; }
.chart-area { height: 205px; padding: 17px 20px; position: relative; display: flex; align-items: flex-end; gap: 10px; }
.chart-area::before { content: ''; position: absolute; inset: 18px 20px 28px; background: repeating-linear-gradient(to bottom, transparent 0 39px, #ece9e3 40px); }
.bar-group { position: relative; z-index: 2; flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 7px; }
.bar { width: min(30px, 65%); height: var(--height); min-height: 4px; border-radius: 5px 5px 2px 2px; background: var(--bar-color, var(--coral)); transition: height .5s; }
.bar-group small { color: var(--muted); font-size: 7px; }
.stats-layout { display: grid; grid-template-columns: 1.4fr .6fr; gap: 15px; }
.donut-wrap { min-height: 205px; display: grid; place-items: center; }
.donut { width: 125px; height: 125px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--coral) 0 42%, var(--sage) 42% 72%, var(--blue) 72% 91%, var(--gold) 91%); }
.donut::after { content: ''; width: 78px; height: 78px; border-radius: 50%; background: var(--surface); }
.donut-center { position: absolute; text-align: center; }
.donut-center strong { display: block; font: 750 18px 'Manrope', sans-serif; }
.donut-center small { color: var(--muted); font-size: 7px; }
.leaderboard { display: grid; gap: 13px; }
.leader-row { display: grid; grid-template-columns: 24px 31px 1fr auto; gap: 9px; align-items: center; }
.leader-rank { color: var(--muted); font-size: 9px; font-weight: 700; }
.leader-name strong { display: block; font-size: 9px; }
.leader-name .progress { margin-top: 5px; }
.leader-value { font-size: 9px; font-weight: 700; }
.marketing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.loyalty-preview { min-height: 210px; padding: 23px; color: white; overflow: hidden; position: relative; background: linear-gradient(135deg, #272d2a, #4a6257); }
.loyalty-preview::after { content: '✦'; position: absolute; right: -5px; bottom: -45px; color: rgba(255,255,255,.07); font-size: 180px; }
.loyalty-preview h3 { margin: 25px 0 6px; font: 700 18px 'Manrope', sans-serif; }
.loyalty-preview p { max-width: 350px; margin: 0; color: rgba(255,255,255,.55); font-size: 9px; line-height: 1.5; }
.loyalty-rule { margin-top: 17px; display: inline-flex; padding: 7px 10px; border-radius: 7px; background: rgba(255,255,255,.1); font-size: 8px; }
.voucher-card { position: relative; min-height: 210px; padding: 22px; overflow: hidden; color: #f6efe2; background: #8e554a; }
.voucher-card::after { content: ''; position: absolute; width: 180px; height: 180px; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; right: -60px; top: -60px; box-shadow: 0 0 0 25px rgba(255,255,255,.025), 0 0 0 50px rgba(255,255,255,.025); }
.voucher-brand { font: 750 11px 'Manrope', sans-serif; }
.voucher-amount { margin-top: 34px; font: 750 37px 'Manrope', sans-serif; letter-spacing: -2px; }
.voucher-code { color: rgba(255,255,255,.55); font-size: 8px; letter-spacing: 2px; }

/* Settings */
.settings-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 15px; }
.settings-nav { padding: 10px; align-self: start; }
.settings-nav button { width: 100%; height: 38px; padding: 0 10px; border: 0; border-radius: 8px; display: flex; align-items: center; gap: 9px; background: transparent; color: var(--muted); font-size: 9.5px; font-weight: 600; cursor: pointer; }
.settings-nav button svg { width: 15px; }
.settings-nav button.active { color: var(--text); background: var(--surface-2); }
.settings-panel { padding: 22px; }
.settings-section { padding-bottom: 23px; margin-bottom: 23px; border-bottom: 1px solid var(--border); }
.settings-section:last-child { border: 0; margin: 0; padding: 0; }
.settings-section h3 { margin: 0 0 5px; font: 700 13px 'Manrope', sans-serif; }
.settings-section > p { margin: 0 0 17px; color: var(--muted); font-size: 9px; }
.settings-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.settings-form .full { grid-column: 1 / -1; }
.upload-box { min-height: 85px; padding: 13px; border: 1px dashed #c9c5bc; border-radius: 10px; display: flex; align-items: center; gap: 13px; background: #faf9f5; cursor: pointer; }
.upload-icon { width: 48px; height: 48px; border-radius: 10px; display: grid; place-items: center; color: var(--coral-dark); background: #f4e5df; }
.upload-icon svg { width: 20px; }
.upload-box strong { display: block; font-size: 9px; }
.upload-box small { display: block; color: var(--muted); font-size: 8px; margin-top: 3px; }
.color-palette { display: flex; gap: 9px; }
.color-swatch { width: 31px; height: 31px; border: 3px solid white; border-radius: 50%; background: var(--color); box-shadow: 0 0 0 1px var(--border); cursor: pointer; }
.color-swatch.active { box-shadow: 0 0 0 2px var(--ink); }
.switch-row { min-height: 51px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border-bottom: 1px solid #ece9e3; }
.switch-row:last-child { border: 0; }
.switch-row strong { display: block; font-size: 9.5px; }
.switch-row p { margin: 3px 0 0; color: var(--muted); font-size: 8px; }
.switch { width: 36px; height: 20px; padding: 2px; border: 0; border-radius: 10px; background: #cbc9c3; cursor: pointer; }
.switch::after { content: ''; display: block; width: 16px; height: 16px; border-radius: 50%; background: white; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch.on { background: var(--ink); }
.switch.on::after { transform: translateX(16px); }

/* Modal, command menu and toast */
.modal-backdrop { position: fixed; z-index: 150; inset: 0; padding: 22px; display: grid; place-items: center; background: rgba(15,17,16,.57); backdrop-filter: blur(3px); animation: fade-in .2s ease; }
@keyframes fade-in { from { opacity: 0; } }
.modal { width: min(580px, 100%); max-height: calc(100vh - 44px); overflow: auto; border-radius: 18px; background: var(--surface); box-shadow: 0 25px 80px rgba(0,0,0,.28); animation: modal-in .22s ease; }
.modal--wide { width: min(820px, 100%); }
.modal--narrow { width: min(430px, 100%); }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.modal-header { min-height: 68px; padding: 17px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.modal-header h2 { margin: 0; font: 700 16px 'Manrope', sans-serif; }
.modal-header p { margin: 3px 0 0; color: var(--muted); font-size: 8.5px; }
.modal-body { padding: 20px; }
.modal-footer { min-height: 66px; padding: 13px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.modal-close { font-size: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label { display: grid; gap: 7px; color: #555954; font-size: 9px; font-weight: 650; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid var(--border); border-radius: 9px; outline: 0; color: var(--text); background: #faf9f6; font-size: 10px; }
.form-grid textarea { padding-top: 11px; min-height: 75px; resize: vertical; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(239,123,97,.1); background: white; }
.command-backdrop { position: fixed; z-index: 180; inset: 0; padding-top: 13vh; display: flex; align-items: flex-start; justify-content: center; background: rgba(17,19,18,.48); backdrop-filter: blur(3px); }
.command-box { width: min(570px, calc(100% - 30px)); overflow: hidden; border-radius: 15px; background: var(--surface); box-shadow: 0 25px 70px rgba(0,0,0,.25); }
.command-input { height: 57px; padding: 0 17px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.command-input svg { width: 19px; color: var(--muted); }
.command-input input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 13px; }
.command-results { max-height: 340px; overflow-y: auto; padding: 8px; }
.command-group-label { padding: 8px 9px 5px; color: #9a9b96; font-size: 7.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.command-item { width: 100%; min-height: 45px; padding: 7px 9px; border: 0; border-radius: 8px; display: grid; grid-template-columns: 31px 1fr auto; gap: 10px; align-items: center; text-align: left; background: transparent; cursor: pointer; }
.command-item:hover { background: var(--surface-2); }
.command-item-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; background: #e9e6de; color: var(--muted); }
.command-item-icon svg { width: 14px; }
.command-item strong { display: block; font-size: 9.5px; }
.command-item small { display: block; color: var(--muted); font-size: 8px; margin-top: 2px; }
.command-item > span:last-child { color: #aaa; font-size: 10px; }
.toast-root { position: fixed; z-index: 250; right: 20px; bottom: 20px; display: grid; gap: 8px; }
.toast { min-width: 280px; max-width: 390px; min-height: 53px; padding: 11px 14px; border: 1px solid rgba(255,255,255,.08); border-radius: 11px; display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; color: white; background: #252927; box-shadow: 0 14px 35px rgba(0,0,0,.22); animation: toast-in .25s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.toast-icon { width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; color: #17221b; background: #a9cfb8; font-weight: 800; }
.toast strong { display: block; font-size: 9px; }
.toast span { display: block; margin-top: 2px; color: rgba(255,255,255,.52); font-size: 8px; }
.toast button { border: 0; background: transparent; color: rgba(255,255,255,.45); cursor: pointer; }

/* Public check-in */
.checkin-view { min-height: 100vh; background: #efede7; }
.checkin-topbar { height: 65px; padding: 0 6vw; display: flex; align-items: center; justify-content: space-between; color: white; background: var(--ink); }
.checkin-brand { display: flex; align-items: center; gap: 10px; font: 750 15px 'Manrope', sans-serif; }
.checkin-brand .brand-mark { width: 29px; height: 29px; }
.secure-label { display: flex; align-items: center; gap: 6px; color: rgba(255,255,255,.55); font-size: 8px; }
.secure-label svg { width: 13px; }
.checkin-shell { width: min(720px, calc(100% - 28px)); margin: 28px auto; }
.checkin-studio { margin-bottom: 18px; text-align: center; }
.checkin-banner { height: 120px; overflow: hidden; border-radius: var(--radius-lg); margin: 0 0 16px; background: var(--surface-2); }
.checkin-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.checkin-studio .studio-monogram { width: 47px; height: 47px; margin: 0 auto 9px; border-radius: 13px; }
.checkin-studio .studio-monogram--logo { overflow: hidden; background: var(--surface); border: 1px solid var(--border); }
.checkin-studio .studio-monogram--logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.checkin-studio h1 { margin: 0 0 4px; font: 750 20px 'Manrope', sans-serif; }
.checkin-studio p { margin: 0; color: var(--muted); font-size: 9px; }
.stepper { margin: 0 0 17px; display: flex; align-items: center; justify-content: center; }
.step-item { display: flex; align-items: center; }
.step-circle { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid #cac7bf; border-radius: 50%; color: #989a95; background: #efede7; font-size: 8px; font-weight: 800; }
.step-item.active .step-circle, .step-item.done .step-circle { color: white; border-color: var(--ink); background: var(--ink); }
.step-label { margin-left: 6px; color: #979995; font-size: 7.5px; font-weight: 650; }
.step-item.active .step-label { color: var(--text); }
.step-line { width: clamp(14px, 5vw, 50px); height: 1px; margin: 0 8px; background: #cbc8c0; }
.step-item.done + .step-line { background: var(--ink); }
.checkin-card { overflow: hidden; }
.checkin-card-head { padding: 21px 23px 16px; border-bottom: 1px solid var(--border); }
.checkin-card-head .eyebrow { margin-bottom: 9px; }
.checkin-card-head h2 { margin: 0 0 6px; font: 750 18px 'Manrope', sans-serif; }
.checkin-card-head p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.checkin-card-body { padding: 21px 23px; }
.checkin-card-foot { padding: 14px 23px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; }
.consent-copy { max-height: 260px; padding: 15px; overflow-y: auto; border: 1px solid var(--border); border-radius: 9px; background: #f8f6f1; color: #555954; font-size: 9px; line-height: 1.7; }
.consent-copy h3 { color: var(--text); font-size: 10px; }
.consent-options { margin-top: 15px; display: grid; gap: 9px; }
.option-card { min-height: 46px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; display: flex; align-items: center; gap: 10px; font-size: 9px; cursor: pointer; }
.option-card:hover { border-color: #bbb8b0; }
.option-card input { accent-color: var(--ink); }
.signature-pad { height: 135px; position: relative; border: 1px dashed #bbb8b0; border-radius: 10px; background: #fbfaf7; overflow: hidden; }
.signature-pad canvas { width: 100%; height: 100%; touch-action: none; }
.signature-placeholder { pointer-events: none; position: absolute; inset: 0; display: grid; place-items: center; color: #a5a69f; font-size: 9px; }
.completion { padding: 30px 20px; text-align: center; }
.completion-icon { width: 62px; height: 62px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--sage); font-size: 27px; }
.completion h2 { margin: 0 0 8px; font: 750 21px 'Manrope', sans-serif; }
.completion p { max-width: 430px; margin: auto; color: var(--muted); font-size: 9.5px; line-height: 1.6; }

/* Responsive */
@media (max-width: 1120px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .customer-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: minmax(0, 1.35fr) minmax(250px, .65fr); }
  .settings-layout { grid-template-columns: 180px 1fr; }
}

@media (max-width: 900px) {
  .auth-view { grid-template-columns: .8fr 1.2fr; }
  .auth-visual { padding: 36px 30px; }
  .auth-quote p { font-size: 40px; letter-spacing: -2px; }
  .auth-proof { display: none; }
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; box-shadow: 15px 0 45px rgba(0,0,0,.25); }
  .platform-access-banner { left: 0; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: grid !important; }
  .sidebar-scrim { position: fixed; z-index: 55; inset: 0; border: 0; background: rgba(17,19,18,.5); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .sidebar.open + .sidebar-scrim { opacity: 1; pointer-events: auto; }
  .workspace { margin-left: 0; }
  .mobile-menu { display: grid !important; }
  .mobile-wordmark { display: block !important; font: 800 16px 'Manrope', sans-serif; }
  .topbar { padding: 0 19px; justify-content: flex-start; }
  .global-search { margin-left: auto; width: 38px; padding: 0; justify-content: center; background: transparent; }
  .global-search span:nth-child(2), .global-search kbd { display: none; }
  .dashboard-grid, .detail-layout, .workflow-grid, .stats-layout, .cash-layout { grid-template-columns: 1fr; }
  .dashboard-side { grid-template-columns: 1fr 1fr; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { display: flex; overflow-x: auto; }
  .settings-nav button { width: auto; flex: 0 0 auto; }
}

@media (max-width: 680px) {
  :root { --topbar: 61px; }
  .app-shell { --platform-banner-height: 98px; }
  .platform-access-banner { padding: 9px 12px; flex-wrap: wrap; gap: 7px; }
  .platform-access-banner__copy { width: 100%; }
  .platform-access-banner__copy small { white-space: normal; }
  .platform-access-banner__actions { width: 100%; }
  .platform-access-banner__actions .button { flex: 1; padding: 0 8px; font-size: 11px; }
  .auth-view { display: block; background: var(--surface); }
  .auth-visual { display: none; }
  .auth-panel { min-height: 100vh; padding: 28px 22px 20px; justify-content: flex-start; }
  .auth-mobile-brand { margin-bottom: 55px; display: flex; align-items: center; gap: 9px; font: 800 18px 'Manrope', sans-serif; }
  .auth-mobile-brand .brand-mark { width: 32px; height: 32px; }
  .auth-card { margin: 0 auto; }
  .auth-legal { margin-top: 40px; }
  .field-pair, .form-grid, .settings-form { grid-template-columns: 1fr; }
  .form-grid .full, .settings-form .full { grid-column: 1; }
  .topbar { gap: 9px; padding: 0 12px; }
  .mobile-wordmark { margin-right: auto; }
  .topbar .button--compact { width: 37px; padding: 0; font-size: 0; }
  .topbar .button--compact span { font-size: 18px; }
  .topbar-actions { gap: 2px; }
  #language-button { display: none; }
  .page-content { padding: 20px 14px 84px; }
  .page-header, .welcome-header { align-items: flex-start; }
  .page-header { margin-bottom: 18px; }
  .page-header h1, .welcome-header h1 { font-size: 23px; }
  .page-header > .header-actions .button--outline { display: none; }
  .welcome-header .date-pill { display: none; }
  .metrics-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .metric-card { min-height: 104px; padding: 13px; }
  .dashboard-side { grid-template-columns: 1fr; }
  .team-grid, .customer-grid, .marketing-grid { grid-template-columns: 1fr; }
  .customer-toolbar { align-items: stretch; }
  .search-field { min-width: 0; flex: 1; }
  .platform-toolbar { align-items: stretch; flex-direction: column; }
  .platform-toolbar .search-field { width: 100%; flex: 0 0 auto; }
  .platform-studio-grid { grid-template-columns: 1fr; }
  .platform-pagination .button { flex: 1; }
  .toolbar .button--outline { display: none; }
  .data-table th:nth-child(n+4), .data-table td:nth-child(n+4) { display: none; }
  .data-table th, .data-table td { padding-left: 10px; padding-right: 10px; }
  .card { border-radius: 14px; }
  .calendar-shell { margin-left: -14px; margin-right: -14px; border-left: 0; border-right: 0; border-radius: 0; }
  .calendar-toolbar { align-items: flex-start; flex-wrap: wrap; }
  .staff-filter { order: 3; width: 100%; }
  .segmented button { padding: 0 8px; }
  .date-navigator strong { min-width: 112px; }
  .vacation-layout { grid-template-columns: 1fr; }
  .profile-facts { grid-template-columns: 1fr 1fr; }
  .tattoo-gallery { grid-template-columns: 1fr 1fr; }
  .workflow-hero { grid-template-columns: 1fr; padding: 22px; }
  .workflow-hero .qr-mini { display: none; }
  .settings-panel { padding: 17px; }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal { width: 100%; max-height: 94vh; border-radius: 18px 18px 0 0; }
  .modal--wide, .modal--narrow { width: 100%; }
  .toast-root { left: 12px; right: 12px; bottom: 12px; }
  .toast { min-width: 0; width: 100%; }
  .checkin-shell { margin-top: 18px; }
  .step-label { display: none; }
  .step-line { width: 28px; }
  .checkin-card-body, .checkin-card-head { padding-left: 16px; padding-right: 16px; }
}

@media print {
  .sidebar, .topbar, .platform-access-banner, .page-header, .header-actions, .finance-tabs { display: none !important; }
  .app-shell.platform-access-active .workspace { padding-top: 0; }
  .workspace { margin: 0; }
  .page-content { padding: 0; }
  .card { box-shadow: none; border-color: #aaa; }
  body { background: white; }
  body.printing-document > *:not(#modal-root) { display: none !important; }
  body.printing-document .modal-backdrop { position: static; display: block; padding: 0; background: white; backdrop-filter: none; }
  body.printing-document .modal { width: 100%; max-height: none; overflow: visible; border-radius: 0; box-shadow: none; }
  body.printing-document .modal-header, body.printing-document .modal-footer { display: none !important; }
  body.printing-document .modal-body { padding: 0; }
  body.printing-document .print-document { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
