/* Sistem global de teme. Variabilele semantice păstrează contrastul în toate paginile. */
:root {
  --logo-cutout: #ffffff;
  --primary-end: #b9c62f;
  --button-text: #101218;
  --theme-glow: #eef2c9;
  --theme-hero-start: #fbfce8;
  --theme-hero-end: #f2f5df;
  --theme-soft-surface: #f8f9f3;
  --theme-control: #ffffff;
  --theme-control-border: #d9ddcb;
  --theme-placeholder: #92988a;
  --theme-shadow: rgba(16, 18, 24, .09);
  --theme-nav: #4c5147;
  --theme-admin-bar: #101218;
  --theme-admin-text: #ffffff;
  --theme-admin-muted: #cbd0bd;
  --theme-admin-accent: var(--blue);
}

html[data-theme="proit"] {
  --blue: #08775b;
  --blue-strong: #055c46;
  --blue-soft: #e1f3ec;
  --lime: #c9e84e;
  --ink: #10231e;
  --muted: #586c65;
  --line: #d2e4dd;
  --paper: #ffffff;
  --canvas: #f3faf7;
  --primary-end: #05684f;
  --button-text: #ffffff;
  --theme-glow: #cdebe0;
  --theme-hero-start: #f8fdfb;
  --theme-hero-end: #e5f4ee;
  --theme-soft-surface: #f0f8f5;
  --theme-control-border: #c7ded5;
  --theme-placeholder: #82958e;
  --theme-nav: #415b52;
  --theme-admin-accent: #c9e84e;
}

html[data-theme="cobalt"] {
  --blue: #4481f5;
  --blue-strong: #2f6edf;
  --blue-soft: #e9f1ff;
  --lime: #cfdb4b;
  --ink: #101a30;
  --muted: #5c6980;
  --line: #d7e1f2;
  --paper: #ffffff;
  --canvas: #f5f8fd;
  --primary-end: #2f68dd;
  --button-text: #ffffff;
  --theme-glow: #dce9ff;
  --theme-hero-start: #f9fbff;
  --theme-hero-end: #eaf2ff;
  --theme-soft-surface: #f5f8ff;
  --theme-control-border: #cbd9ee;
}

html[data-theme="orange"] {
  --blue: #ff9641;
  --blue-strong: #d96f18;
  --blue-soft: #fff0e3;
  --lime: #3366ff;
  --ink: #1a1d25;
  --muted: #6d655f;
  --line: #eadbd0;
  --paper: #ffffff;
  --canvas: #fcf8f5;
  --primary-end: #f47b1d;
  --button-text: #17181f;
  --theme-glow: #ffe1c5;
  --theme-hero-start: #fffaf5;
  --theme-hero-end: #fff0e4;
  --theme-soft-surface: #fff8f2;
  --theme-control-border: #e6d2c2;
}

html[data-theme="purple"] {
  --blue: #8967b3;
  --blue-strong: #6f4d9a;
  --blue-soft: #f0e9f8;
  --lime: #cfdb4b;
  --ink: #221a2c;
  --muted: #6a6075;
  --line: #e0d8e8;
  --paper: #ffffff;
  --canvas: #f8f5fb;
  --primary-end: #704f99;
  --button-text: #ffffff;
  --theme-glow: #e4d9f2;
  --theme-hero-start: #fcfaff;
  --theme-hero-end: #f0e9f8;
  --theme-soft-surface: #faf7fd;
  --theme-control-border: #d9cde5;
}

html[data-theme="maroon"] {
  --blue: #b47b84;
  --blue-strong: #915963;
  --blue-soft: #f7e9ec;
  --lime: #315209;
  --ink: #291d20;
  --muted: #746368;
  --line: #ead9dc;
  --paper: #ffffff;
  --canvas: #fbf7f8;
  --primary-end: #9e636d;
  --button-text: #ffffff;
  --theme-glow: #efdce0;
  --theme-hero-start: #fffafb;
  --theme-hero-end: #f8e9ec;
  --theme-soft-surface: #fcf6f7;
  --theme-control-border: #e3cfd3;
}

html[data-theme="emerald"] {
  --blue: #14b88a;
  --blue-strong: #078b68;
  --blue-soft: #ddf7ef;
  --lime: #173d35;
  --ink: #112a25;
  --muted: #587069;
  --line: #d0e8e1;
  --paper: #ffffff;
  --canvas: #f4faf8;
  --primary-end: #079f76;
  --button-text: #09251e;
  --theme-glow: #c9f1e5;
  --theme-hero-start: #f7fffc;
  --theme-hero-end: #e3f7f1;
  --theme-soft-surface: #f2fbf8;
  --theme-control-border: #c6e2da;
}

html[data-theme="cyan"] {
  --blue: #14a8d4;
  --blue-strong: #087fa4;
  --blue-soft: #ddf5fb;
  --lime: #123d5a;
  --ink: #102936;
  --muted: #5b707a;
  --line: #d1e6ec;
  --paper: #ffffff;
  --canvas: #f3fafc;
  --primary-end: #078eb8;
  --button-text: #082532;
  --theme-glow: #c9edf7;
  --theme-hero-start: #f7fdff;
  --theme-hero-end: #e3f5fa;
  --theme-soft-surface: #f2fafc;
  --theme-control-border: #c5e0e8;
}

html[data-theme="coral"] {
  --blue: #f15f67;
  --blue-strong: #cf3f48;
  --blue-soft: #ffe5e7;
  --lime: #272b59;
  --ink: #311b1e;
  --muted: #756166;
  --line: #eed6d9;
  --paper: #ffffff;
  --canvas: #fcf6f7;
  --primary-end: #dc4650;
  --button-text: #ffffff;
  --theme-glow: #ffd5d8;
  --theme-hero-start: #fffafa;
  --theme-hero-end: #ffe9eb;
  --theme-soft-surface: #fff6f7;
  --theme-control-border: #e8ccd0;
}

html[data-theme="amber"] {
  --blue: #e9a722;
  --blue-strong: #b97b00;
  --blue-soft: #fff1cc;
  --lime: #25262e;
  --ink: #2a2317;
  --muted: #746a58;
  --line: #e9dfcc;
  --paper: #ffffff;
  --canvas: #fbf8f1;
  --primary-end: #cb8906;
  --button-text: #252118;
  --theme-glow: #ffe7ad;
  --theme-hero-start: #fffdf8;
  --theme-hero-end: #fff2d6;
  --theme-soft-surface: #fffaf0;
  --theme-control-border: #e4d6bc;
}

html[data-theme="inverted"] {
  color-scheme: dark;
  --blue: #cfdb4b;
  --blue-strong: #e0ec5f;
  --blue-soft: #30351e;
  --lime: #4481f5;
  --ink: #f7f8fa;
  --muted: #b7bdc9;
  --line: #343640;
  --paper: #17181f;
  --canvas: #101218;
  --danger: #ff7888;
  --success: #41d39f;
  --logo-cutout: #101218;
  --primary-end: #aeba33;
  --button-text: #101218;
  --theme-glow: #252a19;
  --theme-hero-start: #1d1f27;
  --theme-hero-end: #12141a;
  --theme-soft-surface: #202129;
  --theme-control: #25262e;
  --theme-control-border: #3b3e49;
  --theme-placeholder: #858c99;
  --theme-shadow: rgba(0, 0, 0, .35);
  --theme-nav: #c3c8d2;
  --theme-admin-bar: #090a0e;
  --theme-admin-text: #ffffff;
  --theme-admin-muted: #c5cad4;
}

html[data-theme] body {
  background: var(--canvas);
  color: var(--ink);
}

html[data-theme] .brand-mark {
  filter: drop-shadow(0 7px 14px color-mix(in srgb, var(--blue) 25%, transparent));
}

html[data-theme] .button:focus-visible,
html[data-theme] input:focus-visible,
html[data-theme] textarea:focus-visible,
html[data-theme] select:focus-visible,
html[data-theme] a:focus-visible {
  outline-color: color-mix(in srgb, var(--blue) 32%, transparent);
}

html[data-theme] .button-primary {
  color: var(--button-text);
  background: linear-gradient(135deg, var(--blue), var(--primary-end));
  box-shadow: 0 12px 24px color-mix(in srgb, var(--blue) 28%, transparent);
}

html[data-theme] .button-primary:hover {
  box-shadow: 0 16px 30px color-mix(in srgb, var(--blue) 38%, transparent);
}

html[data-theme] .button-outline {
  color: var(--blue-strong);
  background: var(--paper);
  border-color: color-mix(in srgb, var(--blue) 48%, var(--line));
}

html[data-theme] .button-outline:hover {
  color: var(--ink);
  background: var(--blue-soft);
  border-color: var(--blue);
}

html[data-theme] .home-intro,
html[data-theme] .directory-hero,
html[data-theme] .detail-hero,
html[data-theme] .request-hero {
  background: radial-gradient(circle at 85% 0, var(--theme-glow) 0, transparent 28%), linear-gradient(145deg, var(--theme-hero-start), var(--theme-hero-end));
  border-color: var(--line);
}

html[data-theme] .home-intro {
  background: radial-gradient(circle at 0 0, var(--theme-glow) 0 16%, transparent 36%), linear-gradient(145deg, var(--theme-hero-start), var(--theme-hero-end));
}

html[data-theme] .city-lines {
  background: linear-gradient(to top, color-mix(in srgb, var(--blue) 15%, transparent), transparent);
  border-bottom-color: color-mix(in srgb, var(--blue) 38%, var(--line));
}

html[data-theme] .form-side,
html[data-theme] .admin-body {
  background: var(--canvas);
}

html[data-theme] .company-form,
html[data-theme] .company-card,
html[data-theme] .company-avatar,
html[data-theme] .card-surface,
html[data-theme] .empty-state,
html[data-theme] .site-footer,
html[data-theme] .topbar,
html[data-theme] .admin-stat,
html[data-theme] .admin-panel,
html[data-theme] .admin-login-card,
html[data-theme] .install-card {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--line);
  box-shadow: 0 16px 45px var(--theme-shadow);
}

html[data-theme] .company-form,
html[data-theme] .admin-login-card,
html[data-theme] .install-card {
  border-color: color-mix(in srgb, var(--blue) 45%, var(--line));
}

html[data-theme] .field,
html[data-theme] .trust-row,
html[data-theme] .admin-table td,
html[data-theme] .admin-checkbox {
  color: var(--theme-nav);
}

html[data-theme] .field input,
html[data-theme] .field textarea,
html[data-theme] .request-form select,
html[data-theme] .directory-tools input,
html[data-theme] .directory-tools select,
html[data-theme] .install-form input,
html[data-theme] .pin-field input {
  color: var(--ink);
  background: var(--theme-control);
  border-color: var(--theme-control-border);
}

html[data-theme] .field input::placeholder,
html[data-theme] .field textarea::placeholder,
html[data-theme] .directory-tools input::placeholder,
html[data-theme] .install-form input::placeholder {
  color: var(--theme-placeholder);
}

html[data-theme] .field input:focus,
html[data-theme] .field textarea:focus,
html[data-theme] .directory-tools input:focus,
html[data-theme] .directory-tools select:focus,
html[data-theme] .install-form input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 14%, transparent);
}

html[data-theme] .request-form input[readonly] {
  color: var(--muted);
  background: var(--theme-soft-surface);
}

html[data-theme] .upload-control,
html[data-theme] .avatar-fallback,
html[data-theme] .contact-note,
html[data-theme] .contact-disabled,
html[data-theme] .legal-grid div {
  color: var(--muted);
  background: var(--theme-soft-surface);
  border-color: color-mix(in srgb, var(--blue) 35%, var(--line));
}

html[data-theme] .avatar-fallback {
  color: var(--blue-strong);
  background: linear-gradient(145deg, var(--blue-soft), var(--theme-soft-surface));
}

html[data-theme] .topbar nav,
html[data-theme] .breadcrumb,
html[data-theme] .company-meta,
html[data-theme] .site-footer {
  color: var(--theme-nav);
}

html[data-theme] .directory-tools input,
html[data-theme] .directory-tools select,
html[data-theme] .company-card,
html[data-theme] .card-surface,
html[data-theme] .admin-panel {
  box-shadow: 0 10px 30px var(--theme-shadow);
}

html[data-theme] .company-card:hover,
html[data-theme] .contact-action:hover {
  border-color: color-mix(in srgb, var(--blue) 65%, var(--line));
}

html[data-theme] .company-description,
html[data-theme] .contact-note,
html[data-theme] .admin-table td,
html[data-theme] .request-hero p {
  color: var(--muted);
}

html[data-theme] .primary-contact {
  color: var(--button-text);
  background: linear-gradient(135deg, var(--blue), var(--primary-end));
  border-color: var(--blue);
}

html[data-theme] .primary-contact small {
  color: color-mix(in srgb, var(--button-text) 70%, transparent);
}

html[data-theme] .admin-topbar {
  color: var(--theme-admin-text);
  background: var(--theme-admin-bar);
}

html[data-theme] .admin-topbar .brand,
html[data-theme] .admin-nav a:hover,
html[data-theme] .admin-nav .active {
  color: var(--theme-admin-text);
}

html[data-theme] .admin-nav a {
  color: var(--theme-admin-muted);
}

html[data-theme] .admin-nav a:hover,
html[data-theme] .admin-nav .active {
  background: color-mix(in srgb, var(--theme-admin-text) 11%, transparent);
}

html[data-theme] .admin-nav .admin-logout {
  color: var(--theme-admin-accent);
}

html[data-theme] .admin-table th,
html[data-theme] .admin-table td {
  border-bottom-color: var(--line);
}

html[data-theme] .admin-table td strong,
html[data-theme] .empty-state h1,
html[data-theme] .empty-state h2,
html[data-theme] .request-success h2 {
  color: var(--ink);
}

html[data-theme] .admin-button {
  color: var(--blue-strong);
  background: var(--blue-soft);
  border-color: color-mix(in srgb, var(--blue) 42%, var(--line));
}

html[data-theme] .admin-login-page,
html[data-theme] .install-body {
  background: radial-gradient(circle at 15% 10%, var(--theme-glow), transparent 34%), var(--canvas);
}

html[data-theme="inverted"] .form-message.success,
html[data-theme="inverted"] .published-banner,
html[data-theme="inverted"] .request-success {
  color: #8ef0ca;
  background: #163329;
  border-color: #295d4d;
}

html[data-theme="inverted"] .form-message.error {
  color: #ffb2bc;
  background: #3a1d23;
  border-color: #713440;
}

html[data-theme="inverted"] .admin-button.success {
  color: #8ef0ca;
  background: #17352b;
  border-color: #2c5f50;
}

html[data-theme="inverted"] .admin-button.muted,
html[data-theme="inverted"] .status-dismissed {
  color: #c1c6d0;
  background: #292b34;
  border-color: #3b3e49;
}

html[data-theme="inverted"] .status-pending {
  color: #ffd58c;
  background: #3d301b;
}

html[data-theme="inverted"] .status-resolved {
  color: #8ef0ca;
  background: #17352b;
}

html[data-theme="inverted"] .email-verified-badge {
  color: #8ef0ca;
  background: #17352b;
}

html[data-theme="inverted"] .email-missing-badge {
  color: #ffd58c;
  background: #3d301b;
}

html[data-theme="inverted"] .admin-button.danger {
  color: #ffb2bc;
  background: #3a1d23;
  border-color: #713440;
}

html[data-theme="inverted"] .delete-warning {
  color: #ffb2bc;
  background: #3a1d23;
  border-color: #713440;
}

html[data-theme="inverted"] .delete-warning strong {
  color: #ffd2d8;
}

html[data-theme="inverted"] .contact-method-whatsapp .contact-method-icon {
  color: #8ef0ca;
  background: #17352b;
}

html[data-theme="inverted"] .theme-preview {
  border-color: rgba(255, 255, 255, .16);
}

html[data-theme="inverted"] .company-avatar:not(.avatar-fallback) {
  background: #ffffff;
  border-color: #454853;
}

html[data-theme="inverted"] select option {
  color: var(--ink);
  background: var(--theme-control);
}

/* AfaceriX.ro 1.6.6: limbaj vizual aproape dreptunghiular în întreaga aplicație. */
html[data-theme] body *,
html[data-theme] body *::before,
html[data-theme] body *::after {
  border-radius: 4px !important;
}
