/* Community Productions: warm charcoal surfaces and cream accents. Loaded last. */
:root{color-scheme:dark;--bg:#191815;--surface:#22211e;--surface-raised:#2d2b26;--ink:#f3f0e6;--muted:#aaa79e;--line:#3b3933;--accent:#e8dfc8;--accent-soft:#a99a75;--on-accent:#201e18;--purple:#e8dfc8;--blue:#e8dfc8}
body.dark-theme{background:var(--bg);color:var(--ink)}.dark-theme ::selection{background:#d4c493;color:#191815}
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.dark-theme a{color:var(--accent)}.dark-theme :focus-visible{outline:2px solid #ead9aa;outline-offset:4px}
.dark-theme input,.dark-theme select,.dark-theme textarea{color:var(--ink);background:#1c1b18;border-color:#565147;accent-color:var(--accent)}
.dark-theme input::placeholder,.dark-theme textarea::placeholder{color:#928d80;opacity:1}.dark-theme input:focus,.dark-theme select:focus,.dark-theme textarea:focus{border-color:#b6a987}
.dark-theme input[type=checkbox],.dark-theme input[type=radio]{width:auto}.dark-theme input[type=color]{min-width:40px;padding:3px}.dark-theme input[type=range]{accent-color:var(--accent)}
.dark-theme input:-webkit-autofill{-webkit-text-fill-color:var(--ink);box-shadow:0 0 0 1000px #24221d inset}
.dark-theme button,.dark-theme a,.dark-theme input,.dark-theme select,.dark-theme textarea{-webkit-tap-highlight-color:#e8dfc81a}
.dark-theme .topbar{display:flex;align-items:center;justify-content:space-between;gap:30px;min-height:90px;padding:18px max(32px,calc((100vw - 1360px)/2));background:#191815;border-bottom:1px solid var(--line)}
.dark-theme .brand{display:flex;align-items:center;flex:none;gap:12px;color:var(--ink);text-decoration:none;min-width:0}
.brand-logo{width:44px;height:44px;object-fit:contain;border-radius:5px;flex:none}.brand-name{display:block;font-size:14px;line-height:1.3;font-weight:600;letter-spacing:-.2px;white-space:nowrap}.brand-name>span{display:block;margin-top:4px;font-size:10px;font-weight:500;letter-spacing:.17em;text-transform:uppercase;color:#b1aa98}
.header-search{display:flex;align-items:center;gap:10px;flex:1;max-width:560px;min-width:150px;margin:0;background:#24221e;border:1px solid #3a3730;border-radius:9px;padding:0 11px 0 14px}
.header-search-icon{display:flex;color:#99917e;flex:none}.header-search-icon svg{width:17px;height:17px}
.dark-theme .header-search input{min-width:0;flex:1;width:100%;min-height:43px;border:0;background:transparent;padding:10px 0;box-shadow:none;font-size:12px;outline:none}.header-search:focus-within{border-color:#a49470;box-shadow:0 0 0 2px #a494701a}
.dark-theme .header-search button{display:grid;place-items:center;flex:none;width:28px;height:30px;padding:4px;border:0;border-radius:5px;background:transparent;color:var(--muted)}.header-search button svg{width:17px;height:17px}.dark-theme .header-search button:hover{color:var(--ink);background:#363228}
.dark-theme .header-actions{display:flex;align-items:center;flex-wrap:nowrap;justify-content:flex-end;gap:15px;width:auto;flex:none}
.header-workspace{display:inline-flex;align-items:center;gap:7px;border:1px solid transparent;min-height:38px;padding:7px 10px;border-radius:7px;color:var(--muted)!important;font-size:12px;text-decoration:none}.header-workspace svg{width:17px;height:17px}.header-workspace:hover,.header-workspace[aria-current]{background:#2c2922;border-color:#494334;color:var(--ink)!important}
.icon-button{display:inline-grid;place-items:center;position:relative;flex:none;width:38px;height:38px;background:transparent;border:1px solid transparent;border-radius:8px;color:var(--muted);text-decoration:none;cursor:pointer}.icon-button svg{width:21px;height:21px}.icon-button:hover{background:#302d26;color:var(--ink)}.notification-bell{padding:0!important}
.live-count:empty{display:none}.dark-theme .live-count:not(:empty){position:absolute;right:-3px;top:-3px;display:grid;place-items:center;min-width:16px;height:16px;padding:0 4px;border-radius:10px;background:#e8dfc8;color:#201e18;font-size:9px;font-weight:750;border:2px solid #191815}
.profile-menu{position:relative;font-size:12px;flex:none}.profile-menu summary{display:flex;align-items:center;gap:9px;cursor:pointer;list-style:none;padding:2px;border-radius:8px}.profile-menu summary::-webkit-details-marker{display:none}
.avatar{display:grid;place-items:center;flex:none;width:36px;height:36px;border:1px solid #605740;border-radius:50%;background:#3a3427;color:#eee0bd;font-size:13px;font-weight:650}.profile-name{max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:550}.profile-name small{display:block;color:var(--muted);font-size:10px;font-weight:400}.chevron{font-size:13px;color:var(--muted)}
.profile-content{position:absolute;right:0;top:calc(100% + 15px);z-index:1000;min-width:240px;max-width:calc(100vw - 36px);padding:20px;border:1px solid var(--line);border-radius:12px;background:#26241f;box-shadow:0 16px 50px #0008;overflow-wrap:anywhere}.profile-label{margin:0 0 8px;font-size:9px;letter-spacing:.1em;color:var(--muted)}.profile-role{display:block;font-size:11px;color:var(--muted);margin:4px 0 16px}.profile-content>a{display:block;font-size:12px;margin:14px 0;text-decoration:none}.profile-content form{margin:0}.profile-content .quiet{width:100%;text-align:left}
.dark-theme footer{background:#191815;border-color:var(--line);color:#979181;max-width:1440px;margin:0 auto;padding:20px 40px;font-size:10px}
.dark-theme .quiet{background:#2d2a24;color:var(--ink);border-color:var(--line)}.dark-theme .notice{color:#d6e5c2;background:#293025;border:1px solid #4c5b3b;border-radius:8px;padding:12px 16px;font-size:13px}
.dark-theme .workspace a.button:not(.secondary){color:var(--on-accent)}.dark-theme .workspace a.button.secondary{color:var(--ink)}
.dark-theme .workspace a,.dark-theme .text-link,.dark-theme .text-button{color:var(--accent)}
.dark-theme .panel,.dark-theme .crm-panel,.dark-theme .client-card,.dark-theme .crm-filters,.dark-theme .crm-summary>div{box-shadow:none}
.dark-theme .crm-shell select,.dark-theme .crm-shell textarea,.dark-theme .workspace input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=range]),.dark-theme .workspace select,.dark-theme .workspace textarea{background:#1c1b18;border-color:#565147;color:var(--ink)}
.dark-theme .planning-shell,.dark-theme.planning-shell{--ink:#f3f0e6;--muted:#aaa79e;--line:#3b3933;--purple:#e8dfc8}
.dark-theme .canvas-viewport{background-color:#191815}.dark-theme .canvas-card{color:var(--ink)}.dark-theme .canvas-rich[contenteditable=true]{background:#ffffff08}.dark-theme .canvas-connections text{stroke:#191815;fill:#d5c9aa}
.dark-theme #planning-app{height:calc(100dvh - 90px)}.dark-theme #planning-app a{color:var(--accent)}.dark-theme .drawing-preview{background:#f4f1e7;border-radius:5px}
.dark-theme .signature-pad,.dark-theme .signature-preview{background:#f4f1e7;border-color:#8f8774;color:#201e18}.dark-theme .signature-pad:focus-visible{outline-color:var(--accent)}
.dark-theme .review-comment-dialog{background:var(--surface);color:var(--ink);box-shadow:0 20px 80px #0008}.dark-theme .review-comment-dialog::backdrop{background:#080807b3}
.dark-theme .error,.dark-theme .field-error,.dark-theme .errorlist{color:#f0b0a2}.dark-theme .error{background:#3b2822;border-color:#815649}
.dark-theme .skip-link{background:var(--accent);color:var(--on-accent);z-index:2000}
@media(max-width:1100px){.dark-theme .topbar{gap:20px;padding:16px 28px}.profile-name,.chevron{display:none}.header-search{max-width:none}.dark-theme .header-actions{gap:10px}}
@media(max-width:760px){.dark-theme .topbar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px 12px;padding:16px 20px;min-height:0}.dark-theme .brand{gap:10px}.brand-logo{width:37px;height:37px}.brand-name{font-size:12px}.brand-name>span{font-size:9px;letter-spacing:.14em}.dark-theme .header-actions{grid-column:2;grid-row:1;gap:7px;margin:0;justify-content:flex-end;width:auto}.header-workspace{padding:6px}.header-workspace span{display:none}.header-workspace svg{width:19px;height:19px}.icon-button{width:34px;height:34px}.avatar{width:32px;height:32px;font-size:12px}.header-search{grid-column:1/-1;grid-row:2;max-width:none;width:100%;min-width:0}.dark-theme .header-search input{min-height:41px;font-size:13px}.dark-theme footer{padding:20px;font-size:10px;gap:8px;flex-wrap:wrap}.dark-theme #planning-app{height:calc(100dvh - 137px)}}
@media(max-width:370px){.dark-theme .topbar{padding:14px 16px;column-gap:8px}.brand-logo{width:32px;height:32px}.brand-name{font-size:11px}.dark-theme .header-actions{gap:3px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}


/* Keep the production canvas quiet and its drawing paper readable. */
.dark-theme .canvas-viewport{background-image:radial-gradient(#3a372f .5px,transparent .5px)}
.dark-theme .planning-heading,.dark-theme .planning-toolbar,.dark-theme .planning-rail,.dark-theme .planning-status{background:var(--surface)}
.dark-theme .new-audience-label select{background:#1c1b18}
.dark-theme .drawing-pad{background-color:#f4f1e7}

/* Shared controls include dynamically inserted editors and native file pickers. */
.dark-theme button{
  color:var(--ink);background:var(--surface-raised);border-color:#625d50;
}
.dark-theme .primary,.dark-theme .workspace-button,
.dark-theme .button,.dark-theme .workspace button,
.dark-theme .workspace a.button:not(.secondary){
  color:var(--ink);background:#38352e;border:1px solid #625d50;
}
.dark-theme .primary:hover,.dark-theme .workspace-button:hover,
.dark-theme .button:hover,.dark-theme .workspace button:hover{
  background:#484338;border-color:#9a8f75;color:var(--ink);
}
.dark-theme .button.secondary,.dark-theme .workspace a.button.secondary,
.dark-theme .workspace .timestamp,.dark-theme .workspace .reply-button{
  background:var(--surface-raised);color:var(--ink);border:1px solid #565147;
}
.dark-theme .workspace button[aria-pressed=true]{
  background:#484338;color:var(--ink);border-color:#b6a987;
}
.dark-theme input::file-selector-button{
  background:var(--surface-raised);color:var(--ink);border:1px solid #625d50;
  padding:7px 11px;border-radius:5px;margin-right:12px;font:inherit;cursor:pointer;
}
.dark-theme option,.dark-theme optgroup{
  background:#22211e;color:var(--ink);
}
.dark-theme summary::marker{color:#fff}
.dark-theme .nav-arrow{
  display:inline-block;position:static;inset:auto;flex:none;width:1em;height:1em;vertical-align:-.13em;
  color:#fff!important;stroke:#fff;pointer-events:none;
}
.dark-theme .card-arrow,.dark-theme .chevron{color:#fff}
.dark-theme .planning-rail .nav-arrow{width:24px;height:24px}
.dark-theme .planning-side,.dark-theme .planning-side>header,
.dark-theme .planning-dialog,.dark-theme .presentation-nav{
  background:var(--surface);color:var(--ink);
}
.dark-theme .planning-dialog::backdrop,.dark-theme .story-composer::backdrop{
  background:#080807b3;
}
.dark-theme .story-workspace{background-image:radial-gradient(#454137 .8px,transparent .8px)}
.dark-theme .cursor-marker::before{content:"\2196\FE0E";color:#fff}

.dark-theme .module-number{color:var(--muted)}
.dark-theme #planning-app .planning-heading-actions>button[data-panel=sharing]{
  background:#38352e!important;color:var(--ink)!important;border-color:#625d50;
}

/* Resolved history remains readable; the existing status labels identify it. */
.dark-theme .board-comment.resolved{opacity:1}

.profile-login form{margin-top:18px}.profile-login .company-details{margin-bottom:20px}
.activation-result{margin-top:24px;padding:18px;border:1px solid #918369;border-radius:9px;background:#29271f}
.activation-result input{margin:8px 0 16px;font-size:12px}.activation-result h3{margin-top:0}
.profile-account-form select{width:100%;max-width:100%;padding:10px;border-radius:7px}
.profile-contact-name{font-size:17px}.profile-login p{overflow-wrap:anywhere}
@media(max-width:650px){.profile-login .company-details{grid-template-columns:1fr}.activation-result .record-actions{align-items:flex-start;flex-direction:column}}


/* Company-scoped project audiences, including phone checkbox controls. */
.project-form-sharing{margin-top:28px;padding-top:22px;border-top:1px solid var(--line)}
.project-sharing-fields .sharing-audience{margin:20px 0;padding:16px 20px;border:1px solid var(--line);border-radius:9px}
.project-sharing-fields .sharing-audience legend{font-size:14px;font-weight:650;padding:0 6px}
.project-sharing-fields .sharing-audience label,.project-sharing-fields .sharing-toggle label,.project-contact-options label{display:flex;align-items:flex-start;gap:10px;font-size:13px;font-weight:500;line-height:1.6;margin:12px 0;cursor:pointer}
.project-sharing-fields input[type=checkbox],.project-sharing-fields input[type=radio]{width:18px;height:18px;max-width:18px;min-width:18px;padding:0;flex:none;margin-top:2px}
.project-contact-options{border:1px solid var(--line);border-radius:9px;padding:8px 16px;background:var(--surface)}
.project-contact-options label{overflow-wrap:anywhere}.project-sharing-fields [hidden]{display:none!important}
.project-sharing-fields textarea{display:block;width:100%;min-height:110px;border-radius:7px;padding:12px;font:inherit}
.project-sharing-fields .field-help{font-size:12px;color:var(--muted);line-height:1.6}
.project-sharing-fields .errorlist{padding-left:20px}.project-sharing-fields h3{font-size:16px}
@media(max-width:500px){.project-sharing-fields .sharing-audience{padding:12px}.project-contact-options{padding:6px 12px}}

.dark-theme .remove-element{background:#3b2822;color:#f0b0a2;border:1px solid #815649;padding:9px 14px;border-radius:7px}.dark-theme .remove-element:hover{background:#4b3027;color:#ffe1d8}
