/* Shared readable surfaces: keep foreground and background in the same theme. */
:root { color-scheme: light; --soft-text: #536475; --muted: #536475; }
html[data-theme="baltyk"] { --red: #006f7c; }
html[data-mode="night"] { --soft-text: #b7c7d3; --muted: #b7c7d3; --red: #ff8994; }
html[data-mode="night"][data-theme="bursztyn"] { --red: #ff8994; }
html[data-mode="night"][data-theme="baltyk"] { --red: #70d6df; }
html[data-mode="night"][data-theme="wrzos"] { --red: #d3b1fa; }

.jobs-page,.health-page { background:var(--bg); color:var(--text); }
.jobs-filters,.job-card,.jobs-empty,.job-form section,
.health-hero form,.health-types button,.health-card,.health-empty,.health-form section,
.friend-card,.float-card { background:var(--surface); color:var(--text); border-color:var(--border); }
.job-card h3,.health-card-copy>strong,.friend-card strong { color:var(--text); }
.jobs-filters :is(input,select),.job-form :is(input,select,textarea),.job-owner textarea,
.health-form :is(input,select,textarea),.health-hero input,.place-search input {
  background:var(--surface-alt); color:var(--text); border-color:var(--border); color-scheme:inherit;
}
.health-hero input { padding:10px; border-radius:8px; }
.place-search { background:var(--surface); color:var(--text); }
.job-card>p,.jobs-result-head>b,.job-type-choice small,.health-card-copy>small,
.health-card-copy>p,.health-card-copy>span,.friend-card p,.admin-table td:first-child small {
  color:var(--soft-text);
}
.job-category-list button { color:var(--text); }
.job-category-list small,.job-chips span,.job-skills,.friend-avatar {
  background:var(--surface-alt); color:var(--text);
}
.job-category-list button:hover,.job-category-list button.active,
.job-type-choice input:checked+span { background:var(--surface-alt); color:var(--text); }
.job-detail-hero { background:linear-gradient(135deg,var(--surface-alt),var(--surface)); color:var(--text); border-color:var(--border); }
.job-detail-hero>strong { color:var(--text); }
.health-hero { background:linear-gradient(125deg,color-mix(in srgb,#148263 10%,var(--surface)),var(--surface)); color:var(--text); border-color:var(--border); }
.health-hero p { color:var(--soft-text); }
.health-card-photo>i { background:#fff; color:#172f43; color-scheme:light; }
.health-card-copy>em { color:#096548; }
.health-types button.active { background:var(--surface-alt); color:var(--text); }
.dating-page-header { background:linear-gradient(120deg,var(--pink),var(--surface)); color:var(--text); }
/* Image canvases and status chips intentionally stay pale in both modes. */
.company-card-art,.company-cover,.company-site-visual,.classified-art,.property-card-photo,.market-card-photo,.chat-news-art,
.property-no-photo,.beauty-art,.door-card-photo,.door-detail-visual,.martom-stage,
.firmeoo-preview-image,.firmeoo-progress,.martom-option-image { color:#172f43; color-scheme:light; }
.health-profile-data { color:#172f43; color-scheme:light; }
.firmeoo-door-page { color-scheme:light; }

/* Native controls must not inherit a white foreground on a white field. */
input:not([type]),input:is([type="text"],[type="email"],[type="password"],[type="search"],[type="tel"],[type="url"],[type="number"],[type="date"],[type="datetime-local"]),
select,textarea { color:var(--text); background-color:var(--surface-alt); }
select option,select optgroup { background:var(--surface); color:var(--text); }
input::placeholder,textarea::placeholder { color:var(--soft-text); opacity:1; }
input:autofill { -webkit-text-fill-color:var(--text); box-shadow:0 0 0 1000px var(--surface-alt) inset; }
/* The embedded door configurator has its own deliberately light palette. */
.firmeoo-door-page :is(input,select,textarea) { color:#1c1c1c; background-color:#fff; color-scheme:light; }
.firmeoo-door-page :is(input,textarea)::placeholder { color:#5f566d; }
.firmeoo-door-page :is(select option,select optgroup) { color:#1c1c1c; background:#fff; }
.firmeoo-door-page input:autofill { -webkit-text-fill-color:#1c1c1c; box-shadow:0 0 0 1000px #fff inset; }
.firmeoo-door-step-pill { color:#62576f; }

html[data-mode="night"] .health-card-copy>em,
html[data-mode="night"] .health-hero h1 em { color:#7de0be; }
html[data-mode="night"] :is(.company-rating,.dating-rating-score,.dating-star-actions button.selected,
.dating-star-actions button:hover,.photo-viewer-summary strong,.health-card-copy>span b,.job-card-foot>span) { color:var(--red); }
/* Pale accent colors also need a dark foreground when used for button fills. */
html[data-mode="night"] { --accent-fill:#a9162c; }
html[data-mode="night"][data-theme="baltyk"] { --accent-fill:#006773; }
html[data-mode="night"][data-theme="wrzos"] { --accent-fill:#7343a5; }
html[data-mode="night"] :is(.brand-mark,.button-primary,.message-badge,.chat-send,.chat-unread,
.company-category,.company-promoted,.property-purpose-tabs a.selected,.property-card-photo small,
.classified-categories a.selected,.classified-art b,.admin-pills button.active,.place-search-main button,
.cuisine-categories button.active,.favorites-tabs button.active,.portal-slide a,.portal-search button,.top-search button) {
  background:var(--accent-fill); color:#fff;
}
html[data-mode="night"] .quick-bar .quick-add:before { background:var(--accent-fill); }
html[data-mode="night"] .chat-line.mine .chat-bubble { background:var(--accent-fill); color:#fff; }
html[data-mode="night"] .button-soft,html[data-mode="night"] .table button { color:var(--red); }
html[data-mode="night"] .friend-pending { color:#e7c084; }

.sitewide-company>.container>span,.sitewide-company a>b { color:#b61928; }
html[data-mode="night"] .sitewide-company>.container>span,html[data-mode="night"] .sitewide-company a>b { color:var(--red); }
.partner-ads-heading { color:var(--soft-text); }
