:root {
  color-scheme: light;
  --paper: #eaeeeb;
  --white: #f8faf8;
  --surface-alt: #e2e8e3;
  --ink: #202b25;
  --muted: #526158;
  --forest: #2a503e;
  --forest-light: #dbe7de;
  --on-accent: #ffffff;
  --gold: #775b2d;
  --line: #c8d2ca;
  --field-line: #899b8e;
  --sand: #e7e4d9;
  --danger: #a33031;
  --danger-surface: #f8e5e3;
  --pending: #76530f;
  --pending-surface: #f0e5ca;
  --shadow: 0 20px 70px #16281b24;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #141a18;
  --white: #1d2722;
  --surface-alt: #27342c;
  --ink: #edf3ee;
  --muted: #b7c5ba;
  --forest: #a0cbb2;
  --forest-light: #304b3b;
  --on-accent: #10271a;
  --gold: #ddc18a;
  --line: #425349;
  --field-line: #718a78;
  --sand: #302f26;
  --danger: #ffb6ae;
  --danger-surface: #452c2a;
  --pending: #f2ce81;
  --pending-surface: #3f3725;
  --shadow: 0 20px 70px #0005;
}
body { color: var(--ink); }
button, input, select, textarea { font-size: 14px; }
input, select, textarea { color: var(--ink); accent-color: var(--forest); }
.button { min-height: 44px; font-size: 14px; border-radius: 10px; }
.button.primary, .skip-link, .steps li.current button > span { background: var(--forest); color: var(--on-accent); }
.button.primary:hover:not(:disabled) { background: var(--forest); border-color: var(--forest); filter: brightness(.94); }
.button.secondary { background: var(--white); color: var(--ink); border-color: var(--field-line); }
.button.secondary:hover, .icon-button:hover { background: var(--surface-alt); }
.button.danger { background: var(--danger); color: var(--on-accent); }
.button.danger:hover { background: var(--danger); filter: brightness(.94); }
.danger-text, .field-error, .auth-error { color: var(--danger); }
.button.danger-text, .button.danger-text:hover { background: var(--danger-surface); }
.icon-button { width: 44px; height: 44px; min-width: 44px; color: var(--muted); }
.theme-toggle { border: 1px solid var(--line); background: var(--white); border-radius: 50%; font: 26px/1 'Segoe UI Symbol', sans-serif; }
.auth-theme-toggle { position: fixed; top: 15px; right: 15px; z-index: 5; }
.sidebar, .topbar, dialog, .editor-footer, .auth-form-panel, .activation-card { background: var(--white); }
.welcome-banner, .auth-story { background: var(--surface-alt); }
.welcome-banner { border-color: var(--line); }
.sidebar-note { display: none; }
.nav-item { font-size: 14px; }
.nav-item.active, .nav-item:hover, .filter-tabs button.active { background: var(--forest-light); color: var(--ink); }
.nav-count, .active .nav-count { background: var(--surface-alt); color: var(--ink); }
.workspace-label, .nav-caption, .eyebrow, .card-sku, .card-sku > span, .dialog-overline, .save-indicator,
.optional, .field-hint, .demo-caption, .profile div > span, .breadcrumb, .breadcrumb strong,
.auth-story .eyebrow, .auth-story > small, .auth-bottom { color: var(--muted); }
.search-field, .field input, .field select, .field textarea, .auth-page input, #review-reason { background: var(--white); color: var(--ink); border-color: var(--field-line); }
input::placeholder, textarea::placeholder, .auth-page input::placeholder { color: var(--muted); }
.field > label, .auth-page form label { color: var(--ink); font-size: 14px; }
.field input, .field select, .field textarea { font-size: 15px; }
.optional { font-size: 11px; }
.field-error { font-size: 13px; }
.status { font-size: 12px; padding: 6px 9px; color: var(--muted); background: var(--surface-alt); }
.status-pending { color: var(--pending); background: var(--pending-surface); }
.status-approved { color: var(--forest); background: var(--forest-light); }
.status-changes { color: var(--danger); background: var(--danger-surface); }
.review-comment { background: var(--pending-surface); border-color: var(--line); color: var(--pending); }
.review-comment strong, .review-comment p { color: var(--pending); font-size: 14px; }
.card-content h3, .preview-card-body h3 { color: var(--ink); }
.product-card, .preview-card, .stat-card, .activity-panel, .users-panel { background: var(--white); border-color: var(--line); }
.photo-remove, .photo-star, .main-photo-label, .image-count, .card-open { background: var(--white); color: var(--ink); border-color: var(--line); }
.photo-remove, .photo-star { width: 36px; height: 36px; }
.photo-remove .icon, .photo-star .icon { width: 18px; height: 18px; }
.mobile-nav { background: var(--white); }
.mobile-nav .new-product { color: var(--forest); }
.mobile-nav .new-product .icon { color: var(--on-accent); }
.toast, .empty-state { background: var(--white); color: var(--ink); }
.toast > span { font-size: 14px; }
.breadcrumb, .profile strong, .stat-card small, .card-sku, .card-description, .card-sizes > span,
.card-footer > span, .filter-tabs button, .sort-select select, .product-table th, .product-table td { font-size: 12px; }
.stat-card div > span { font-size: 13px; }
.page-heading p { font-size: 14px; }
.auth-page { background: var(--paper); }
.auth-story p, .auth-form-wrap > p, .auth-form-wrap .auth-help, .activation-card > p, .activation-back { color: var(--muted); }
.auth-form-wrap .auth-help { font-size: 13px; }
.auth-page form label { font-size: 14px; }
.auth-page input::placeholder { font-size: 15px; }

/* One workspace, one primary action for the employee. */
.employee-workspace { min-height: 100dvh; }
.employee-topbar { height: 82px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(28px, calc((100vw - 1160px) / 2)); gap: 16px; border-bottom: 1px solid var(--line); background: var(--white); }
.employee-topbar .brand { padding: 0; }
.employee-topbar .brand small { font-size: 8px; letter-spacing: 1px; }
.employee-tools { display: flex; gap: 12px; align-items: center; }
.account-menu { position: relative; z-index: 5; }
.account-menu summary { list-style: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--surface-alt); cursor: pointer; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu > div { position: absolute; top: 54px; right: 0; width: 245px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); box-shadow: var(--shadow); }
.account-menu strong { display: block; padding: 12px 10px; overflow-wrap: anywhere; }
.account-menu button { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 46px; text-align: left; border: 0; background: none; border-radius: 8px; padding: 9px; }
.account-menu button:hover { background: var(--surface-alt); }
.employee-workspace main { max-width: 1216px; padding: 32px 28px 60px; }
.employee-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.employee-heading h1 { font: 600 32px/1.2 'Segoe UI', sans-serif; letter-spacing: -.8px; }
.employee-heading p { color: var(--muted); margin-top: 10px; font-size: 15px; }
.employee-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.employee-toolbar .search-field { max-width: 440px; width: 100%; height: 48px; border-radius: 10px; }
.employee-toolbar input { font-size: 15px; }
.employee-filter select { min-height: 48px; padding: 10px 14px; border: 1px solid var(--field-line); border-radius: 10px; background: var(--white); color: var(--ink); font-size: 14px; max-width: 200px; }
.employee-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(265px, 1fr)); gap: 22px; }
.employee-card { border: 1px solid var(--line); background: var(--white); border-radius: 16px; overflow: hidden; animation: card-in .25s ease both; }
.employee-card-open { display: block; width: 100%; padding: 0; text-align: left; background: none; border: 0; }
.employee-card-open:hover h2 { text-decoration: underline; text-underline-offset: 4px; }
.employee-card-image { position: relative; aspect-ratio: 4 / 3; background: var(--surface-alt); }
.employee-card-image > img, .employee-card-image > .photo-empty { width: 100%; height: 100%; object-fit: contain; }
.employee-photo-count { position: absolute; bottom: 10px; right: 10px; display: flex; align-items: center; gap: 5px; background: var(--white); color: var(--ink); padding: 5px 7px; border-radius: 6px; font-size: 12px; }
.employee-photo-count .icon { width: 15px; height: 15px; }
.employee-card-info { padding: 18px; }
.employee-sku { display: block; font-size: 12px; color: var(--muted); margin-top: 15px; }
.employee-card-info h2 { font: 600 20px/1.3 'Segoe UI', sans-serif; margin-top: 5px; overflow-wrap: anywhere; }
.employee-card-info p { font-size: 14px; color: var(--muted); margin-top: 7px; overflow-wrap: anywhere; }
.employee-card-info small { display: block; font-size: 13px; color: var(--muted); margin-top: 10px; }
.employee-card-info .employee-comment { padding: 10px; border-radius: 8px; background: var(--pending-surface); color: var(--pending); }
.employee-card-actions { display: flex; gap: 8px; padding: 0 12px 12px; }
.employee-card-actions .button { flex: 1; padding: 10px; font-size: 14px; }
.employee-card-actions > span { display: flex; gap: 8px; align-items: center; min-height: 44px; padding: 0 8px; color: var(--muted); font-size: 13px; }
.employee-empty { text-align: center; padding: 80px 16px; color: var(--muted); }
.employee-empty > .icon { width: 40px; height: 40px; margin-bottom: 20px; }
.employee-empty h2 { font-size: 22px; color: var(--ink); }
.employee-empty p { margin: 12px auto 0; max-width: 360px; line-height: 1.7; }
.employee-mobile-add { display: none; }
.employee-editor { width: min(720px, calc(100vw - 48px)); height: min(940px, calc(100dvh - 48px)); }
.employee-editor .editor-header { padding: 20px 26px; }
.employee-editor #editor-title { font: 600 24px/1.3 'Segoe UI', sans-serif; margin-top: 5px; }
.employee-editor-scroll { flex: 1; min-height: 0; overflow-y: auto; }
.employee-editor .editor-form { overflow: visible; padding: 24px 26px; }
.employee-photo-section { margin-bottom: 28px; }
.employee-photo-section h3 { font-size: 16px; margin-bottom: 12px; }
.employee-editor .photo-drop { min-height: 120px; padding: 20px 12px; background: var(--surface-alt); border-color: var(--field-line); }
.photo-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.employee-editor .photo-drop small { font-size: 12px; line-height: 1.5; color: var(--muted); margin-top: 13px; }
.employee-editor .photo-editor-grid:empty { display: none; }
.employee-editor .photo-editor-item { aspect-ratio: 1; }
.employee-editor .main-photo-label { font-size: 11px; }
.employee-editor .field input, .employee-editor .field select, .employee-editor .field textarea { min-height: 48px; font-size: 16px; }
.employee-editor .variant-row { grid-template-columns: 1fr 1fr 44px; }
.employee-editor .variant-row .icon-button { width: 44px; }
.employee-editor .variant-head { grid-template-columns: 1fr 1fr 44px; font-size: 12px; }
.employee-editor .add-size { min-height: 44px; font-size: 14px; }
.employee-extra { border-top: 1px solid var(--line); margin-top: 24px; }
.employee-extra summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; min-height: 58px; font-weight: 600; }
.employee-extra > .fields-grid { padding-top: 14px; }
.employee-save-note { font-size: 13px; color: var(--muted); line-height: 1.6; margin-top: 20px; }
.employee-editor .editor-footer { padding: 16px 26px; }
.employee-editor .measurements-grid label { font-size: 12px; }
.employee-editor .measurements-grid input { font-size: 16px; background: var(--white); color: var(--ink); }
@media (max-width: 650px) {
  .employee-topbar { height: 70px; padding: 0 16px; }
  .employee-topbar .brand > span { font-size: 19px; }
  .employee-topbar .brand small { font-size: 6.5px; }
  .employee-tools { gap: 8px; }
  .employee-workspace main { padding: 28px 16px calc(100px + env(safe-area-inset-bottom)); }
  .employee-heading { margin-bottom: 22px; }
  .employee-heading h1 { font-size: 27px; }
  .employee-heading p { font-size: 14px; }
  .desktop-add { display: none; }
  .employee-toolbar { gap: 8px; }
  .employee-toolbar input { width: 100%; min-width: 0; font-size: 16px; }
  .employee-filter { flex-shrink: 0; }
  .employee-filter select { max-width: 142px; padding-left: 8px; font-size: 13px; }
  .employee-grid { grid-template-columns: 1fr; gap: 14px; }
  .employee-card-open { display: grid; grid-template-columns: 106px 1fr; align-items: start; padding: 12px; gap: 14px; }
  .employee-card-image { aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; }
  .employee-photo-count { right: 5px; bottom: 5px; font-size: 11px; }
  .employee-card-info { padding: 0; }
  .employee-card-info h2 { font-size: 18px; }
  .employee-sku { margin-top: 10px; }
  .employee-card-info small { margin-top: 6px; }
  .employee-mobile-add { display: block; position: fixed; bottom: 0; left: 0; right: 0; z-index: 4; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--white); border-top: 1px solid var(--line); }
  .employee-mobile-add .button { width: 100%; min-height: 50px; }
  .employee-editor { width: 100vw; height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .employee-editor .editor-header { padding: 16px; gap: 8px; }
  .employee-editor #editor-title { font-size: 21px; }
  .employee-editor .editor-header-actions { gap: 6px; }
  .employee-editor .save-indicator { font-size: 11px; }
  .employee-editor .editor-form { padding: 20px 16px; }
  .employee-editor .fields-grid { grid-template-columns: 1fr; gap: 20px; }
  .employee-editor .photo-buttons { display: grid; grid-template-columns: 1fr; width: 100%; }
  .employee-editor .photo-editor-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .employee-editor .photo-remove, .employee-editor .photo-star { width: 44px; height: 44px; right: 0; top: 0; border-radius: 8px; }
  .employee-editor .photo-star { top: auto; bottom: 0; left: 0; }
  .employee-editor .editor-footer { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); gap: 10px; }
  .employee-editor .editor-footer .button { min-height: 50px; padding: 12px; }
  .employee-editor #editor-next { flex: 1; }
  .employee-editor .measurements-grid { grid-template-columns: 1fr; }
  body[data-role="employee"] .detail-history { display: none; }
  .auth-page { padding-top: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
