/* Shared visual language for the photography workspace. */
:root, body.dark {
  color-scheme: dark;
  --bg: #171719;
  --surface: #222123;
  --text: #f4f0eb;
  --muted: #bbb6b0;
  --line: #403b37;
  --accent: #e6d8c6;
  --accent-2: #35302b;
  --danger: #fa9b91;
  --warn: #e5b772;
  --shadow: 0 8px 28px #0003;
  --on-accent: #27221c;
}
body { font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button { font-weight: 600; border-radius: 10px; min-height: 42px; transition: background .15s, box-shadow .15s; }
button { color: var(--on-accent); }
button.secondary, button.ghost, .icon-button { color: var(--text); }
button.danger { color: #3c1414; background: #ffb3ab; }
input::placeholder, textarea::placeholder { color: #afa192; opacity: 1; }
.tabs button.active, .tableau-pick.selected { color: var(--on-accent); background: var(--accent); }
.icon-button:hover, .qty-stepper button:hover:not(:disabled), .project-card .toolbar button:hover { color: var(--on-accent); background: var(--accent); }
.subnav button:hover { color: var(--accent); background: var(--accent-2); }
.qty-stepper button, .qty-stepper input { color: var(--text); }
.tableau-pick { color: var(--text); }
.login-card .error { color: var(--danger); }
button:disabled { opacity: 1; background: #36312c; color: #c3b7aa; border: 1px solid #575047; }
input:disabled, select:disabled, textarea:disabled { opacity: 1; color: #c3b7aa; background: #2f2b27; }
button:hover:not(:disabled) { filter: brightness(.96); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
input, select, textarea { border-radius: 9px; min-height: 43px; font-weight: 400; }
input[type=checkbox], input[type=radio] { min-height: auto; accent-color: var(--accent); }
label { font-weight: 500; color: var(--muted); }
a { color: var(--accent); }
.ui-icon { width: 20px; height: 20px; flex: 0 0 auto; vertical-align: middle; }
.app-shell { grid-template-columns: 232px minmax(0, 1fr); }
.sidebar { background: #24211d; border: 0; color: #f8f7f5; padding: 32px 18px 20px; position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 33px; font-size: 24px; font-weight: 650; letter-spacing: -.6px; line-height: 1.2; }
.brand-mark { display: grid; place-items: center; background: #f6f4f1; color: #a79076; border-radius: 13px; width: 42px; height: 46px; }
.brand-mark .ui-icon { width: 26px; height: 26px; }
.brand-subtitle { display: block; font-size: 11px; letter-spacing: 1px; color: #baad9f; font-weight: 400; margin-top: 4px; }
.nav-label { font-size: 10px; color: #a69785; letter-spacing: 1.8px; padding: 0 13px; }
.nav { gap: 5px; }
.settings-nav { margin-top: 16px; }
.settings-nav summary { cursor: pointer; padding: 12px; color: #c0b4a7; font-size: 12px; }
.settings-nav button { width: 100%; }
.scope-switch { display: flex; justify-content: flex-end; margin-top: -20px; }
.scope-switch button { font-size: 11px; border: 0; color: var(--muted); padding: 4px 0; min-height: 28px; }
.advanced-settings > summary { cursor: pointer; font-weight: 550; color: var(--muted); padding: 12px 0; }
.advanced-settings[open] > summary { color: var(--text); margin-bottom: 10px; }
.filter-grid.tablo-filters { grid-template-columns: 1.5fr 1fr 1fr; }
.nav button { display: flex; align-items: center; gap: 12px; color: #c8c0b6; font-size: 13px; min-height: 46px; font-weight: 500; }
.nav button.active, .nav button:hover { background: #464039; border-color: transparent; color: #faf8f6; }
.sidebar-account { display: flex; align-items: center; gap: 9px; margin-top: auto; border-top: 1px solid #ffffff19; padding-top: 20px; font-size: 11px; }
.sidebar-account strong { display: block; max-width: 104px; overflow-wrap: anywhere; font-weight: 600; }
.sidebar-account small { display: block; color: #c0b4a7; font-size: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #49423b; display: grid; place-items: center; flex: 0 0 auto; font-size: 13px; }
.sidebar-account .icon-button { margin-left: auto; background: transparent; border: 0; color: #d1c5b8; width: 30px; min-height: 32px; }
.main { padding: 40px clamp(20px, 3.5vw, 60px); min-width: 0; }
#content { max-width: 1440px; margin: auto; }
.topbar { margin-bottom: 30px; }
.topbar h1 { font-size: clamp(25px, 2.5vw, 34px); font-weight: 650; letter-spacing: -1px; line-height: 1.2; }
.topbar p { margin: 9px 0 0; font-size: 13px; }
.topbar-actions { min-width: 0; }
.topbar-actions > div { min-width: 0 !important; max-width: 260px; }
.grid { gap: 22px; }
.panel { border-radius: 16px; box-shadow: none; padding: 24px; }
.panel h2 { font-size: 17px; font-weight: 650; letter-spacing: -.3px; }
.dashboard-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0 0 10px; }
.dashboard-stat { display: flex; align-items: center; gap: 15px; padding: 21px 17px; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; }
.dashboard-stat span:not(.stat-icon) { color: var(--muted); font-size: 12px; }
.dashboard-stat strong { display: block; font-size: 29px; font-weight: 600; letter-spacing: -1px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.stat-icon { display: grid; place-items: center; height: 42px; width: 42px; flex: 0 0 auto; background: var(--accent-2); color: var(--accent); border-radius: 12px; }
.project-filters { background: transparent; border: 0; padding: 0; gap: 20px; }
.project-filters h2 { margin: 0; font-size: 21px; }
.project-filters p { margin: 5px 0 0; font-size: 12px; }
.count-badge { display: inline-grid; place-items: center; font-size: 12px; min-width: 26px; height: 25px; margin-left: 6px; background: var(--line); border-radius: 7px; vertical-align: middle; }
.filter-grid { display: grid; grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr)); gap: 12px; }
.filter-footer { display: flex; align-items: center; justify-content: space-between; margin-top: -12px; font-size: 12px; }
.filter-footer button { font-size: 12px; min-height: 30px; padding: 4px 0; border: 0; color: var(--muted); }
.project-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.project-list.compact { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.project-card { min-height: 0; padding: 22px; gap: 21px; cursor: default; transition: border-color .2s, box-shadow .2s; }
.project-card:hover { border-color: color-mix(in srgb, var(--accent) 38%, var(--line)); box-shadow: var(--shadow); }
.card-eyebrow { display: flex; align-items: center; gap: 9px; }
.project-type-icon { color: var(--accent); }
.badge { font-weight: 550; padding: 4px 9px; font-size: 11px; }
.lock-label { margin-left: auto; color: var(--muted); font-size: 12px; }
.project-title { background: transparent; color: var(--text); padding: 0; text-align: left; font-size: 21px; font-weight: 650; line-height: 1.3; letter-spacing: -.5px; min-height: 0; border-radius: 2px; }
.project-title:hover { color: var(--accent); }
.project-meta { font-size: 12px; line-height: 1.5; }
.project-title-block { gap: 8px; }
.project-stats { gap: 0; padding: 15px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.project-stats div { padding: 0 10px; background: none; border: 0; border-radius: 0; border-right: 1px solid var(--line); }
.project-stats div:first-child { padding-left: 0; }
.project-stats div:last-child { border: 0; }
.project-stats span { font-size: 12px; text-transform: none; font-weight: 500; }
.project-stats strong { font-size: 22px; font-weight: 600; margin-top: 3px; }
.project-status { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--accent); }
.project-status.is-overdue { color: var(--warn); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.order-progress { font-size: 12px; gap: 10px; }
.order-progress-track { height: 5px; }
.card-actions { gap: 6px; margin-top: auto; }
.card-actions button { font-size: 12px; padding: 8px 10px; display: flex; align-items: center; gap: 5px; min-height: 38px; }
.card-actions .ui-icon { width: 15px; height: 15px; }
.card-actions .secondary { margin-left: auto; }
.card-actions .ghost { border: 0; padding-left: 0; }
.subnav { border-bottom: 1px solid var(--line); padding-bottom: 15px; margin-bottom: 6px; gap: 6px; }
.subnav button { border: 0; font-size: 12px; background: transparent; }
.subnav button.active { background: var(--accent-2); color: var(--accent); }
.progress { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.progress-step, .progress-large .progress-step { opacity: 1; }
.progress-large .progress-step span, .progress-large .progress-step.current span { height: 6px; }
.progress-step.current span { box-shadow: none; }
.table-wrap { border-radius: 12px; }
th { padding: 13px 15px; background: var(--bg); font-size: 12px; letter-spacing: .3px; }
td { padding: 15px; font-size: 13px; }
tbody tr:hover td { background: color-mix(in srgb, var(--accent-2) 40%, var(--surface)); }
.dropzone { padding: 38px 24px; border-radius: 14px; border-width: 1px; }
.photo, .customer-photo { border-radius: 14px; box-shadow: none; }
.photo img { object-fit: contain; }
.photo-body > strong { overflow-wrap: anywhere; font-size: 12px; }
.customer-photo-frame { background: #1a1816; }
.customer-order-bar { box-shadow: 0 8px 40px #0002; border-color: var(--accent); }
.modal-backdrop { background: #1b1916d0; backdrop-filter: blur(5px); }
.modal { border-radius: 18px; padding: 28px; max-height: calc(100dvh - 40px); overflow-y: auto; }
.login { background: radial-gradient(ellipse at 20% 10%, #575048 0, #24211d 60%); }
.login-card { border-radius: 20px; padding: 36px; }
.login-card h1 { font-size: 27px; letter-spacing: -.8px; }
@media (min-width: 861px) and (max-width: 1150px) {
  .app-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .dashboard-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .dashboard-stat { padding: 16px 12px; }
  .dashboard-stat .stat-icon { display: none; }
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .app-shell { display: block; }
  .sidebar { height: auto; position: static; padding: 16px 20px; gap: 12px; }
  .brand { font-size: 20px; padding: 0; }
  .brand-mark { height: 36px; width: 36px; }
  .brand-subtitle { font-size: 10px; }
  .nav-label, .avatar, .sidebar-account > div { display: none; }
  .nav { display: flex; flex-wrap: wrap; gap: 4px; padding-right: 25px; }
  .nav button { min-height: 40px; padding: 8px 10px; font-size: 12px; }
  .nav .ui-icon { width: 16px; height: 16px; }
  .sidebar-account { position: absolute; right: 16px; top: 17px; padding: 0; border: 0; margin: 0; }
  .main { padding: 26px 18px; overflow: visible; }
  .topbar { flex-direction: row; flex-wrap: wrap; gap: 14px; margin-bottom: 24px; }
  .topbar h1 { font-size: 26px; }
  .topbar-actions { flex: 0 1 auto; max-width: 100%; }
  .dashboard-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .dashboard-stat { gap: 10px; padding: 14px 12px; }
  .dashboard-stat strong { font-size: 24px; }
  .dashboard-stat span:not(.stat-icon) { font-size: 12px; }
  .stat-icon { height: 32px; width: 32px; border-radius: 9px; }
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-grid.tablo-filters { grid-template-columns: minmax(0, 1fr); }
  .settings-nav { margin-top: 0; }
  .panel { padding: 18px; }
  .project-filters { padding: 0; }
  .project-filters > .split { align-items: start; flex-wrap: wrap; }
  .project-list { grid-template-columns: minmax(0, 1fr); }
  .split { flex-wrap: wrap; }
  .order-progress .split { flex-wrap: nowrap; }
  .subnav { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
  .subnav button { white-space: nowrap; flex: 0 0 auto; }
  .technical-grid, .settings-columns { grid-template-columns: minmax(0, 1fr); }
  .customer-product-row span { white-space: normal; flex-wrap: wrap; }
  .customer-order-bar { bottom: 8px; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }

/* Quiet, typography-led brand entrance. */
.login {
  min-height: 100svh;
  padding: 48px 24px;
  background: radial-gradient(ellipse at 50% 15%, #262320 0, #171719 52%, #141416 100%);
}
.login-card {
  width: min(360px, 100%);
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.login-brand { text-align: center; margin-bottom: 44px; }
.login-eyebrow { display: block; color: #b6afa7; font-size: 10px; letter-spacing: .3em; font-weight: 500; margin-bottom: 18px; }
.login-card h1 { color: #f2e9dd; font-family: Georgia, 'Times New Roman', serif; font-weight: 400; font-size: clamp(34px, 8vw, 43px); line-height: 1.15; letter-spacing: -1.7px; margin: 0; white-space: nowrap; }
.login-card h1 em { font-weight: 400; }
.login-card .form { gap: 20px; }
.login-card label { color: #bbb6b0; font-size: 12px; font-weight: 400; letter-spacing: .015em; }
.login-card input { margin-top: 8px; height: 50px; background: #202022; border: 1px solid #3e3b39; color: #f4f0eb; border-radius: 8px; }
.login-card button { margin-top: 6px; height: 50px; background: #39312b; color: #e8ddd0; border: 1px solid #625345; border-radius: 8px; font-size: 14px; }
.login-card input:focus-visible, .login-card button:focus-visible { outline-color: #ddcbb2; }
.login-card .error { margin: 0; font-size: 13px; line-height: 1.5; }
.login-card .error:empty { display: none; }
@media (max-width: 420px) { .login { padding: 36px 24px; } .login-brand { margin-bottom: 36px; } }

/* Selected RE monogram: full lockup at entry, compact mark in navigation. */
.login-brand { margin-bottom: 32px; }
.login-logo { display: block; width: min(215px, 100%); height: auto; margin: 0 auto; }
.brand-emblem { width: 48px; height: 44px; object-fit: contain; flex-shrink: 0; }
@media (max-width: 700px) {
  .brand-emblem { width: 38px; height: 36px; }
  .login-logo { width: min(200px, 100%); }
}
@media (max-height: 700px) {
  .login { padding-block: 24px; }
  .login-logo { width: min(180px, 100%); }
  .login-brand { margin-bottom: 24px; }
}

/* Warm graphite atmosphere shared with the login screen. */
body {
  background: radial-gradient(ellipse at 50% 0%, #302923 0, #1c1b1c 42%, #141416 100%);
  background-attachment: fixed;
  min-height: 100svh;
}
.sidebar {
  background: linear-gradient(165deg, #292521 0%, #1d1c1e 48%, #18181a 100%);
  border-right: 1px solid var(--line);
}
.nav button.active { background: #3b332c; color: #f2e5d4; box-shadow: none; }
.nav button:hover { background: #302b27; color: var(--text); }
.panel:not(.project-filters), .project-card, .dashboard-stat.task-stat, .project-cards .task-row {
  background: linear-gradient(135deg, #292624 0%, var(--surface) 65%);
  border-color: var(--line);
}
input, select, textarea { background: #202022; }
.modal { background: linear-gradient(145deg, #2b2724, #201f21 70%); }
.modal-backdrop { background: rgba(15,14,15,.82); }
button:disabled { background: #2d2b2a; color: #aba59f; border-color: #49433e; }
input:disabled, select:disabled, textarea:disabled { background: #292625; color: #aba59f; }
input::placeholder, textarea::placeholder { color: #a59e97; }
@media (max-width: 860px) { .sidebar { border-right: 0; border-bottom: 1px solid var(--line); } }

.login-card button:hover:not(:disabled) { background: #463a30; border-color: #8a735e; filter: none; }

/* Shared sizing for single-line fields, including native macOS selects. */
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=hidden]), select:not([multiple]) { box-sizing:border-box; height:44px; min-height:44px; }
select:not([multiple]) { min-width:0; }
select:not([multiple]) {
 appearance:none; -webkit-appearance:none; padding:10px 36px 10px 12px;
 background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23c9c1b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
 background-repeat:no-repeat; background-position:right 12px center;
}

/* Supplied vector wordmarks, fitted to each navigation surface. */
.brand-logo { display:block; width:100%; max-width:192px; height:auto; }
.login-logo { width:min(250px, 100%); height:auto; }
@media(max-width:760px) { .brand-logo { width:190px; max-width:100%; } }
@media(max-width:420px) { .login-logo { width:min(230px, 100%); } .brand-logo { width:176px; } }
