.settings-page { max-width: 1180px; }
.settings-heading { margin: 24px 0; }
.settings-heading h1 { font-size: 2rem; margin: 6px 0; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.settings-card { padding: 26px; border: 1px solid #dce5e9; border-radius: 16px; background: #fff; box-shadow: 0 8px 24px #20313608; }
.settings-card h2 { font-size: 1.2rem; margin-bottom: 12px; }
.settings-card p { color: #536773; line-height: 1.6; }
.settings-card form { display: grid; gap: 10px; }
.settings-card form .btn { justify-self: start; margin-top: 6px; }
.settings-card label { font-weight: 600; }
.settings-card dd { overflow-wrap: anywhere; margin-bottom: 12px; }
.settings-danger { grid-column: 1 / -1; border-color: #e4b6b9; }
.settings-danger summary { cursor: pointer; color: #b02a37; font-weight: 600; }
.settings-danger details[open] form { margin-top: 20px; max-width: 520px; }
@media (max-width: 720px) { .settings-grid { grid-template-columns: 1fr; } .settings-card { padding: 20px; } }

@media screen {
  html[data-site-theme="dark"] { color-scheme: dark; background: #101820; }
  html[data-site-theme="light"] { color-scheme: light; }
  html[data-site-theme="dark"] body { background: #101820 !important; color: #e3edf3; }
  html[data-site-theme="dark"] body::before,
  html[data-site-theme="dark"] body::after { opacity: .12; }
  html[data-site-theme="dark"] :is(.navbar, .dropdown-menu, .settings-card, .card, .auth-card, .auth-compact-card, .auth-form-panel, .auth-form-card, .builder-panel, .builder-section-intro, .builder-option, .job-title-editor, .job-title-library, .job-title-item, .section-create-panel, .section-manager-card, .section-card, .section-detail-panel, .section-detail-card, .certification-editor, .certification-library, .certification-item, .dashboard-profile-card, .app-panel, .dashboard-card, .dashboard-panel, .dashboard-stat, .dashboard-section, .profile-card, .help-hero, .help-note, .help-example, .help-card, .help-panel, .resume-variant-card, .saved-resume-card, .tag-editor) {
    background: #192630 !important; color: #e3edf3 !important; border-color: #344957 !important; box-shadow: 0 8px 24px #0002;
  }
  html[data-site-theme="dark"] :is(.builder-hero, .job-title-hero, .section-manager-hero, .certification-hero, .settings-heading) { color: #e3edf3; }
  html[data-site-theme="dark"] :is(.dashboard-photo-controls, .dashboard-resume-list li) { border-color: #344957; }
  html[data-site-theme="dark"] .dashboard-resume-info small { color: #afc2cf; }
  html[data-site-theme="dark"] .dashboard-document-icon { background: #233b47; color: #9adddf; }
  html[data-site-theme="dark"] :is(.navbar-brand, .nav-link, .dropdown-item, .dropdown-header, .manage-menu-link strong, .nav-help-link) { color: #dceaf1 !important; }
  html[data-site-theme="dark"] :is(.dropdown-item:hover, .dropdown-item:focus, .manage-menu-link.active) { background: #26434e !important; }
  html[data-site-theme="dark"] .navbar-toggler { border-color: #6b8291; }
  html[data-site-theme="dark"] .navbar-toggler-icon { filter: invert(1); }
  html[data-site-theme="dark"] :is(.form-control, .form-select, .input-group-text) { background-color: #111e27; color: #e3edf3; border-color: #48606f; }
  html[data-site-theme="dark"] :is(.form-control, .form-select):focus { border-color: #6acbd0; box-shadow: 0 0 0 .2rem #6acbd025; }
  html[data-site-theme="dark"] input::placeholder,
  html[data-site-theme="dark"] textarea::placeholder { color: #93a9b8; opacity: 1; }
  html[data-site-theme="dark"] :is(.form-text, .text-muted, .manage-menu-note, .manage-menu-link small, .settings-card p, .builder-panel p, .builder-section-intro p) { color: #afc2cf !important; }
  html[data-site-theme="dark"] :is(.settings-page, .app-page, .auth-page) a:not(.resume a):not(.btn):not(.nav-link):not(.dropdown-item):not(.navbar-brand) { color: #79d2db; }
  html[data-site-theme="dark"] .btn-primary { background: #277d8c; border-color: #398d9c; color: #fff; }
  html[data-site-theme="dark"] .btn-secondary { background: #304552; border-color: #4a6575; color: #edf5f8; }
  html[data-site-theme="dark"] .builder-option strong { color: #e3edf3; }
  html[data-site-theme="dark"] .builder-option small { color: #afc2cf; }
  html[data-site-theme="dark"] .builder-section-toggle { background: #243743; border-color: #48606f; color: #e3edf3; }
  html[data-site-theme="dark"] .builder-section-toggle input { accent-color: #79d2db; }
  html[data-site-theme="dark"] .table { --bs-table-color: #e3edf3; --bs-table-bg: #192630; --bs-table-border-color: #344957; --bs-table-striped-bg: #21323f; --bs-table-striped-color: #e3edf3; --bs-table-hover-color: #fff; --bs-table-hover-bg: #2a3f4d; }
  html[data-site-theme="dark"] .alert-success { background: #13382c; color: #b8e8cf; border-color: #2c6a50; }
  html[data-site-theme="dark"] .alert-danger { background: #41262e; color: #ffd5dc; border-color: #81505d; }
  html[data-site-theme="dark"] .settings-danger { border-color: #80505c !important; }
  html[data-site-theme="dark"] .settings-danger summary { color: #ffb5be; }
  html[data-site-theme="dark"] .tag-chip { background: #2c4658; color: #d9efff; }
  html[data-site-theme="dark"] .tag-editor-input { color: #e3edf3; }
}

@media screen {
  html[data-site-theme="dark"] :is(h1, h2, h3, h4, h5, label, dt):not(.resume *) { color: #e3edf3 !important; }
  html[data-site-theme="dark"] :is(.auth-heading p, .auth-form-meta, .auth-field-help, .auth-switch, .dashboard-photo-hint, .dashboard-profile-role, .section-manager-summary p, .help-example figcaption) { color: #afc2cf; }
  html[data-site-theme="dark"] :is(.landing-header, .landing-feature-card, .landing-step, .landing-footer, .landing-section, .auth-shell) { background: #192630; color: #e3edf3; border-color: #344957; }
  html[data-site-theme="dark"] :is(.landing-brand, .landing-nav a, .landing-page p, .landing-page li) { color: #c1d2dc; }
  html[data-site-theme="dark"] .auth-google-button { background: #243743; color: #e3edf3; border-color: #48606f; }
  html[data-site-theme="dark"] .bg-white:not(.resume *) { background-color: #192630 !important; }
}

@media screen {
  html[data-site-theme="dark"] :is(.app-page > form, body.container > form) {
    background: #192630 !important; border-color: #344957 !important; color: #e3edf3;
  }
  html[data-site-theme="dark"] .certification-form label > span { color: #afc2cf; }
  html[data-site-theme="dark"] .native-item-icon-field .form-text { color: #afc2cf; }
  html[data-site-theme="dark"] .section-manager-hero { background: #1c303b !important; border-color: #344957; }
  html[data-site-theme="dark"] :is(.section-manager-hero p, .section-manager-summary p, .section-settings-form label > span) { color: #afc2cf; }
  html[data-site-theme="dark"] .section-manager-summary > span { background: #192630; color: #afc2cf; border-color: #344957; }
  html[data-site-theme="dark"] .section-manager-summary strong { color: #79d2db; }
  html[data-site-theme="dark"] :is(.builder-language-switch, .builder-form, .role-select-shell, .builder-hero-status) {
    background: #192630 !important; border-color: #344957 !important; color: #e3edf3;
  }
  html[data-site-theme="dark"] :is(.builder-hero p, .builder-hero-status span) { color: #afc2cf; }
  html[data-site-theme="dark"] .builder-hero-status strong { color: #79d2db; }
  html[data-site-theme="dark"] :is(.auth-form-wrap, .profile-edit-section, .profile-role-panel, .builder-static-section, .builder-empty, .job-vacancy-panel, .job-analysis, .job-title-empty, .custom-field-config, .dashboard-link-grid a) {
    background: #192630 !important; border-color: #344957 !important; color: #e3edf3;
  }
  html[data-site-theme="dark"] :is(.builder-hero, .job-title-hero, .certification-hero) { background: #1c303b; border-color: #344957; }
  html[data-site-theme="dark"] .auth-form .auth-input-wrap .form-control { background: #111e27; color: #e3edf3; }
  html[data-site-theme="dark"] :is(.auth-label-row, .auth-field-help, .auth-form-meta, .profile-role-panel strong) { color: #afc2cf; }
  html[data-site-theme="dark"] :is(.landing-hero, .landing-workflow, .landing-steps li, .landing-feature, .landing-proof) { background: #192630; border-color: #344957; }
  html[data-site-theme="dark"] .landing-hero::before,
  html[data-site-theme="dark"] .landing-hero::after { background: rgba(16, 24, 32, .9); }
  html[data-site-theme="dark"] :is(.landing-kicker, .landing-proof strong, .landing-feature h3, .landing-step-label, .landing-hero-copy) { color: #d2e8ed; }
}

@media screen {
  html[data-site-theme="dark"] :is(.landing-signin, .landing-secondary-cta) { color: #8cdae0; }
}
