/*
 * Shared application design, sutkoop only.
 * Themes: normal = dark navigation / light workspace, light = all light,
 * dark = all dark. Component rules use tokens, never page-specific colors.
 */
:root {
    --app-bg: #f2f5fa;
    --app-surface: #ffffff;
    --app-surface-raised: #f7f9fc;
    --app-border: #e2e8f1;
    --app-text: #23334b;
    --app-muted: #73839a;
    --app-link: #2875cf;
    --app-active: #e8f1ff;
    --app-accent: #1479ed;
    --app-nav-bg: #253447;
    --app-nav-text: #c6d2e1;
    --app-nav-active: #34557e;
    --app-header-bg: #253447;
    --app-header-text: #f1f6ff;
    --app-radius: 12px;
    --app-shadow: 0 4px 22px #25344706;
}
html[data-theme="light"] {
    color-scheme: light;
    --app-nav-bg: #ffffff;
    --app-nav-text: #536780;
    --app-nav-active: #e8f1ff;
    --app-header-bg: #ffffff;
    --app-header-text: #23334b;
}
html[data-theme="dark"] {
    color-scheme: dark;
    --app-bg: #101925;
    --app-surface: #1a2636;
    --app-surface-raised: #213044;
    --app-border: #304157;
    --app-text: #e3ebf5;
    --app-muted: #a0b0c5;
    --app-link: #78b5ff;
    --app-active: #243e61;
    --app-nav-bg: #162130;
    --app-nav-text: #c3d0e0;
    --app-nav-active: #243e61;
    --app-header-bg: #162130;
    --app-header-text: #e3ebf5;
    --app-shadow: 0 8px 24px #0002;
}
html[data-theme] {
    --bs-body-bg: var(--app-bg);
    --bs-body-color: var(--app-text);
    --bs-border-color: var(--app-border);
    --bs-secondary-color: var(--app-muted);
    --bs-tertiary-bg: var(--app-surface-raised);
    --bs-emphasis-color: var(--app-text);
    accent-color: var(--app-accent);
}
body {
    font-family: 'Open Sans', 'Segoe UI', sans-serif;
    font-size: 13px;
    background: var(--app-bg);
    color: var(--app-text);
}
#content-pull, .content { background: var(--app-bg); color: var(--app-text); }
.content { padding: 28px 28px 40px; }
#header.header {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 18px;
    background: var(--app-header-bg)!important;
    border-bottom: 1px solid var(--app-border);
    box-shadow: none;
}
#header .navbar-brand { color: var(--app-header-text); font-size: 18px; font-weight: 600; }
#header .btn, #header .navbar-toggle { color: var(--app-header-text); border: 0; border-radius: 8px; box-shadow: none; background: transparent; }
#header .btn i { color: inherit; font-size: 20px; }
#header .btn:hover { background: #8099b51a; }
#header .navbar-toggle { z-index: 999; }
#header .navbar-toggle .icon-bar { background: var(--app-header-text); }
#header .navbar-user > a { color: var(--app-header-text)!important; font-size: 12px; }
#header .search-input { flex-grow: 1; }
.sidebar, .sidebar-bg { background: var(--app-nav-bg)!important; border-right: 1px solid var(--app-border); }
.sidebar { padding-top: 14px; }
.sidebar .nav { display: block; padding: 0 10px; }
.sidebar .nav > li { border: 0; margin: 3px 0; }
.sidebar .nav > li.nav-header { display: none; }
.sidebar .nav > li > a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 43px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px!important;
    line-height: 1.5!important;
    color: var(--app-nav-text)!important;
    background: transparent;
}
.sidebar .nav > li > a > i { width: 20px; margin: 0; text-align: center; font-size: 16px; opacity: .85; }
.sidebar .nav > li > a .caret { order: 3; margin-left: auto; }
.sidebar .nav > li.active > a,
.sidebar .sub-menu > li.active > a { background: var(--app-nav-active)!important; color: #fff!important; }
html[data-theme="light"] .sidebar .nav > li.active > a,
html[data-theme="light"] .sidebar .sub-menu > li.active > a { color: var(--app-link)!important; }
.sidebar .nav > li > a:hover,
.sidebar .sub-menu > li > a:hover { background: #8099b51a!important; color: var(--app-nav-text)!important; }
.sidebar .sub-menu { padding: 3px 0 6px 28px; margin: 0; }
.sidebar .sub-menu > li > a { padding: 8px 12px; border-radius: 7px; font-size: 12px!important; line-height: 1.5!important; color: var(--app-nav-text)!important; background: transparent; }
.sidebar .sub-menu > li::before, .sidebar .sub-menu::before { display: none; }
.page-header, h1.page-header { margin: 0 0 22px; border: 0; color: var(--app-text); }
.page-header h1, h1.page-header { font-size: 28px; font-weight: 700; letter-spacing: -.5px; }
.page-header small { font-size: 13px; color: var(--app-muted); }
.breadcrumb { background: transparent; color: var(--app-muted); font-size: 11px; padding: 0; margin: 10px 0; }
.breadcrumb .active { color: var(--app-muted); }
a { color: var(--app-link); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--app-link); outline-offset: 3px; }
.aramaToolBar { padding: 0; background: transparent; }
#pnlAramaMain { background: transparent; }
#pnlAramaMain .edt-search { margin: 0; border-radius: 8px 0 0 8px; height: 46px; padding: 12px 16px; }
#pnlAramaMain .btn-search { height: 46px; width: auto; min-width: 60px; }
#pnlAramaMain .form-floating > .form-control,
#pnlAramaMain .form-floating > .form-select { background-color: var(--app-surface); color: var(--app-text); }
#pnlAramaSecenek { padding: 16px; margin-top: 12px; background: var(--app-surface); border: 1px solid var(--app-border); border-radius: var(--app-radius); }
#pnlAramaSecenek .arapanelheader { background: var(--app-surface-raised); color: var(--app-text); }
.table-title { gap: 12px; padding: 18px 0 12px; align-items: center; }
.table-title h4 { margin: 0; font-size: 14px; color: var(--app-muted); }
.table-title .table-title-right { gap: 7px; }
.table-title .btn-tbltitle, .toolbar .btn { border-radius: 7px!important; padding: 8px 12px; font-size: 12px; }
.btn { border-radius: 7px; font-size: 12px; padding: 8px 13px; }
.btn-primary { background: var(--app-accent); border-color: var(--app-accent); color: #fff; }
.btn-default, .btn-light, .btn-tbltitle, .btn-toolbtn1, #pnlAramaMain .btn-search {
    background: var(--app-surface);
    color: var(--app-text);
    border: 1px solid var(--app-border)!important;
}
.btn > a { color: inherit!important; }
.btn-default:hover, .btn-light:hover, .btn-tbltitle:hover { background: var(--app-active); }
.panel, .panel-body, .card, .card-body, .tab-content, .fGroupBox-body, #tblKayitList {
    background: var(--app-surface); color: var(--app-text); border-color: var(--app-border);
}
.panel, .card, .fGroupBox { border: 1px solid var(--app-border); border-radius: var(--app-radius); box-shadow: var(--app-shadow); }
.panel-heading, .card-header, .fGroupBox-heading { background: var(--app-surface-raised); color: var(--app-text); border-color: var(--app-border); padding: 12px 16px; }
.fGroupBox-title { color: var(--app-text); }
.form-control, .form-select, .input-group-text, select, textarea {
    background-color: var(--app-surface);
    color: var(--app-text);
    border-color: var(--app-border);
    border-radius: 7px;
    font-size: 13px;
}
.form-control:focus, .form-select:focus { border-color: var(--app-link); box-shadow: 0 0 0 3px #4388e81c; }
.form-control::placeholder, textarea::placeholder { color: var(--app-muted); opacity: 1; }
.form-control[readonly], .form-control:disabled { background: var(--app-surface-raised); color: var(--app-muted); }
label, .lblform { color: var(--app-text); }
fieldset { border-color: var(--app-border); border-radius: 8px; padding: 12px; }
legend { background: transparent; color: var(--app-muted); font-size: 12px; padding: 0 6px; }
.form-floating > label { color: var(--app-muted); }
.form-floating > label::after { background: transparent!important; }
.dropdown-menu { background: var(--app-surface); color: var(--app-text); border: 1px solid var(--app-border); padding: 6px; border-radius: 10px; box-shadow: 0 10px 30px #0002; }
.dropdown-item { color: var(--app-text); padding: 9px 12px; font-size: 12px; border-radius: 5px; }
.dropdown-item:hover, .dropdown-item:focus { color: var(--app-link); background: var(--app-active); }
.dropdown-divider { border-color: var(--app-border); }
.frm-dbase-table { --list-bg:var(--app-surface); --list-text:var(--app-text); --list-border:var(--app-border); --list-header-bg:var(--app-surface-raised); --list-header-text:var(--app-muted); --list-hover-bg:var(--app-active); }
.table { --bs-table-bg:var(--app-surface); --bs-table-color:var(--app-text); --bs-table-border-color:var(--app-border); --bs-table-hover-bg:var(--app-active); --bs-table-hover-color:var(--app-text); }
/* Scrolling tables keep their columns. Only directories change to mobile rows. */
.table-responsive { padding-bottom: 12px!important; }
.list-scroll, .list-table-scroll { padding-bottom: 0!important; }
#pnlKayitList.list-container { overflow: visible; background: transparent; padding-bottom: 0!important; }
.frm-record-list, .record-list-card { box-shadow: var(--app-shadow); }
.modal { --bs-modal-bg:var(--app-surface); --bs-modal-color:var(--app-text); --bs-modal-border-color:var(--app-border); }
.modal-dialog { margin: 24px auto; padding: 0 12px; }
.modal-content { background: var(--app-surface); color: var(--app-text); border: 1px solid var(--app-border); border-radius: var(--app-radius); box-shadow: 0 24px 80px #0004; }
.modal .modal-header { position: relative!important; top: auto; width: auto; min-height: 60px; height: auto; padding: 14px 20px; background: var(--app-surface-raised); border-bottom: 1px solid var(--app-border); border-radius: 12px 12px 0 0; }
.modal .modal-title { color: var(--app-text); font-size: 16px; margin: 0; padding: 0; }
.modal .modal-body { padding: 18px!important; min-height: 0; max-height: calc(100dvh - 190px); overflow: auto; background: var(--app-surface); }
.modal .modal-footer, .modal .panel-footer { position: relative!important; bottom: auto; width: auto; padding: 12px 20px; background: var(--app-surface-raised); border-top: 1px solid var(--app-border); }
.wnd-title-button { color: var(--app-muted); padding: 7px 9px; margin: 0; font-size: 18px; line-height: 1.5; }
.wndbtn-group { margin: 0 0 0 auto; }
.nav-tabs, .nav-pills { border-color: var(--app-border); padding: 6px; gap: 4px; }
.nav-tabs .nav-link, .nav-pills .nav-link { background: transparent; color: var(--app-muted); border-radius: 6px; padding: 9px 14px; font-size: 12px; }
.nav-tabs .nav-link.active, .nav-pills .nav-link.active { background: var(--app-active); color: var(--app-link); border-color: var(--app-border); }
.result-list > li, .sonuc-list, .sonuc-list-row { background: var(--app-surface); color: var(--app-text); border-color: var(--app-border); }
.result-list .result-price { background: var(--app-surface-raised); color: var(--app-text); }
.result-list .title a, .result-list .btn-row a { color: var(--app-text); }
.result-list .btn-row a { background: var(--app-active); }
.result-list .location, .result-list .desc { color: var(--app-muted); }
.mobilmenu .mobbutton { margin-bottom: 14px; }
.mobilmenu .mobbutton > a { display:flex; align-items:center; gap:16px; padding:24px!important; min-height:100px; background:var(--app-surface)!important; color:var(--app-text)!important; border:1px solid var(--app-border); border-radius:12px; box-shadow:var(--app-shadow); }
.mobilmenu .mobbutton > a i { color:var(--app-link)!important; font-size:24px!important; }
.mobilmenu .mobbutton > a:hover { border-color:var(--app-link); }
.program-theme-options { grid-template-columns: repeat(3,minmax(0,1fr)); }
.program-theme-swatch-light { background:#f2f5fa; border-color:#dce5ef; }
.program-theme-swatch-light > span:first-child { background:#fff; border-right:1px solid #dce5ef; }
.program-theme-name { color:var(--app-text); }
/* Shared contact / product identity. */
.list-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.list-person-info { min-width: 0; }
.list-avatar { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; background: var(--app-active); color: var(--app-link); display: grid; place-items: center; font-size: 17px; }
.list-directory { min-width: 860px; }
.list-directory .list-primary { font-size: 13px; }
.list-directory .list-identity { min-width: 220px; }
.bottom-menu { display:none; }
.mobile-only { display:none!important; }
@media (min-width: 768px) {
    .sidebar, .sidebar-bg { top:64px; }
    .page-header-fixed { padding-top:64px; }
}
@media (max-width: 767px) {
    .desktop-only { display:none!important; }
    .mobile-only { display:initial!important; }
    #header.header { height:56px; padding:0 10px; gap:5px; }
    #header .navbar-brand { font-size:15px; }
    #header .navbar-user > a { padding:6px; }
    #header .navbar-user img { width:28px; height:28px; }
    .page-header-fixed { padding-top:56px; }
    .content { padding:18px 12px 92px; }
    .page-header h1, h1.page-header { font-size:24px; }
    .breadcrumb { display:none; }
    .sidebar { top:56px; padding-bottom:84px; max-width:85vw; }
    .sidebar .nav > li > a { font-size:14px!important; min-height:44px; }
    .sidebar .nav > li > a > i { display:inline-block!important; }
    .table-title { padding:14px 0 10px; }
    .table-title h4 { font-size:12px; }
    .table-title .btn-tbltitle { min-height:38px; }
    #pnlAramaSecenek .row { row-gap:10px; }
    .form-control, .form-select { font-size:16px; }
    .record-list-card .list-heading, .frm-record-list .list-heading { padding:16px; }
    .record-list-card .list-heading h3 { font-size:16px; }
    .record-list-card .list-heading p { font-size:11px; }
    .list-table-scroll:has(.list-directory) { overflow:visible; }
    .list-directory { display:block; min-width:0!important; width:100%; }
    .list-directory > thead { display:none; }
    .list-directory > tbody { display:block; }
    .list-directory > tbody > tr {
        position:relative;
        display:grid;
        grid-template-columns: minmax(0,1fr) auto 28px;
        gap:6px 8px;
        padding:16px 12px;
        border-bottom:1px solid var(--app-border);
    }
    .list-directory > tbody > tr > td { display:none; border:0; padding:0; background:transparent; }
    .list-directory > tbody > tr > .list-identity { display:block; grid-column:1; grid-row:1; min-width:0; }
    .list-directory > tbody > tr > .list-balance { display:block; grid-column:2; grid-row:1; white-space:normal; max-width:110px; }
    .list-directory > tbody > tr > .list-actions { display:block; grid-column:3; grid-row:1; width:auto; }
    .list-directory .list-primary { font-size:13px; font-weight:600; }
    .list-directory .list-secondary { font-size:10px; margin-top:4px; }
    .list-directory .list-total { font-size:13px; }
    .list-directory .list-tag { font-size:9px; margin-top:5px; }
    .list-directory .list-avatar { flex-basis:38px; width:38px; height:38px; }
    .list-directory .list-person { align-items:flex-start; gap:10px; }
    .list-directory .list-detail-link { display:none; }
    .list-directory > tbody > tr > .list-empty { display:block; grid-column:1/-1; padding:30px 10px; }
    .list-directory tr:has(.list-details-toggle[aria-expanded="true"]) > .list-extra { display:block; grid-column:1/-1; text-align:left; padding:8px 0 0 48px; border-top:1px solid var(--app-border); }
    .list-directory .list-extra::before { content:attr(data-label); display:block; color:var(--app-muted); font-size:10px; margin-bottom:4px; }
    .list-details-toggle { display:inline-flex; align-items:center; gap:4px; margin-top:6px; padding:0; border:0; background:transparent; color:var(--app-link); font-size:10px; }
    .bottom-menu { position:fixed; z-index:1020; left:0; right:0; bottom:0; display:flex; justify-content:space-around; min-height:66px; padding:7px 4px calc(7px + env(safe-area-inset-bottom)); border-top:1px solid var(--app-border); background:var(--app-surface); box-shadow:0 -4px 18px #0001; }
    .btn-mobil, .bloc-icon { display:flex; flex:1; flex-direction:column; align-items:center; justify-content:center; gap:5px; color:var(--app-muted); font-size:10px; text-decoration:none; background:transparent; border:0; }
    .bottom-menu i { font-size:18px!important; color:var(--app-link); }
    .bottom-menu a:hover { color:var(--app-link); }
    .modal-dialog { margin:8px auto; padding:0 8px; }
    .modal .modal-body { padding:12px!important; max-height:calc(100dvh - 150px); }
    .modal .modal-header, .modal .modal-footer { padding:12px; }
    .program-theme-options { grid-template-columns:1fr; }
    .mobilmenu .mobbutton > a { padding:18px!important; flex-direction:column; align-items:flex-start; gap:12px; font-size:13px; }
}
@media (min-width:768px) { .list-details-toggle { display:none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior:auto!important; transition:none!important; animation:none!important; } }

/* Surface tokens for light and hybrid themes, including legacy detail components. */
html[data-theme] .list-primary,
html[data-theme] .list-party-name,
html[data-theme] .list-total,
html[data-theme] .list-heading h3 { color:var(--app-text); }
html[data-theme] .list-primary:hover { color:var(--app-link); }
html[data-theme] .frm-record-list { background:var(--app-surface); color:var(--app-text); border-color:var(--app-border); --list-border:var(--app-border); --list-muted:var(--app-muted); }
html[data-theme] .frm-record-list .list-count { background:var(--app-surface-raised); color:var(--app-muted); }
html[data-theme] .frm-record-list .list-secondary,
html[data-theme] .frm-record-list .list-description,
html[data-theme] .frm-record-list .list-status-text { color:var(--app-muted); }
html[data-theme] .frm-record-list .list-heading h3 { color:var(--app-text); }
html[data-theme] .list-menu-button { background:var(--app-surface); color:var(--app-muted); border-color:var(--app-border); }
html[data-theme] .btn > a { color:inherit!important; }
@media print {
    #header, .sidebar, .sidebar-bg, .bottom-menu, .list-actions, .list-details-toggle { display:none!important; }
    .content { margin:0!important; padding:0!important; }
    .list-table-scroll, .table-responsive { overflow:visible; }
}

/* Profile pages, legacy record cards and auxiliary widgets. */
.sidebar .sub-menu > li.active { background:transparent; }
.btn { border-radius:7px!important; }
.profile-header { border:1px solid var(--app-border); border-radius:12px; margin-bottom:18px; }
.profile-header .profile-header-cover { background:var(--app-surface-raised); }
.profile-header .profile-header-content, .profile-header .profile-header-info h4 { color:var(--app-text); }
.profile-header .profile-header-content { padding:22px; }
.profile-header .profile-header-tab { background:var(--app-surface); padding:6px 14px; }
.profile-header-tab .nav-link { color:var(--app-muted); background:transparent; }
.profile-header-tab .nav-link.active { color:var(--app-link); background:var(--app-active); }
.profile-header-img { border-radius:12px; background:var(--app-surface); border:1px solid var(--app-border); }
.profile-tab-content { background:var(--app-surface); color:var(--app-text); padding:18px; border:1px solid var(--app-border); border-radius:12px; }
.table-detay td, .table.table-detay td:nth-child(1), .table.table-detay td:nth-child(3) { background:var(--app-surface-raised); color:var(--app-text); }
.result-list > li { border:1px solid var(--app-border); border-radius:12px; box-shadow:var(--app-shadow); margin-bottom:12px; }
.jconfirm .jconfirm-box { background:var(--app-surface); color:var(--app-text); border:1px solid var(--app-border); border-radius:12px; }
.datepicker, .ui-datepicker, .ui-autocomplete, .ms-options-wrap > .ms-options { background:var(--app-surface); color:var(--app-text); border-color:var(--app-border); }
.ui-widget-content, .ui-widget-header { color:var(--app-text); background:var(--app-surface-raised); border-color:var(--app-border); }
.datepicker table tr td.day:hover { background:var(--app-active); color:var(--app-link); }
.nav-pills .nav-link:hover, .nav-tabs .nav-link:hover { color:var(--app-link); background:var(--app-active); }
.app-auth { min-height:100dvh; background:var(--app-bg); }
.app-auth .right-content { background:var(--app-surface); color:var(--app-text); }
.app-auth .login-content { max-width:480px; margin:auto; }
.app-auth .login-header { color:var(--app-text); }
@media(max-width:767px) {
    .profile-header .profile-header-content { padding:16px; }
    .profile-header-img { width:64px; height:64px; margin-bottom:10px; }
    .profile-header-img + .profile-header-info { margin-left:80px; }
    .profile-header-tab { display:flex; flex-wrap:nowrap; overflow:auto; }
    .profile-header-tab .nav-link { white-space:nowrap; }
    .result-list > li { display:grid; grid-template-columns:44px minmax(0,1fr); gap:12px; padding:16px; }
    .result-list .result-image { width:44px!important; height:44px!important; overflow:hidden; border-radius:50%; }
    .result-list .result-image img { width:44px!important; height:44px!important; object-fit:cover; }
    .result-list > li > div { display:block; padding:0; }
    .result-list .title { font-size:14px; }
    .result-list .result-price { grid-column:2; background:transparent; width:auto; font-size:16px; display:flex; justify-content:space-between; align-items:center; gap:12px; }
    .result-list .result-price h3 { font-size:11px; color:var(--app-muted); margin-bottom:4px; }
    .result-list .result-price .btn { margin:0; }
    .result-list .btn-row a { border-radius:6px; padding:7px 10px; }
    .app-auth .news-feed { display:none; }
    .app-auth .right-content { margin:0; min-height:100dvh; }
}
/* Legacy modal dialogs have a white background; content owns the surface. */
html[data-theme] .modal-dialog { background:transparent; }
.table-title .btn { min-height:36px; height:36px; display:inline-flex; align-items:center; justify-content:center; gap:5px; }
.table-title .btn-tbltitle { padding:8px 12px; }

/* Floating table menus retain a readable appearance outside their list card. */
.app-floating-menu {
    z-index: 1080;
    min-width: 230px;
    max-width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    background: var(--app-surface);
    color: var(--app-text);
    border: 1px solid var(--app-border);
    border-radius: 10px;
    padding: 6px;
    box-shadow: 0 12px 32px #0003;
}
.app-floating-menu .dropdown-item { padding: 9px 12px; font-size: 12px; }
.app-floating-menu .dropdown-item i { width: 20px; }
.app-floating-menu .list-delete { color: #c84c5b; }
html[data-theme="dark"] .app-floating-menu .list-delete { color: #ff9ea9; }

/* Shared settings surface: member portal configuration. */
.ortak-portal-settings .portal-settings-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
.ortak-portal-settings .portal-settings-code { grid-column: 1 / -1; }
.ortak-portal-settings label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; }
.ortak-portal-settings .form-control, .ortak-portal-settings .form-select { min-height: 46px; background-color: var(--app-surface-raised); color: var(--app-text); border-color: var(--app-border); }
.ortak-portal-settings small { display: block; margin-top: 7px; color: var(--app-muted); font-size: 12px; font-weight: 400; line-height: 1.6; }
.ortak-portal-settings .portal-settings-toggle { display: flex; align-items: flex-start; gap: 12px; padding: 18px; margin: 26px 0; border: 1px solid var(--app-border); border-radius: 10px; background: var(--app-surface-raised); cursor: pointer; }
.ortak-portal-settings .portal-settings-toggle input { width: 18px; height: 18px; margin: 2px 0 0; flex-shrink: 0; }
.ortak-portal-settings .portal-settings-toggle strong { color: var(--app-text); }
.ortak-portal-settings input:focus-visible, .ortak-portal-settings select:focus-visible { outline: 2px solid var(--app-accent); outline-offset: 2px; }
@media (max-width: 600px) { .ortak-portal-settings .portal-settings-fields { grid-template-columns: minmax(0, 1fr); gap: 18px; } }

/* Shared settings form, using the same surface and spacing as record lists. */
.settings-card { width:100%; color:var(--app-text); }
.settings-card .list-heading h2 { margin:0 0 5px; font-size:18px; font-weight:600; }
.settings-card .list-heading p { margin:0; color:var(--app-muted); font-size:12px; }
.settings-card .settings-tabs { margin:0; padding:0 22px; gap:24px; background:var(--app-surface); border-bottom:1px solid var(--app-border); }
.settings-card .settings-tabs .nav-link { padding:16px 0; border:0; border-bottom:2px solid transparent; border-radius:0; background:transparent; color:var(--app-muted); font-size:13px; font-weight:600; }
.settings-card .settings-tabs .nav-link.active { background:transparent; color:var(--app-link); border-bottom-color:var(--app-link); }
.settings-body { padding:24px; }
.settings-columns { display:grid; grid-template-columns:1fr 1fr; gap:24px; }
.settings-section { min-width:0; border:1px solid var(--app-border); border-radius:10px; overflow:hidden; align-self:start; }
.settings-section-heading { display:flex; align-items:center; gap:12px; padding:18px 20px; background:var(--app-surface-raised); border-bottom:1px solid var(--app-border); }
.settings-section-icon { display:grid; place-items:center; width:36px; height:36px; border-radius:9px; background:var(--app-active); color:var(--app-link); font-size:16px; flex-shrink:0; }
.settings-section-heading h2 { margin:0 0 4px; font-size:14px; font-weight:600; color:var(--app-text); }
.settings-section-heading p { margin:0; font-size:12px; color:var(--app-muted); }
.settings-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px 16px; padding:22px 20px; }
.settings-field { min-width:0; }
.settings-field-wide { grid-column:1 / -1; }
.settings-field > label { display:block; margin:0 0 8px; color:var(--app-muted); font-size:12px; font-weight:600; }
.settings-card .settings-field .form-control { width:100%; height:42px; min-height:42px; padding:10px 12px; border:1px solid var(--app-border); border-radius:7px; background:var(--app-surface); color:var(--app-text); font-size:13px; }
.settings-card .settings-field .form-control:focus { border-color:var(--app-link); box-shadow:0 0 0 3px var(--app-active); }
.settings-toggles { display:flex; flex-wrap:wrap; gap:12px; padding:0 20px 22px; }
.settings-toggle { display:flex; align-items:center; gap:10px; margin:0; padding:12px 14px; border:1px solid var(--app-border); border-radius:7px; background:var(--app-surface-raised); font-size:13px; cursor:pointer; }
.settings-toggle .form-check-input { appearance:none; position:relative; top:0; float:none; width:34px; height:20px; margin:0; flex-shrink:0; border:1px solid var(--app-border); border-radius:20px; background:var(--app-muted); background-image:none; box-shadow:none; cursor:pointer; }
.settings-toggle .form-check-input::after { content:''; position:absolute; top:2px; left:2px; width:14px; height:14px; border-radius:50%; background:#fff; transition:transform .15s; }
.settings-toggle .form-check-input:checked { background:var(--app-accent); border-color:var(--app-accent); }
.settings-toggle .form-check-input:checked::after { transform:translateX(14px); }
.settings-toggle .form-check-input:focus-visible { outline:2px solid var(--app-link); outline-offset:3px; }
.settings-help { margin-top:24px; padding:18px 20px; border:1px solid var(--app-border); border-radius:10px; background:var(--app-surface-raised); }
.settings-help h3 { margin:0 0 6px; font-size:14px; font-weight:600; }
.settings-help p { margin:0 0 12px; color:var(--app-muted); font-size:12px; }
.settings-help-links { display:flex; flex-wrap:wrap; gap:12px 24px; font-size:12px; }
.settings-help-links a { color:var(--app-link); overflow-wrap:anywhere; }
.settings-footer { display:flex; align-items:center; justify-content:space-between; gap:16px; padding-top:22px; margin-top:24px; border-top:1px solid var(--app-border); }
.settings-footer > span { font-size:12px; color:var(--app-muted); }
.settings-footer .btn { padding:11px 20px; border-radius:7px; font-size:13px; }
@media (max-width:991px) { .settings-columns { grid-template-columns:1fr; gap:18px; } }
@media (max-width:575px) {
.settings-body { padding:16px; }
.settings-card .settings-tabs { gap:18px; padding:0 16px; }
.settings-card .settings-tabs .nav-link { font-size:12px; }
.settings-fields { grid-template-columns:1fr; padding:18px 16px; }
.settings-footer { flex-direction:column; align-items:stretch; }
.settings-help-links { flex-direction:column; }
}
/* Use muted text instead of opacity so the label background fully covers the border. */
html[data-theme] .form-floating > label,
html[data-theme] .form-floating > .form-control:focus ~ label,
html[data-theme] .form-floating > .form-control:not(:placeholder-shown) ~ label,
html[data-theme] .form-floating > .form-control-plaintext ~ label,
html[data-theme] .form-floating > .form-select ~ label {
    opacity: 1;
    color: var(--app-muted, #73839a);
}
/* Keep the border cutout limited to the label text, not the full input width. */
html[data-theme] .form-floating > label {
    width: max-content;
    max-width: 100%;
    isolation: isolate;
}
html[data-theme] .form-floating > label::after,
html[data-theme] .form-floating > .form-control:focus ~ label::after,
html[data-theme] .form-floating > .form-control:not(:placeholder-shown) ~ label::after,
html[data-theme] .form-floating > .form-select ~ label::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: auto;
    left: .5rem;
    right: .5rem;
    height: 1.5em;
    border-radius: 3px;
    background: var(--app-surface, #fff)!important;
    z-index: -1;
}
html[data-theme] .form-floating > .form-control[readonly] ~ label::after,
html[data-theme] .form-floating > .form-control:disabled ~ label::after,
html[data-theme] .form-floating > .form-select:disabled ~ label::after {
    background: var(--app-surface-raised, #f7f9fc)!important;
}