:root {
        --primary: #ff6347;
        --secondary: #e5533a;
        --accent: #ff8a75;
        --header-bg: #ff6347;
        --header-link-color: #fff7f5;
        --breadcrumbs-bg: #e5533a;
        --breadcrumbs-link-fg: #fff1ed;
        --button-bg: #ff6347;
        --button-hover-bg: #e5533a;
        --default-button-bg: #ff6347;
        --default-button-hover-bg: #e5533a;
        --link-fg: #ff6347;
        --link-hover-color: #ff8a75;
    }

    html[data-theme="dark"] {
        --primary: #ff6347;
        --secondary: #e5533a;
        --accent: #ff8a75;
        --header-bg: #ff6347;
        --header-link-color: #fff7f5;
        --breadcrumbs-bg: #e5533a;
        --breadcrumbs-link-fg: #fff1ed;
        --button-bg: #ff6347;
        --button-hover-bg: #e5533a;
        --default-button-bg: #ff6347;
        --default-button-hover-bg: #e5533a;
        --link-fg: #ff6347;
        --link-hover-color: #ff8a75;
    }

    html[data-theme="dark"] #nav-sidebar {
        border-right: 1px solid rgba(255, 99, 71, 0.16);
        box-shadow: inset -1px 0 0 rgba(255, 99, 71, 0.08);
    }

    html[data-theme="dark"] #nav-filter {
        border-radius: 12px;
        margin: 12px;
        width: calc(100% - 24px);
    }

    html[data-theme="dark"] #nav-sidebar .module,
    html[data-theme="dark"] #nav-sidebar .app-auth,
    html[data-theme="dark"] #nav-sidebar .app-scripts {
        border-radius: 12px;
        margin: 12px;
        overflow: hidden;
    }

    html[data-theme="dark"] #nav-sidebar .caption,
    html[data-theme="dark"] #nav-sidebar .section,
    html[data-theme="dark"] .module h2,
    html[data-theme="dark"] .module caption,
    html[data-theme="dark"] .inline-group h2,
    html[data-theme="dark"] #changelist-filter h2 {
        border-radius: 12px 12px 0 0;
    }

    html[data-theme="dark"] #nav-sidebar table,
    html[data-theme="dark"] #nav-sidebar tbody,
    html[data-theme="dark"] #nav-sidebar tr,
    html[data-theme="dark"] #nav-sidebar th,
    html[data-theme="dark"] #nav-sidebar td {
        border-radius: 02!important;
    }

    html[data-theme="dark"] #nav-sidebar tbody th,
    html[data-theme="dark"] #nav-sidebar tbody td {
        vertical-align: middle;
        padding: 0;
    }

    html[data-theme="dark"] #nav-sidebar tbody th {
        width: 100%;
    }

    html[data-theme="dark"] #nav-sidebar tbody td {
        width: 72px;
        text-align: center;
        white-space: nowrap;
    }

    html[data-theme="dark"] #nav-sidebar a {
        display: block;
        padding: 12px 12px;
    }

    html[data-theme="dark"] #nav-sidebar td a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 12px 8px;
    }

    html[data-theme="dark"] #nav-sidebar td a.addlink {
        background-image: none !important;
        padding-left: 8px !important;
    }

    html[data-theme="dark"] #nav-sidebar td a.addlink::before {
        content: "+";
        display: inline-block;
        font-size: 22px;
        line-height: 1;
        font-weight: 700;
        color: #7dbb3b;
        margin-right: 2px;
    }

    html[data-theme="dark"] .button,
    html[data-theme="dark"] input[type=submit],
    html[data-theme="dark"] input[type=button],
    html[data-theme="dark"] .submit-row input,
    html[data-theme="dark"] a.button,
    html[data-theme="dark"] .object-tools a {
        border-radius: 929px;
    }

    html[data-theme="dark"] body {
        background:
            radial-gradient(circle at top left, rgba(255, 99, 71, 0.08), transparent 24%),
            radial-gradient(circle at top right, rgba(255, 138, 117, 0.08), transparent 20%),
            linear-gradient(180deg, #131313 0%, #0d0d0d 100%);
        color: #f5e8e4;
    }

    html[data-theme="dark"] #container,
    html[data-theme="dark"] #main,
    html[data-theme="dark"] #content {
        background: transparent;
    }

    html[data-theme="dark"] #header {
        background: linear-gradient(135deg, #ff6347 0%, #ff7f66 100%);
        box-shadow: 0 14px 40px rgba(120, 29, 15, 0.28);
    }

    html[data-theme="dark"] #user-tools,
    html[data-theme="dark"] #user-tools a,
    html[data-theme="dark"] #user-tools button {
        color: #fff7f5;
    }

    html[data-theme="dark"] .theme-toggle,
    html[data-theme="dark"] .theme-toggle:link,
    html[data-theme="dark"] .theme-toggle:visited,
    html[data-theme="dark"] button.theme-toggle,
    html[data-theme="dark"] #header .theme-toggle,
    html[data-theme="dark"] #header .theme-toggle *,
    html[data-theme="dark"] #header .theme-toggle svg,
    html[data-theme="dark"] #header .theme-toggle path,
    html[data-theme="dark"] #header .theme-toggle::before,
    html[data-theme="dark"] #header .theme-toggle::after {
        background: transparent !important;
        background-color: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
    }

    html[data-theme="dark"] .theme-toggle svg.theme-icon-when-dark {
        color: transparent !important;
        fill: #fff7f5 !important;
    }

    html[data-theme="dark"] div.breadcrumbs {
        background: rgba(255, 99, 71, 0.14);
        color: #ffe5de;
        border-bottom: 1px solid rgba(255, 127, 102, 0.18);
        backdrop-filter: blur(10px);
    }

    html[data-theme="dark"] div.breadcrumbs a {
        color: #fff1ed;
    }

    html[data-theme="dark"] #nav-sidebar {
        background: rgba(18, 18, 18, 0.86);
        border-right: 1px solid rgba(255, 99, 71, 0.16);
        backdrop-filter: blur(10px);
        box-shadow: inset -1px 0 0 rgba(255, 99, 71, 0.08);
    }

    html[data-theme="dark"] #toggle-nav-sidebar,
    html[data-theme="dark"] #toggle-nav-sidebar:hover,
    html[data-theme="dark"] #toggle-nav-sidebar:focus {
        color: #ff6347 !important;
    }

    html[data-theme="dark"] #nav-filter {
        background: #171717;
        border: 1px solid rgba(255, 99, 71, 0.14);
        border-radius: 12px;
        color: #f0d6cf;
        margin: 12px;
        width: calc(100% - 24px);
    }

    html[data-theme="dark"] #nav-sidebar .module,
    html[data-theme="dark"] #nav-sidebar .app-auth,
    html[data-theme="dark"] #nav-sidebar .app-scripts {
        background: rgba(24, 24, 24, 0.94);
        border: 1px solid rgba(255, 99, 71, 0.1);
        border-radius: 12px;
        margin: 12px;
        overflow: hidden;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
    }

    html[data-theme="dark"] #nav-sidebar .caption,
    html[data-theme="dark"] #nav-sidebar .section,
    html[data-theme="dark"] .module h2,
    html[data-theme="dark"] .module caption,
    html[data-theme="dark"] .inline-group h2,
    html[data-theme="dark"] #changelist-filter h2 {
        background: linear-gradient(135deg, #ff6347 0%, #ff7f66 100%);
        color: #fff7f5;
        border-radius: 12px 12px 0 0;
    }

    html[data-theme="dark"] #nav-sidebar tbody th,
    html[data-theme="dark"] #nav-sidebar tbody td {
        border-top: 1px solid rgba(255, 99, 71, 0.08);
    }

    html[data-theme="dark"] #nav-sidebar a {
        color: #f4d9d2;
        display: block;
        padding: 12px 14px;
    }

    html[data-theme="dark"] #nav-sidebar a:hover {
        color: #fff1ed;
    }

    html[data-theme="dark"] #nav-sidebar a.current-model,
    html[data-theme="dark"] #nav-sidebar .current-model a {
        background: linear-gradient(135deg, rgba(255, 99, 71, 0.22) 0%, rgba(255, 127, 102, 0.12) 100%) !important;
        color: #fff4f1;
        font-weight: 700;
    }

    html[data-theme="dark"] #nav-sidebar .current-app .section,
    html[data-theme="dark"] #nav-sidebar .current-app .section:link,
    html[data-theme="dark"] #nav-sidebar .current-app .section:visited {
        background: transparent !important;
        color: #fff7f5 !important;
        font-weight: 700;
        padding: 12px 14px;
    }

    html[data-theme="dark"] #content-main,
    html[data-theme="dark"] .dashboard .module,
    html[data-theme="dark"] #changelist-form,
    html[data-theme="dark"] .submit-row,
    html[data-theme="dark"] .results,
    html[data-theme="dark"] #changelist-filter,
    html[data-theme="dark"] .paginator,
    html[data-theme="dark"] .object-tools,
    html[data-theme="dark"] form .aligned,
    html[data-theme="dark"] .form-row,
    html[data-theme="dark"] .inline-group {
        border-radius: 12px;
    }

    html[data-theme="dark"] #changelist-form,
    html[data-theme="dark"] .change-form #content-main,
    html[data-theme="dark"] .dashboard #content-main,
    html[data-theme="dark"] #content-related,
    html[data-theme="dark"] #changelist-filter,
    html[data-theme="dark"] #toolbar {
        background: rgba(27, 27, 27, 0.86);
        border: 1px solid rgba(255, 99, 71, 0.12);
        box-shadow: 0 18px 45px rgba(0, 0, 0, 0.26);
        backdrop-filter: blur(10px);
    }

    html[data-theme="dark"] .results table thead th {
        background: rgba(255, 99, 71, 0.08);
        color: #ffe3dd;
    }

    html[data-theme="dark"] .results tbody tr:nth-child(even) {
        background: rgba(255, 255, 255, 0.02);
    }

    html[data-theme="dark"] .results tbody tr:hover {
        background: rgba(255, 99, 71, 0.08);
    }

    html[data-theme="dark"] .button,
    html[data-theme="dark"] input[type=submit],
    html[data-theme="dark"] input[type=button],
    html[data-theme="dark"] .submit-row input,
    html[data-theme="dark"] a.button,
    html[data-theme="dark"] .object-tools a,
    html[data-theme="dark"] #changelist .actions .button,
    html[data-theme="dark"] #changelist .actions input[type=submit] {
        background: linear-gradient(135deg, #ff6347 0%, #ff7f66 100%);
        border-color: transparent;
        color: #ffffff !important;
        box-shadow: 0 10px 24px rgba(120, 29, 15, 0.28);
        text-shadow: 0 1px 1px rgba(0, 0, 0, 0.14);
    }

    html[data-theme="dark"] .button:hover,
    html[data-theme="dark"] input[type=submit]:hover,
    html[data-theme="dark"] input[type=button]:hover,
    html[data-theme="dark"] .submit-row input:hover,
    html[data-theme="dark"] a.button:hover,
    html[data-theme="dark"] .object-tools a:hover,
    html[data-theme="dark"] #changelist .actions .button:hover,
    html[data-theme="dark"] #changelist .actions input[type=submit]:hover {
        background: linear-gradient(135deg, #e5533a 0%, #ff7157 100%);
        color: #ffffff !important;
    }

    html[data-theme="dark"] #toolbar {
        border-radius: 12px;
    }

    html[data-theme="dark"] #toolbar input[type="text"],
    html[data-theme="dark"] #changelist-search input[type="text"],
    html[data-theme="dark"] #changelist .actions select,
    html[data-theme="dark"] select,
    html[data-theme="dark"] textarea,
    html[data-theme="dark"] input[type="text"],
    html[data-theme="dark"] input[type="password"],
    html[data-theme="dark"] input[type="email"],
    html[data-theme="dark"] input[type="number"] {
        background: #111111;
        border: 1px solid rgba(255, 99, 71, 0.18);
        color: #fff1ed;
        border-radius: 12px;
    }

    html[data-theme="dark"] #toolbar input[type="submit"] {
        color: #ffffff !important;
    }

    html[data-theme="dark"] #changelist-filter {
        background: rgba(27, 27, 27, 0.92);
    }

    html[data-theme="dark"] #changelist-filter h3,
    html[data-theme="dark"] #changelist-filter details summary,
    html[data-theme="dark"] #changelist-filter li,
    html[data-theme="dark"] #changelist-filter li.selected,
    html[data-theme="dark"] #changelist-filter ul {
        border-color: rgba(255, 99, 71, 0.08);
    }

    #site-name {
        margin: 0;
    }

    .ts-brand-link {
        display: inline-flex;
        align-items: center;
        gap: 14px;
    }

    .ts-brand-logo {
        width: 96px;
        height: 96px;
        object-fit: contain;
        flex-shrink: 0;
    }

    .ts-brand-text {
        display: inline-block;
        line-height: 1.1;
        color: #fff7f5;
        font-weight: 700;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
    }

    body.login #header {
        height: auto;
        padding: 30px 18px !important;
    }

    body.login #site-name {
        display: flex;
        justify-content: center;
    }

    body.login .ts-brand-link {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    body.login .ts-brand-logo {
        width: 180px !important;
        height: 180px !important;
    }

    body.login .ts-brand-text {
        display: none;
    }

    body.login .form-row {
        margin-bottom: 6px;
        padding: 10px;
    }

    body.login .form-row label {
        display: block;
        margin-bottom: 8px;
        color: #7a3528;
        font-weight: 600;
    }

    body.login .submit-row {
        padding:  8px;
        text-align: center;
    }

    body.login input[type="text"],
    body.login input[type="password"] {
        color: #3f241e !important;
        border: 1px solid rgba(255, 99, 71, 0.22) !important;
        background: rgba(255, 255, 255, 0.94) !important;
    }

    html[data-theme="dark"] body.login .form-row label,
    html[data-theme="auto"] body.login .form-row label {
        color: #f3e5e1 !important;
    }

    html[data-theme="light"] body {
        background:
            radial-gradient(circle at top left, rgba(255, 99, 71, 0.12), transparent 28%),
            radial-gradient(circle at top right, rgba(255, 138, 117, 0.14), transparent 24%),
            linear-gradient(180deg, #fff9f6 0%, #fffdfb 100%);
        color: #34231f;
    }

    html[data-theme="light"] #container {
        background: transparent;
    }

    html[data-theme="light"] #header {
        background: linear-gradient(135deg, #ff6347 0%, #ff7f66 100%);
        box-shadow: 0 14px 40px rgba(229, 83, 58, 0.18);
    }

    html[data-theme="light"] #user-tools,
    html[data-theme="light"] #user-tools a,
    html[data-theme="light"] #user-tools button {
        color: #fff7f5;
    }

    html[data-theme="light"] .theme-toggle,
    html[data-theme="light"] .theme-toggle:link,
    html[data-theme="light"] .theme-toggle:visited,
    html[data-theme="light"] button.theme-toggle,
    html[data-theme="light"] #header .theme-toggle,
    html[data-theme="light"] #header .theme-toggle *,
    html[data-theme="light"] #header .theme-toggle svg,
    html[data-theme="light"] #header .theme-toggle path,
    html[data-theme="light"] #header .theme-toggle::before,
    html[data-theme="light"] #header .theme-toggle::after {
        background: transparent !important;
        background-color: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
    }

    html[data-theme="light"] .theme-toggle svg.theme-icon-when-light {
        color: transparent !important;
        fill: #fff7f5 !important;
    }

    html[data-theme="light"] div.breadcrumbs {
        background: rgba(255, 255, 255, 0.62);
        color: #7f3529;
        border-bottom: 1px solid rgba(255, 99, 71, 0.14);
        backdrop-filter: blur(10px);
    }

    html[data-theme="light"] div.breadcrumbs a {
        color: #c94c35;
    }

    html[data-theme="light"] #changelist-filter a:hover,
    html[data-theme="light"] #changelist-filter details summary:hover,
    html[data-theme="light"] #changelist-filter summary:hover {
        color: #c94c35;
    }

    html[data-theme="light"] #changelist-filter details > summary::before {
        color: #c94c35 !important;
    }

    html[data-theme="light"] #changelist-filter .viewlink,
    html[data-theme="light"] #changelist-filter .hidelink {
        background-image: none !important;
        padding-left: 0 !important;
    }

    html[data-theme="light"] #changelist-filter .viewlink::before,
    html[data-theme="light"] #changelist-filter .hidelink::before {
        display: inline-block;
        margin-right: 6px;
        color: #c94c35;
        font-weight: 700;
    }

    html[data-theme="light"] #changelist-filter .viewlink::before {
        content: "\1F441";
        font-size: 14px;
        line-height: 1;
    }

    html[data-theme="light"] #changelist-filter .hidelink::before {
        content: "\00D7";
        font-size: 15px;
        line-height: 1;
    }

    html[data-theme="light"] #changelist-filter li.selected a,
    html[data-theme="light"] #changelist-filter li.selected a:link,
    html[data-theme="light"] #changelist-filter li.selected a:visited {
        color: #c94c35 !important;
        font-weight: 700;
    }

    



    html[data-theme="light"] #nav-sidebar {
        background: rgba(255, 255, 255, 0.74);
        border-right: 1px solid rgba(255, 99, 71, 0.14);
        backdrop-filter: blur(10px);
        box-shadow: inset -1px 0 0 rgba(255, 99, 71, 0.06);
    }

    html[data-theme="light"] #toggle-nav-sidebar,
    html[data-theme="light"] #toggle-nav-sidebar:hover,
    html[data-theme="light"] #toggle-nav-sidebar:focus {
        color: #ff6347 !important;
    }

    html[data-theme="light"] #nav-filter {
        background: #fff8f4;
        border: 1px solid rgba(255, 99, 71, 0.14);
        border-radius: 12px;
        color: #7f3529;
        margin: 12px;
        width: calc(100% - 24px);
    }

    html[data-theme="light"] #nav-sidebar .module,
    html[data-theme="light"] #nav-sidebar .app-auth,
    html[data-theme="light"] #nav-sidebar .app-scripts {
        background: rgba(255, 255, 255, 0.68);
        border: 1px solid rgba(255, 99, 71, 0.12);
        border-radius: 12px;
        margin: 12px;
        overflow: hidden;
        box-shadow: 0 10px 26px rgba(144, 73, 58, 0.07);
    }

    html[data-theme="light"] #nav-sidebar .caption,
    html[data-theme="light"] #nav-sidebar .section,
    html[data-theme="light"] .module h2,
    html[data-theme="light"] .module caption,
    html[data-theme="light"] .inline-group h2,
    html[data-theme="light"] #changelist-filter h2 {
        background: linear-gradient(135deg, #ff6347 0%, #ff7f66 100%);
        color: #fff7f5;
        border-radius: 12px 12px 0 0;
    }

    html[data-theme="light"] #nav-sidebar table,
    html[data-theme="light"] #nav-sidebar tbody,
    html[data-theme="light"] #nav-sidebar tr,
    html[data-theme="light"] #nav-sidebar th,
    html[data-theme="light"] #nav-sidebar td {
        background: transparent !important;
        border-radius: 02!important;
    }

    html[data-theme="light"] #nav-sidebar tbody th,
    html[data-theme="light"] #nav-sidebar tbody td {
        border-top: 1px solid rgba(255, 99, 71, 0.08);
        vertical-align: middle;
        padding: 0;
    }

    html[data-theme="light"] #nav-sidebar tbody th {
        width: 100%;
    }

    html[data-theme="light"] #nav-sidebar tbody td {
        width: 72px;
        text-align: center;
        white-space: nowrap;
    }

    html[data-theme="light"] #nav-sidebar a {
        color: #6f372d;
        display: block;
        padding: 12px 14px;
    }

    html[data-theme="light"] #nav-sidebar td a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 12px 8px;
    }

    html[data-theme="light"] #nav-sidebar td a.addlink {
        background-image: none !important;
        padding-left: 8px !important;
    }

    html[data-theme="light"] #nav-sidebar td a.addlink::before {
        content: "+";
        display: inline-block;
        font-size: 22px;
        line-height: 1;
        font-weight: 700;
        color: #7dbb3b;
        margin-right: 2px;
    }

    html[data-theme="light"] #nav-sidebar a.current-model,
    html[data-theme="light"] #nav-sidebar .current-model a {
        background: linear-gradient(135deg, #ffd6cf 0%, #fff0eb 100%) !important;
        color: #9b3625;
        font-weight: 700;
    }

    html[data-theme="light"] #nav-sidebar .current-app .section,
    html[data-theme="light"] #nav-sidebar .current-app .section:link,
    html[data-theme="light"] #nav-sidebar .current-app .section:visited {
        background: transparent !important;
        color: #fff7f5 !important;
        font-weight: 700;
        padding: 12px 14px;
    }

    html[data-theme="light"] #main,
    html[data-theme="light"] #content {
        background: transparent;
    }

    html[data-theme="light"] #content-main,
    html[data-theme="light"] .dashboard .module,
    html[data-theme="light"] #changelist-form,
    html[data-theme="light"] .submit-row,
    html[data-theme="light"] .results,
    html[data-theme="light"] #changelist-filter,
    html[data-theme="light"] .paginator,
    html[data-theme="light"] .object-tools,
    html[data-theme="light"] form .aligned,
    html[data-theme="light"] .form-row,
    html[data-theme="light"] .inline-group {
        border-radius: 12px;
    }

    html[data-theme="light"] #changelist-form,
    html[data-theme="light"] .change-form #content-main,
    html[data-theme="light"] .dashboard #content-main,
    html[data-theme="light"] #content-related,
    html[data-theme="light"] #changelist-filter {
        background: rgba(255, 255, 255, 0.72);
        border: 1px solid rgba(255, 99, 71, 0.12);
        box-shadow: 0 18px 45px rgba(144, 73, 58, 0.08);
        backdrop-filter: blur(10px);
    }

    html[data-theme="light"] .results table thead th {
        background: rgba(255, 99, 71, 0.08);
        color: #7f3529;
    }

    html[data-theme="light"] .results tbody tr:nth-child(even) {
        background: rgba(255, 248, 244, 0.72);
    }

    html[data-theme="light"] .results tbody tr:hover {
        background: rgba(255, 99, 71, 0.08);
    }

    html[data-theme="light"] .button,
    html[data-theme="light"] input[type=submit],
    html[data-theme="light"] input[type=button],
    html[data-theme="light"] .submit-row input,
    html[data-theme="light"] a.button,
    html[data-theme="light"] .object-tools a {
        background: linear-gradient(135deg, #ff6347 0%, #ff7f66 100%);
        border-color: transparent;
        color: #ffffff !important;
        border-radius: 929px;
        box-shadow: 0 10px 24px rgba(229, 83, 58, 0.2);
        text-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
    }

    html[data-theme="light"] .button:hover,
    html[data-theme="light"] input[type=submit]:hover,
    html[data-theme="light"] input[type=button]:hover,
    html[data-theme="light"] .submit-row input:hover,
    html[data-theme="light"] a.button:hover,
    html[data-theme="light"] .object-tools a:hover {
        background: linear-gradient(135deg, #e5533a 0%, #ff7157 100%);
        color: #ffffff !important;
    }

    html[data-theme="light"] #toolbar {
        background: rgba(255, 255, 255, 0.72);
        border: 1px solid rgba(255, 99, 71, 0.12);
        border-radius: 12px;
    }

    html[data-theme="light"] #toolbar input[type="text"] {
        border: 1px solid rgba(255, 99, 71, 0.22);
        background: #fffdfc;
        color: #5f3027;
    }

    html[data-theme="light"] #toolbar input[type="submit"],
    html[data-theme="light"] #toolbar button {
        background: linear-gradient(135deg, #ff6347 0%, #ff7f66 100%);
        color: #ffffff !important;
        border: 0;
    }

    html[data-theme="light"] #toolbar svg,
    html[data-theme="light"] #toolbar .search-icon {
        color: #c94c35;
        fill: #c94c35;
    }

    html[data-theme="light"] #changelist .actions select {
        border: 1px solid rgba(255, 99, 71, 0.22) !important;
        border-radius: 12px !important;
        background: #fffdfc !important;
        color: #5f3027 !important;
        height: 2rem;
        padding: 0 8px;
    }

    html[data-theme="light"] #changelist .actions .button,
    html[data-theme="light"] #changelist .actions button,
    html[data-theme="light"] #changelist .actions input[type="submit"] {
        background: linear-gradient(135deg, #ff6347 0%, #ff7f66 100%) !important;
        color: #ffffff !important;
        border: 0 !important;
        border-radius: 12px !important;
        box-shadow: 0 8px 18px rgba(229, 83, 58, 0.16) !important;
        height: 2rem;
        line-height: 1 !important;
        padding: 4px 12px !important;
    }

    html[data-theme="light"] #changelist .actions .button:hover,
    html[data-theme="light"] #changelist .actions .button:focus,
    html[data-theme="light"] #changelist .actions button:hover,
    html[data-theme="light"] #changelist .actions input[type="submit"]:hover {
        background: linear-gradient(135deg, #e5533a 0%, #ff7157 100%) !important;
        color: #ffffff !important;
    }

    html[data-theme="light"] input,
    html[data-theme="light"] textarea,
    html[data-theme="light"] select {
        border-radius: 12px;
        border-color: rgba(255, 99, 71, 0.18);
        background: rgba(255, 255, 255, 0.92);
    }

    html[data-theme="light"] a:link,
    html[data-theme="light"] a:visited {
        color: #d54f37;
    }

    html[data-theme="light"] a:hover {
        color: #ff7f66;
    }

    /* Final dark mode polish overrides */
    html[data-theme="dark"] body {
        background: radial-gradient(circle at top left, rgba(255, 99, 71, 0.08), transparent 24%), linear-gradient(180deg, #141414 0%, #0d0d0d 100%) !important;
        color: #f5e8e4 !important;
    }

    html[data-theme="dark"] #container,
    html[data-theme="dark"] #main,
    html[data-theme="dark"] #content {
        background: transparent !important;
    }

    html[data-theme="dark"] #nav-sidebar {
        background: rgba(20, 20, 20, 0.88) !important;
        border-right: 1px solid rgba(255, 99, 71, 0.16) !important;
        box-shadow: inset -1px 0 0 rgba(255, 99, 71, 0.08) !important;
    }

    html[data-theme="dark"] #nav-sidebar .module,
    html[data-theme="dark"] #nav-sidebar .app-auth,
    html[data-theme="dark"] #nav-sidebar .app-scripts {
        background: rgba(24, 24, 24, 0.96) !important;
        border: 1px solid rgba(255, 99, 71, 0.12) !important;
        border-radius: 12px !important;
        margin: 12px !important;
        overflow: hidden !important;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28) !important;
    }

    html[data-theme="dark"] #nav-sidebar .module caption,
    html[data-theme="dark"] #nav-sidebar .module h2,
    html[data-theme="dark"] #nav-sidebar .caption,
    html[data-theme="dark"] #nav-sidebar .section,
    html[data-theme="dark"] #changelist-filter h2 {
        background: linear-gradient(135deg, #ff6347 0%, #ff7f66 100%) !important;
        color: #fff7f5 !important;
        border-radius: 12px 12px 0 0 !important;
    }

    html[data-theme="dark"] #nav-sidebar table,
    html[data-theme="dark"] #nav-sidebar tbody,
    html[data-theme="dark"] #nav-sidebar tr,
    html[data-theme="dark"] #nav-sidebar th,
    html[data-theme="dark"] #nav-sidebar td {
        background: transparent !important;
        border-radius: 02!important;
    }

    html[data-theme="dark"] #nav-sidebar tbody th,
    html[data-theme="dark"] #nav-sidebar tbody td {
        border-top: 1px solid rgba(255, 99, 71, 0.08) !important;
        padding: 0 !important;
        vertical-align: middle !important;
    }

    html[data-theme="dark"] #nav-sidebar tbody td {
        width: 72px !important;
        text-align: center !important;
        white-space: nowrap !important;
    }

    html[data-theme="dark"] #nav-sidebar a {
        color: #f4d9d2 !important;
        display: block !important;
        padding: 8px 14px !important;
    }

    html[data-theme="dark"] #nav-sidebar td a {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        padding: 12px 8px !important;
    }

    html[data-theme="dark"] #nav-sidebar td a.addlink {
        background-image: none !important;
        padding-left: 8px !important;
    }

    html[data-theme="dark"] #nav-sidebar td a.addlink::before {
        content: "+";
        display: inline-block;
        font-size: 22px;
        line-height: 1;
        font-weight: 700;
        color: #7dbb3b;
        margin-right: 2px;
    }

    html[data-theme="dark"] #nav-sidebar a.current-model,
    html[data-theme="dark"] #nav-sidebar .current-model a {
        background: linear-gradient(135deg, rgba(255, 99, 71, 0.22) 0%, rgba(255, 127, 102, 0.12) 100%) !important;
        color: #fff4f1 !important;
        font-weight: 700 !important;
    }

    html[data-theme="dark"] #toggle-nav-sidebar,
    html[data-theme="dark"] #toggle-nav-sidebar:hover,
    html[data-theme="dark"] #toggle-nav-sidebar:focus {
        color: #ff6347 !important;
    }

    html[data-theme="dark"] #content-main,
    html[data-theme="dark"] #changelist-form,
    html[data-theme="dark"] #changelist-filter,
    html[data-theme="dark"] #toolbar,
    html[data-theme="dark"] .dashboard .module,
    html[data-theme="dark"] .change-form #content-main,
    html[data-theme="dark"] #content-related {
        background: rgba(27, 27, 27, 0.9) !important;
        border: 1px solid rgba(255, 99, 71, 0.12) !important;
        border-radius: 12px !important;
        box-shadow: 0 18px 45px rgba(0, 0, 0, 0.26) !important;
        backdrop-filter: blur(10px) !important;
    }

    html[data-theme="dark"] #toolbar {
        border-radius: 12px !important;
    }

    html[data-theme="dark"] .results table thead th {
        background: rgba(255, 99, 71, 0.08) !important;
        color: #ffe3dd !important;
    }

    html[data-theme="dark"] .results tbody tr:nth-child(even) {
        background: rgba(255, 255, 255, 0.02) !important;
    }

    html[data-theme="dark"] .results tbody tr:hover {
        background: rgba(255, 99, 71, 0.08) !important;
    }

    html[data-theme="dark"] #toolbar input[type="text"],
    html[data-theme="dark"] #changelist-search input[type="text"],
    html[data-theme="dark"] #changelist .actions select,
    html[data-theme="dark"] select,
    html[data-theme="dark"] textarea,
    html[data-theme="dark"] input[type="text"],
    html[data-theme="dark"] input[type="password"],
    html[data-theme="dark"] input[type="email"],
    html[data-theme="dark"] input[type="number"] {
        background: #111111 !important;
        border: 1px solid rgba(255, 99, 71, 0.18) !important;
        color: #fff1ed !important;
        border-radius: 12px !important;
    }

    html[data-theme="dark"] .button,
    html[data-theme="dark"] input[type=submit],
    html[data-theme="dark"] input[type=button],
    html[data-theme="dark"] .submit-row input,
    html[data-theme="dark"] a.button,
    html[data-theme="dark"] .object-tools a,
    html[data-theme="dark"] #changelist .actions .button,
    html[data-theme="dark"] #changelist .actions input[type=submit] {
        background: linear-gradient(135deg, #ff6347 0%, #ff7f66 100%) !important;
        border-color: transparent !important;
        color: #ffffff !important;
        border-radius: 929px !important;
        box-shadow: 0 10px 24px rgba(120, 29, 15, 0.28) !important;
    }

    html[data-theme="dark"] .theme-toggle,
    html[data-theme="dark"] .theme-toggle:link,
    html[data-theme="dark"] .theme-toggle:visited,
    html[data-theme="dark"] button.theme-toggle,
    html[data-theme="dark"] #header .theme-toggle,
    html[data-theme="dark"] #header .theme-toggle *,
    html[data-theme="dark"] #header .theme-toggle svg,
    html[data-theme="dark"] #header .theme-toggle path,
    html[data-theme="dark"] #header .theme-toggle::before,
    html[data-theme="dark"] #header .theme-toggle::after {
        background: transparent !important;
        background-color: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
    }

    @media (prefers-color-scheme: dark) {
        html[data-theme="auto"] body {
            background: radial-gradient(circle at top left, rgba(255, 99, 71, 0.08), transparent 24%), linear-gradient(180deg, #141414 0%, #0d0d0d 100%) !important;
            color: #f5e8e4 !important;
        }

        html[data-theme="auto"] #container,
        html[data-theme="auto"] #main,
        html[data-theme="auto"] #content {
            background: transparent !important;
        }

        html[data-theme="auto"] #nav-sidebar {
            background: rgba(20, 20, 20, 0.88) !important;
            border-right: 1px solid rgba(255, 99, 71, 0.16) !important;
            box-shadow: inset -1px 0 0 rgba(255, 99, 71, 0.08) !important;
        }

        html[data-theme="auto"] #nav-sidebar .module,
        html[data-theme="auto"] #nav-sidebar .app-auth,
        html[data-theme="auto"] #nav-sidebar .app-scripts {
            background: rgba(24, 24, 24, 0.96) !important;
            border: 1px solid rgba(255, 99, 71, 0.12) !important;
            border-radius: 12px !important;
            margin: 12px !important;
            overflow: hidden !important;
            box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28) !important;
        }

        html[data-theme="auto"] #nav-sidebar .module caption,
        html[data-theme="auto"] #nav-sidebar .module h2,
        html[data-theme="auto"] #nav-sidebar .caption,
        html[data-theme="auto"] #nav-sidebar .section,
        html[data-theme="auto"] #changelist-filter h2 {
            background: linear-gradient(135deg, #ff6347 0%, #ff7f66 100%) !important;
            color: #fff7f5 !important;
            border-radius: 12px 12px 0 0 !important;
        }

        html[data-theme="auto"] #nav-sidebar table,
        html[data-theme="auto"] #nav-sidebar tbody,
        html[data-theme="auto"] #nav-sidebar tr,
        html[data-theme="auto"] #nav-sidebar th,
        html[data-theme="auto"] #nav-sidebar td {
            background: transparent !important;
            border-radius: 02!important;
        }

        html[data-theme="auto"] #nav-sidebar tbody th,
        html[data-theme="auto"] #nav-sidebar tbody td {
            border-top: 1px solid rgba(255, 99, 71, 0.08) !important;
            padding: 0 !important;
            vertical-align: middle !important;
        }

        html[data-theme="auto"] #nav-sidebar tbody td {
            width: 72px !important;
            text-align: center !important;
            white-space: nowrap !important;
        }

        html[data-theme="auto"] #nav-sidebar a {
            color: #f4d9d2 !important;
            display: block !important;
            padding: 8px 14px !important;
        }

        html[data-theme="auto"] #nav-sidebar td a {
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            gap: 6px !important;
            padding: 12px 8px !important;
        }

        html[data-theme="auto"] #nav-sidebar td a.addlink {
            background-image: none !important;
            padding-left: 8px !important;
        }

        html[data-theme="auto"] #nav-sidebar td a.addlink::before {
            content: "+";
            display: inline-block;
            font-size: 22px;
            line-height: 1;
            font-weight: 700;
            color: #7dbb3b;
            margin-right: 2px;
        }

        html[data-theme="auto"] #nav-sidebar a.current-model,
        html[data-theme="auto"] #nav-sidebar .current-model a {
            background: linear-gradient(135deg, rgba(255, 99, 71, 0.22) 0%, rgba(255, 127, 102, 0.12) 100%) !important;
            color: #fff4f1 !important;
            font-weight: 700 !important;
        }

        html[data-theme="auto"] #toggle-nav-sidebar,
        html[data-theme="auto"] #toggle-nav-sidebar:hover,
        html[data-theme="auto"] #toggle-nav-sidebar:focus {
            color: #ff6347 !important;
        }

        html[data-theme="auto"] #content-main,
        html[data-theme="auto"] #changelist-form,
        html[data-theme="auto"] #changelist-filter,
        html[data-theme="auto"] #toolbar,
        html[data-theme="auto"] .dashboard .module,
        html[data-theme="auto"] .change-form #content-main,
        html[data-theme="auto"] #content-related {
            background: rgba(27, 27, 27, 0.9) !important;
            border: 1px solid rgba(255, 99, 71, 0.12) !important;
            border-radius: 12px !important;
            box-shadow: 0 18px 45px rgba(0, 0, 0, 0.26) !important;
            backdrop-filter: blur(10px) !important;
        }

        html[data-theme="auto"] #toolbar {
            border-radius: 12px !important;
        }

        html[data-theme="auto"] .results table thead th {
            background: rgba(255, 99, 71, 0.08) !important;
            color: #ffe3dd !important;
        }

        html[data-theme="auto"] .results tbody tr:nth-child(even) {
            background: rgba(255, 255, 255, 0.02) !important;
        }

        html[data-theme="auto"] .results tbody tr:hover {
            background: rgba(255, 99, 71, 0.08) !important;
        }

        html[data-theme="auto"] #toolbar input[type="text"],
        html[data-theme="auto"] #changelist-search input[type="text"],
        html[data-theme="auto"] #changelist .actions select,
        html[data-theme="auto"] select,
        html[data-theme="auto"] textarea,
        html[data-theme="auto"] input[type="text"],
        html[data-theme="auto"] input[type="password"],
        html[data-theme="auto"] input[type="email"],
        html[data-theme="auto"] input[type="number"] {
            background: #111111 !important;
            border: 1px solid rgba(255, 99, 71, 0.18) !important;
            color: #fff1ed !important;
            border-radius: 12px !important;
        }

        html[data-theme="auto"] .button,
        html[data-theme="auto"] input[type=submit],
        html[data-theme="auto"] input[type=button],
        html[data-theme="auto"] .submit-row input,
        html[data-theme="auto"] a.button,
        html[data-theme="auto"] .object-tools a,
        html[data-theme="auto"] #changelist .actions .button,
        html[data-theme="auto"] #changelist .actions input[type=submit] {
            background: linear-gradient(135deg, #ff6347 0%, #ff7f66 100%) !important;
            border-color: transparent !important;
            color: #ffffff !important;
            border-radius: 929px !important;
            box-shadow: 0 10px 24px rgba(120, 29, 15, 0.28) !important;
        }

        html[data-theme="auto"] .theme-toggle,
        html[data-theme="auto"] .theme-toggle:link,
        html[data-theme="auto"] .theme-toggle:visited,
        html[data-theme="auto"] button.theme-toggle,
        html[data-theme="auto"] #header .theme-toggle,
        html[data-theme="auto"] #header .theme-toggle *,
        html[data-theme="auto"] #header .theme-toggle svg,
        html[data-theme="auto"] #header .theme-toggle path,
        html[data-theme="auto"] #header .theme-toggle::before,
        html[data-theme="auto"] #header .theme-toggle::after {
            background: transparent !important;
            background-color: transparent !important;
            border: 0 !important;
            box-shadow: none !important;
        }
    }

    /* Final filter polish for dark and auto-dark */
    html[data-theme="dark"] #changelist-filter,
    html[data-theme="dark"] #changelist-filter-extra-actions,
    html[data-theme="dark"] #changelist-filter h3,
    html[data-theme="dark"] #changelist-filter details,
    html[data-theme="dark"] #changelist-filter details summary,
    html[data-theme="dark"] #changelist-filter ul,
    html[data-theme="dark"] #changelist-filter li,
    html[data-theme="dark"] #changelist-filter li.selected {
        background: transparent !important;
        color: #f4d9d2 !important;
        border-color: rgba(255, 99, 71, 0.08) !important;
    }

    html[data-theme="dark"] #changelist-filter h3,
    html[data-theme="dark"] #changelist-filter details summary {
        padding: 12px 16px !important;
        margin: 0 !important;
        font-weight: 500 !important;
    }

    html[data-theme="dark"] #changelist-filter ul {
        margin: 0 !important;
        padding: 4px 16px 14px !important;
        border-bottom: 1px solid rgba(255, 99, 71, 0.08) !important;
    }

    html[data-theme="dark"] #changelist-filter li {
        padding: 4px 0 !important;
    }

    html[data-theme="dark"] #changelist-filter li.selected {
        background: rgba(255, 99, 71, 0.08) !important;
        border-radius: 12px !important;
        padding: 6px 10px !important;
        margin: 2px 0 !important;
    }

    html[data-theme="dark"] #changelist-filter a,
    html[data-theme="dark"] #changelist-filter summary,
    html[data-theme="dark"] #changelist-filter h3,
    html[data-theme="dark"] #changelist-filter h3 a {
        color: #f4d9d2 !important;
    }

    html[data-theme="dark"] #changelist-filter a:hover,
    html[data-theme="dark"] #changelist-filter details summary:hover,
    html[data-theme="dark"] #changelist-filter li.selected a,
    html[data-theme="dark"] #changelist-filter li.selected a:link,
    html[data-theme="dark"] #changelist-filter li.selected a:visited {
        color: #ff8a75 !important;
    }

    @media (prefers-color-scheme: dark) {
        html[data-theme="auto"] #changelist-filter,
        html[data-theme="auto"] #changelist-filter-extra-actions,
        html[data-theme="auto"] #changelist-filter h3,
        html[data-theme="auto"] #changelist-filter details,
        html[data-theme="auto"] #changelist-filter details summary,
        html[data-theme="auto"] #changelist-filter ul,
        html[data-theme="auto"] #changelist-filter li,
        html[data-theme="auto"] #changelist-filter li.selected {
            background: transparent !important;
            color: #f4d9d2 !important;
            border-color: rgba(255, 99, 71, 0.08) !important;
        }

        html[data-theme="auto"] #changelist-filter h3,
        html[data-theme="auto"] #changelist-filter details summary {
            padding: 12px 16px !important;
            margin: 0 !important;
            font-weight: 500 !important;
        }

        html[data-theme="auto"] #changelist-filter ul {
            margin: 0 !important;
            padding: 4px 16px 14px !important;
            border-bottom: 1px solid rgba(255, 99, 71, 0.08) !important;
        }

        html[data-theme="auto"] #changelist-filter li {
            padding: 4px 0 !important;
        }

        html[data-theme="auto"] #changelist-filter li.selected {
            background: rgba(255, 99, 71, 0.08) !important;
            border-radius: 12px !important;
            padding: 6px 10px !important;
            margin: 2px 0 !important;
        }

        html[data-theme="auto"] #changelist-filter a,
        html[data-theme="auto"] #changelist-filter summary,
        html[data-theme="auto"] #changelist-filter h3,
        html[data-theme="auto"] #changelist-filter h3 a {
            color: #f4d9d2 !important;
        }

        html[data-theme="auto"] #changelist-filter a:hover,
        html[data-theme="auto"] #changelist-filter details summary:hover,
        html[data-theme="auto"] #changelist-filter li.selected a,
        html[data-theme="auto"] #changelist-filter li.selected a:link,
        html[data-theme="auto"] #changelist-filter li.selected a:visited {
            color: #ff8a75 !important;
        }
    }

    /* Restore default dark filter internals */
    html[data-theme="dark"] #changelist-filter h3,
    html[data-theme="dark"] #changelist-filter details summary {
        padding: 0 15px !important;
        margin-bottom: 10px !important;
        font-weight: 400 !important;
    }

    html[data-theme="dark"] #changelist-filter ul {
        margin: 5px 0 !important;
        padding: 0 15px 15px !important;
        border-bottom: 1px solid var(--hairline-color) !important;
    }

    html[data-theme="dark"] #changelist-filter li,
    html[data-theme="dark"] #changelist-filter li.selected {
        background: transparent !important;
        border-radius: 02!important;
        padding: 5px 0 !important;
        margin: 0 !important;
    }

    html[data-theme="dark"] #changelist-filter .viewlink {
        background: url("{% static 'admin/img/icon-viewlink.svg' %}") 0 1px no-repeat !important;
        padding-left: 16px !important;
    }

    html[data-theme="dark"] #changelist-filter .hidelink {
        background: url("{% static 'admin/img/icon-hidelink.svg' %}") 0 1px no-repeat !important;
        padding-left: 16px !important;
    }

    html[data-theme="dark"] #changelist-filter .viewlink::before,
    html[data-theme="dark"] #changelist-filter .hidelink::before {
        content: none !important;
        display: none !important;
    }

    html[data-theme="dark"] #changelist-filter details > summary::before {
        content: "\2192" !important;
        color: var(--link-hover-color) !important;
        font-weight: bold !important;
    }

    html[data-theme="dark"] #changelist-filter details[open] > summary::before {
        content: "\2193" !important;
    }

    @media (prefers-color-scheme: dark) {
        html[data-theme="auto"] #changelist-filter h3,
        html[data-theme="auto"] #changelist-filter details summary {
            padding: 0 15px !important;
            margin-bottom: 10px !important;
            font-weight: 400 !important;
        }

        html[data-theme="auto"] #changelist-filter ul {
            margin: 5px 0 !important;
            padding: 0 15px 15px !important;
            border-bottom: 1px solid var(--hairline-color) !important;
        }

        html[data-theme="auto"] #changelist-filter li,
        html[data-theme="auto"] #changelist-filter li.selected {
            background: transparent !important;
            border-radius: 02!important;
            padding: 5px 0 !important;
            margin: 0 !important;
        }

        html[data-theme="auto"] #changelist-filter .viewlink {
            background: url("{% static 'admin/img/icon-viewlink.svg' %}") 0 1px no-repeat !important;
            padding-left: 16px !important;
        }

        html[data-theme="auto"] #changelist-filter .hidelink {
            background: url("{% static 'admin/img/icon-hidelink.svg' %}") 0 1px no-repeat !important;
            padding-left: 16px !important;
        }

        html[data-theme="auto"] #changelist-filter .viewlink::before,
        html[data-theme="auto"] #changelist-filter .hidelink::before {
            content: none !important;
            display: none !important;
        }

        html[data-theme="auto"] #changelist-filter details > summary::before {
            content: "\2192" !important;
            color: var(--link-hover-color) !important;
            font-weight: bold !important;
        }

        html[data-theme="auto"] #changelist-filter details[open] > summary::before {
            content: "\2193" !important;
        }
    }

    html[data-theme="dark"] #changelist-filter .viewlink::before,
    html[data-theme="dark"] #changelist-filter .hidelink::before {
        display: inline-block !important;
        margin-right: 6px !important;
        font-weight: 700 !important;
    }

    html[data-theme="dark"] #changelist-filter .viewlink::before {
        content: "\1F441" !important;
        color: #ff6347 !important;
        font-size: 14px !important;
        line-height: 1 !important;
    }

    html[data-theme="dark"] #changelist-filter .hidelink::before {
        content: "\00D7" !important;
        color: #ff6347 !important;
        font-size: 15px !important;
        line-height: 1 !important;
    }

    @media (prefers-color-scheme: dark) {
        html[data-theme="auto"] #changelist-filter .viewlink::before,
        html[data-theme="auto"] #changelist-filter .hidelink::before {
            display: inline-block !important;
            margin-right: 6px !important;
            font-weight: 700 !important;
        }

        html[data-theme="auto"] #changelist-filter .viewlink::before {
            content: "\1F441" !important;
            color: #ff6347 !important;
            font-size: 14px !important;
            line-height: 1 !important;
        }

        html[data-theme="auto"] #changelist-filter .hidelink::before {
            content: "\00D7" !important;
            color: #ff6347 !important;
            font-size: 15px !important;
            line-height: 1 !important;
        }
    }

    html[data-theme="light"] #changelist-filter .viewlink,
    html[data-theme="dark"] #changelist-filter .viewlink,
    html[data-theme="light"] #changelist-filter .hidelink,
    html[data-theme="dark"] #changelist-filter .hidelink {
        background-image: none !important;
    }

    @media (prefers-color-scheme: dark) {
        html[data-theme="auto"] #changelist-filter .viewlink,
        html[data-theme="auto"] #changelist-filter .hidelink {
            background-image: none !important;
        }
    }

    html[data-theme="light"] #changelist-filter .viewlink,
    html[data-theme="light"] #changelist-filter .hidelink,
    html[data-theme="dark"] #changelist-filter .viewlink,
    html[data-theme="dark"] #changelist-filter .hidelink {
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        padding-left: 0 !important;
        background-image: none !important;
    }

    html[data-theme="light"] #changelist-filter .viewlink::before,
    html[data-theme="light"] #changelist-filter .hidelink::before,
    html[data-theme="dark"] #changelist-filter .viewlink::before,
    html[data-theme="dark"] #changelist-filter .hidelink::before {
        margin-right: 0 !important;
        flex: 0 0 auto !important;
    }

    @media (prefers-color-scheme: dark) {
        html[data-theme="auto"] #changelist-filter .viewlink,
        html[data-theme="auto"] #changelist-filter .hidelink {
            display: inline-flex !important;
            align-items: center !important;
            gap: 6px !important;
            padding-left: 0 !important;
            background-image: none !important;
        }

        html[data-theme="auto"] #changelist-filter .viewlink::before,
        html[data-theme="auto"] #changelist-filter .hidelink::before {
            margin-right: 0 !important;
            flex: 0 0 auto !important;
        }
    }

    @media (prefers-color-scheme: dark) {
        html[data-theme="auto"] #nav-filter {
            background: #171717 !important;
            border: 1px solid rgba(255, 99, 71, 0.14) !important;
            border-radius: 12px !important;
            color: #f0d6cf !important;
            margin: 12px !important;
            width: calc(100% - 24px) !important;
        }

        html[data-theme="auto"] #nav-filter input[type="text"] {
            background: #111111 !important;
            border: 1px solid rgba(255, 99, 71, 0.18) !important;
            color: #fff1ed !important;
            border-radius: 12px !important;
            box-shadow: none !important;
        }
    }

    /* Final sidebar add-link alignment */
    #nav-sidebar tbody td {
        width: 84px !important;
        text-align: center !important;
        white-space: nowrap !important;
        padding: 0 !important;
        vertical-align: middle !important;
    }

    #nav-sidebar td a,
    #nav-sidebar td a.addlink {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
        padding: 12px 8px !important;
        line-height: 1 !important;
        background-image: none !important;
        vertical-align: middle !important;
    }

    #nav-sidebar td a.addlink::before {
        content: "+";
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 12px !important;
        height: 12px !important;
        margin-right: 2px !important;
        font-size: 20px !important;
        line-height: 1 !important;
        font-weight: 700 !important;
        color: #7dbb3b !important;
        transform: translateY(-1px) !important;
    }

    /* Exact sidebar add-link rendering */
    #nav-sidebar td a.addlink {
        font-size: 0 !important;
        letter-spacing: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
        padding: 12px 8px !important;
        min-width: 54px !important;
        line-height: 1 !important;
        background-image: none !important;
    }

    #nav-sidebar td a.addlink::before {
        content: "+" !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 20px !important;
        line-height: 1 !important;
        font-weight: 700 !important;
        color: #7dbb3b !important;
        margin: 0 !important;
        vertical-align: middle !important;
    }

    #nav-sidebar td a.addlink::after {
        content: "Add" !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 14px !important;
        line-height: 1 !important;
        font-weight: 400 !important;
        color: inherit !important;
        margin: 0 !important;
        vertical-align: middle !important;
    }

    /* Final sidebar card radius sync */
    #nav-sidebar .module,
    #nav-sidebar .app-auth,
    #nav-sidebar .app-scripts {
        border-radius: 22px !important;
        overflow: hidden !important;
    }

    #nav-sidebar .module caption,
    #nav-sidebar .module h2,
    #nav-sidebar .caption,
    #nav-sidebar .section {
        border-radius: 12px 18px 0 0 !important;
    }

    #nav-sidebar table {
        border-radius: inherit !important;
        overflow: hidden !important;
    }

    #nav-sidebar tbody tr:last-child th,
    #nav-sidebar tbody tr:last-child td {
        border-bottom-left-radius: 18px !important;
        border-bottom-right-radius: 18px !important;
    }

    


    /* Clean geometry system */
    :root {
        --ts-radius-card: 18px;
        --ts-radius-card-top: 18px;
        --ts-radius-panel: 12px;
        --ts-radius-input: 10px;
        --ts-radius-toolbar: 16px;
        --ts-radius-pill: 999px;
    }

    #nav-sidebar .module,
    #nav-sidebar .app-auth,
    #nav-sidebar .app-scripts,
    .dashboard #content-main .module,
    #content-main,
    #changelist-form,
    #changelist-filter,
    #content-related,
    .inline-group,
    .form-row,
    .results,
    .submit-row,
    .paginator,
    .object-tools {
        border-radius: var(--ts-radius-card) !important;
        overflow: hidden !important;
    }

    #nav-filter {
        border-radius: var(--ts-radius-panel) !important;
    }

    #toolbar {
        border-radius: var(--ts-radius-toolbar) !important;
    }

    #toolbar input[type="text"],
    #changelist-search input[type="text"],
    #changelist .actions select,
    select,
    textarea,
    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="number"] {
        border-radius: var(--ts-radius-input) !important;
    }

    .button,
    input[type=submit],
    input[type=button],
    .submit-row input,
    a.button,
    .object-tools a,
    #changelist .actions .button,
    #changelist .actions input[type=submit] {
        border-radius: var(--ts-radius-pill) !important;
    }


    body.change-list #content-main {
        overflow: visible !important;
    }

    body.change-list .object-tools {
        float: right !important;
        position: relative !important;
        z-index: 20 !important;
        margin: -48px 0 16px !important;
        padding: 0 !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    body.change-list .object-tools li {
        float: left !important;
        display: block !important;
        margin-left: 6px !important;
        overflow: visible !important;
    }

    body.change-list .object-tools a.addlink {
        background-image: none !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        padding: 8px 12px !important;
        line-height: 1 !important;
        vertical-align: middle !important;
    }

    body.change-list .object-tools a.addlink::after {
        content: "+" !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 18px !important;
        line-height: 1 !important;
        font-weight: 700 !important;
        color: #ffffff !important;
        margin-left: 2px !important;
        vertical-align: middle !important;
    }

    body.change-list .object-tools a,
    html[data-theme="light"] body.change-list .object-tools a,
    html[data-theme="dark"] body.change-list .object-tools a,
    html[data-theme="auto"] body.change-list .object-tools a {
        background: linear-gradient(135deg, #ff6347 0%, #ff7f66 100%) !important;
        color: #ffffff !important;
        border: 0 !important;
        opacity: 1 !important;
        box-shadow: 0 10px 24px rgba(229, 83, 58, 0.2) !important;
        text-shadow: 0 1px 1px rgba(0, 0, 0, 0.08) !important;
    }

    body.change-list .object-tools a:hover,
    html[data-theme="light"] body.change-list .object-tools a:hover,
    html[data-theme="dark"] body.change-list .object-tools a:hover,
    html[data-theme="auto"] body.change-list .object-tools a:hover {
        background: linear-gradient(135deg, #e5533a 0%, #ff7157 100%) !important;
        color: #ffffff !important;
        opacity: 1 !important;
    }

    .dashboard #content-main .module {
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    .dashboard #content-main .module table {
        width: 100% !important;
        border-collapse: separate !important;
        border-spacing: 0 !important;
        margin: 0 !important;
    }

    .dashboard #content-main .module caption {
        padding: 0 !important;
        margin: 0 !important;
        border: 0 !important;
        overflow: hidden !important;
        border-radius: var(--ts-radius-card-top) var(--ts-radius-card-top) 0 0 !important;
    }

    .dashboard #content-main .module caption .section {
        display: block !important;
        margin: 0 !important;
        padding: 8px 14px !important;
        border-radius: 0 !important;
    }

    html[data-theme="light"] .dashboard #content-main .module caption {
        background: linear-gradient(135deg, #ff6347 0%, #ff7f66 100%) !important;
    }

    html[data-theme="dark"] .dashboard #content-main .module caption {
        background: linear-gradient(135deg, #ff6347 0%, #ff7f66 100%) !important;
    }

    @media (prefers-color-scheme: dark) {
        html[data-theme="auto"] .dashboard #content-main .module caption {
            background: linear-gradient(135deg, #ff6347 0%, #ff7f66 100%) !important;
        }
    }

    /* Slightly larger radius for dark and auto-dark */
    html[data-theme="dark"] #nav-sidebar .module,
    html[data-theme="dark"] #nav-sidebar .app-auth,
    html[data-theme="dark"] #nav-sidebar .app-scripts,
    html[data-theme="dark"] .dashboard #content-main .module,
    html[data-theme="dark"] #content-main,
    html[data-theme="dark"] #changelist-form,
    html[data-theme="dark"] #changelist-filter,
    html[data-theme="dark"] #content-related,
    html[data-theme="dark"] .inline-group,
    html[data-theme="dark"] .form-row,
    html[data-theme="dark"] .results,
    html[data-theme="dark"] .submit-row,
    html[data-theme="dark"] .paginator,
    html[data-theme="dark"] .object-tools {
        border-radius: 22px !important;
    }

    html[data-theme="dark"] #toolbar {
        border-radius: 18px !important;
    }

    html[data-theme="dark"] #nav-filter {
        border-radius: 14px !important;
    }

    @media (prefers-color-scheme: dark) {
        html[data-theme="auto"] #nav-sidebar .module,
        html[data-theme="auto"] #nav-sidebar .app-auth,
        html[data-theme="auto"] #nav-sidebar .app-scripts,
        html[data-theme="auto"] .dashboard #content-main .module,
        html[data-theme="auto"] #content-main,
        html[data-theme="auto"] #changelist-form,
        html[data-theme="auto"] #changelist-filter,
        html[data-theme="auto"] #content-related,
        html[data-theme="auto"] .inline-group,
        html[data-theme="auto"] .form-row,
        html[data-theme="auto"] .results,
        html[data-theme="auto"] .submit-row,
        html[data-theme="auto"] .paginator,
        html[data-theme="auto"] .object-tools {
            border-radius: 22px !important;
        }

        html[data-theme="auto"] #toolbar {
            border-radius: 18px !important;
        }

        html[data-theme="auto"] #nav-filter {
            border-radius: 14px !important;
        }
    }

    html[data-theme="light"] #changelist-filter li.selected,
    html[data-theme="light"] #changelist-filter li.selected a,
    html[data-theme="light"] #changelist-filter li.selected a:link,
    html[data-theme="light"] #changelist-filter li.selected a:visited {
        background: transparent !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        font-weight: 400 !important;
    }

    html[data-theme="dark"] #changelist-filter li.selected,
    html[data-theme="dark"] #changelist-filter li.selected a,
    html[data-theme="dark"] #changelist-filter li.selected a:link,
    html[data-theme="dark"] #changelist-filter li.selected a:visited,
    html[data-theme="dark"] #changelist-filter ul,
    html[data-theme="dark"] #changelist-filter li {
        background: transparent !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    @media (prefers-color-scheme: dark) {
        html[data-theme="auto"] #changelist-filter li.selected,
        html[data-theme="auto"] #changelist-filter li.selected a,
        html[data-theme="auto"] #changelist-filter li.selected a:link,
        html[data-theme="auto"] #changelist-filter li.selected a:visited,
        html[data-theme="auto"] #changelist-filter ul,
        html[data-theme="auto"] #changelist-filter li {
            background: transparent !important;
            border-radius: 0 !important;
            box-shadow: none !important;
        }
    }

    html[data-theme="light"] #changelist-filter li.selected,
    html[data-theme="dark"] #changelist-filter li.selected,
    html[data-theme="light"] #changelist-filter li.selected::before,
    html[data-theme="dark"] #changelist-filter li.selected::before,
    html[data-theme="light"] #changelist-filter li.selected a::before,
    html[data-theme="dark"] #changelist-filter li.selected a::before {
        border-left: 0 !important;
        background: transparent !important;
        content: none !important;
    }

    @media (prefers-color-scheme: dark) {
        html[data-theme="auto"] #changelist-filter li.selected,
        html[data-theme="auto"] #changelist-filter li.selected::before,
        html[data-theme="auto"] #changelist-filter li.selected a::before {
            border-left: 0 !important;
            background: transparent !important;
            content: none !important;
        }
    }

    html[data-theme="light"] #changelist-filter li.selected a,
    html[data-theme="light"] #changelist-filter li.selected a:link,
    html[data-theme="light"] #changelist-filter li.selected a:visited {
        display: inline !important;
        color: #c94c35 !important;
        font-weight: 700 !important;
        opacity: 1 !important;
    }

    html[data-theme="dark"] #changelist-filter li.selected a,
    html[data-theme="dark"] #changelist-filter li.selected a:link,
    html[data-theme="dark"] #changelist-filter li.selected a:visited {
        display: inline !important;
        color: #ff8a75 !important;
        font-weight: 700 !important;
        opacity: 1 !important;
    }

    @media (prefers-color-scheme: dark) {
        html[data-theme="auto"] #changelist-filter li.selected a,
        html[data-theme="auto"] #changelist-filter li.selected a:link,
        html[data-theme="auto"] #changelist-filter li.selected a:visited {
            display: inline !important;
            color: #ff8a75 !important;
            font-weight: 700 !important;
            opacity: 1 !important;
        }
    }

    /* Selected filter marker at row start */
    #changelist-filter li.selected {
        position: relative !important;
        padding-left: 14px !important;
    }

    #changelist-filter li.selected::before {
        content: "" !important;
        position: absolute !important;
        left: 0 !important;
        top: 4px !important;
        bottom: 4px !important;
        width: 4px !important;
        border-radius: 2px !important;
        background: rgba(255, 99, 71, 0.32) !important;
    }

    html[data-theme="light"] #changelist-filter li.selected::before {
        background: rgba(201, 76, 53, 0.28) !important;
    }

    html[data-theme="dark"] #changelist-filter li.selected::before {
        background: rgba(255, 138, 117, 0.32) !important;
    }

    @media (prefers-color-scheme: dark) {
        html[data-theme="auto"] #changelist-filter li.selected::before {
            background: rgba(255, 138, 117, 0.32) !important;
        }
    }

    #toolbar input[type="submit"],
    #changelist .actions .button,
    #changelist .actions input[type=submit] {
        border-radius: 12px !important;
    }

    /* Match dark/auto filter spacing to light mode */
    html[data-theme="dark"] #changelist-filter h3,
    html[data-theme="dark"] #changelist-filter details summary {
        padding: 0 15px !important;
        margin-bottom: 10px !important;
        line-height: 1.5 !important;
    }

    html[data-theme="dark"] #changelist-filter ul {
        margin: 5px 0 !important;
        padding: 0 15px 15px !important;
    }

    html[data-theme="dark"] #changelist-filter li {
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1.5 !important;
    }

    html[data-theme="dark"] #changelist-filter li.selected a,
    html[data-theme="dark"] #changelist-filter li.selected a:link,
    html[data-theme="dark"] #changelist-filter li.selected a:visited,
    html[data-theme="dark"] #changelist-filter li a,
    html[data-theme="dark"] #changelist-filter li a:link,
    html[data-theme="dark"] #changelist-filter li a:visited {
        line-height: 1.5 !important;
    }

    @media (prefers-color-scheme: dark) {
        html[data-theme="auto"] #changelist-filter h3,
        html[data-theme="auto"] #changelist-filter details summary {
            padding: 0 15px !important;
            margin-bottom: 10px !important;
            line-height: 1.5 !important;
        }

        html[data-theme="auto"] #changelist-filter ul {
            margin: 5px 0 !important;
            padding: 0 15px 15px !important;
        }

        html[data-theme="auto"] #changelist-filter li {
            margin: 0 !important;
            padding: 0 !important;
            line-height: 1.5 !important;
        }

        html[data-theme="auto"] #changelist-filter li.selected a,
        html[data-theme="auto"] #changelist-filter li.selected a:link,
        html[data-theme="auto"] #changelist-filter li.selected a:visited,
        html[data-theme="auto"] #changelist-filter li a,
        html[data-theme="auto"] #changelist-filter li a:link,
        html[data-theme="auto"] #changelist-filter li a:visited {
            line-height: 1.5 !important;
        }
    }

    #changelist-filter ul,
    #changelist-filter li,
    #changelist-filter h3,
    #changelist-filter details summary,
    #changelist-filter li.selected {
        border-bottom: 0 !important;
        border-top: 0 !important;
    }

    #changelist-filter ul,
    #changelist-filter li,
    #changelist-filter h3,
    #changelist-filter details,
    #changelist-filter details summary,
    #changelist-filter li.selected,
    #changelist-filter #changelist-filter-extra-actions,
    #changelist-filter #changelist-filter-extra-actions h3 {
        border: 0 !important;
        border-top: 0 !important;
        border-bottom: 0 !important;
        box-shadow: none !important;
    }

    #changelist-filter ul,
    #changelist-filter details ul,
    #changelist-filter h3 + ul,
    #changelist-filter details + ul,
    #changelist-filter details[open] ul {
        border-bottom: none !important;
        border-top: none !important;
        border-left: none !important;
        border-right: none !important;
        box-shadow: none !important;
        outline: none !important;
    }

    #nav-sidebar .current-model td,
    #nav-sidebar .current-model td a,
    #nav-sidebar .current-model td a.addlink {
        background: linear-gradient(135deg, #ffd6cf 0%, #fff0eb 100%) !important;
    }

    html[data-theme="dark"] #nav-sidebar .current-model td,
    html[data-theme="dark"] #nav-sidebar .current-model td a,
    html[data-theme="dark"] #nav-sidebar .current-model td a.addlink {
        background: linear-gradient(135deg, rgba(255, 99, 71, 0.22) 0%, rgba(255, 127, 102, 0.12) 100%) !important;
    }

    @media (prefers-color-scheme: dark) {
        html[data-theme="auto"] #nav-sidebar .current-model td,
        html[data-theme="auto"] #nav-sidebar .current-model td a,
        html[data-theme="auto"] #nav-sidebar .current-model td a.addlink {
            background: linear-gradient(135deg, rgba(255, 99, 71, 0.22) 0%, rgba(255, 127, 102, 0.12) 100%) !important;
        }
    }

    #nav-sidebar .current-model th,
    #nav-sidebar .current-model th a,
    #nav-sidebar .current-model td,
    #nav-sidebar .current-model td a,
    #nav-sidebar .current-model td a.addlink {
        background: #f7d8d0 !important;
    }

    html[data-theme="dark"] #nav-sidebar .current-model th,
    html[data-theme="dark"] #nav-sidebar .current-model th a,
    html[data-theme="dark"] #nav-sidebar .current-model td,
    html[data-theme="dark"] #nav-sidebar .current-model td a,
    html[data-theme="dark"] #nav-sidebar .current-model td a.addlink {
        background: rgba(255, 99, 71, 0.18) !important;
    }

    @media (prefers-color-scheme: dark) {
        html[data-theme="auto"] #nav-sidebar .current-model th,
        html[data-theme="auto"] #nav-sidebar .current-model th a,
        html[data-theme="auto"] #nav-sidebar .current-model td,
        html[data-theme="auto"] #nav-sidebar .current-model td a,
        html[data-theme="auto"] #nav-sidebar .current-model td a.addlink {
            background: rgba(255, 99, 71, 0.18) !important;
        }
    }

    #nav-sidebar .current-model td a,
    #nav-sidebar .current-model td a.addlink {
        background-image: none !important;
        background-color: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        outline: 0 !important;
    }

    #nav-sidebar .current-model th,
    #nav-sidebar .current-model td {
        padding: 0 !important;
        vertical-align: middle !important;
    }

    #nav-sidebar .current-model th a,
    #nav-sidebar .current-model td a,
    #nav-sidebar .current-model td a.addlink {
        min-height: 42px !important;
        box-sizing: border-box !important;
        display: flex !important;
        align-items: center !important;
    }

    #nav-sidebar .current-model th a {
        padding: 8px 14px !important;
    }

    #nav-sidebar .current-model td a,
    #nav-sidebar .current-model td a.addlink {
        padding: 8px 10px !important;
        justify-content: center !important;
    }

    @media (prefers-color-scheme: dark) {
        html[data-theme="auto"] div.breadcrumbs {
            background: #3b1d19 !important;
        }
    }

    #header {
        padding-top: 6px !important;
        padding-bottom: 6px !important;
        min-height: auto !important;
    }

    .ts-brand-logo {
        width: 96px !important;
        height: 96px !important;
    }

    .ts-brand-link {
        gap: 10px !important;
    }

    .ts-brand-text {
        font-size: 0.95em !important;
    }

    #header {
        min-height: 88px !important;
        height: 88px !important;
        display: flex !important;
        align-items: center !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    #branding,
    #user-tools {
        display: flex !important;
        align-items: center !important;
        height: 100% !important;
    }




    /* Light mode selected sidebar row fix */
    html[data-theme="light"] #nav-sidebar .current-model th,
    html[data-theme="light"] #nav-sidebar .current-model td,
    html[data-theme="light"] #nav-sidebar .current-model th a,
    html[data-theme="light"] #nav-sidebar .current-model td a,
    html[data-theme="light"] #nav-sidebar .current-model td a.addlink,
    html[data-theme="light"] #nav-sidebar .current-model td a.addlink::after {
        background: #f7d8d0 !important;
    }

    html[data-theme="light"] #nav-sidebar .current-model td a,
    html[data-theme="light"] #nav-sidebar .current-model td a.addlink {
        box-shadow: none !important;
    }

    html[data-theme="light"] .module caption,
    html[data-theme="light"] .module caption a,
    html[data-theme="light"] .module .section,
    html[data-theme="light"] .module .section:link,
    html[data-theme="light"] .module .section:visited {
        color: #fff7f5 !important;
    }

    /* Keep sidebar last row visually single in dark and auto-dark */
    html[data-theme="dark"] #nav-sidebar tbody tr th,
    html[data-theme="dark"] #nav-sidebar tbody tr td {
        border-radius: 0 !important;
    }

    html[data-theme="dark"] #nav-sidebar tbody tr th a,
    html[data-theme="dark"] #nav-sidebar tbody tr td a,
    html[data-theme="dark"] #nav-sidebar tbody tr td a.addlink,
    html[data-theme="dark"] #nav-sidebar tbody tr td a.addlink::after {
        border-radius: 0 !important;
    }

    html[data-theme="dark"] #nav-sidebar tbody tr:last-child th {
        border-bottom-left-radius: 18px !important;
    }

    html[data-theme="dark"] #nav-sidebar tbody tr:last-child td {
        border-bottom-right-radius: 18px !important;
    }

    @media (prefers-color-scheme: dark) {
        html[data-theme="auto"] #nav-sidebar tbody tr th,
        html[data-theme="auto"] #nav-sidebar tbody tr td {
            border-radius: 0 !important;
        }

        html[data-theme="auto"] #nav-sidebar tbody tr th a,
        html[data-theme="auto"] #nav-sidebar tbody tr td a,
        html[data-theme="auto"] #nav-sidebar tbody tr td a.addlink,
        html[data-theme="auto"] #nav-sidebar tbody tr td a.addlink::after {
            border-radius: 0 !important;
        }

        html[data-theme="auto"] #nav-sidebar tbody tr:last-child th {
            border-bottom-left-radius: 18px !important;
        }

        html[data-theme="auto"] #nav-sidebar tbody tr:last-child td {
            border-bottom-right-radius: 18px !important;
        }
    }
