:root {
    color-scheme: light;
    --admin-forest: #17675d;
    --admin-deep: #123e3a;
    --admin-leaf: #278c79;
    --admin-paper: #f1f8f5;
    --admin-ink: #193d38;
    --admin-muted: #668078;
    --admin-line: rgba(23, 103, 93, .14);
    --admin-display: "Manrope", "Segoe UI", sans-serif;
    --admin-sans: "DM Sans", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    min-width: 320px;
    margin: 0;
    background:
        radial-gradient(ellipse at 92% 0, rgba(188, 234, 214, .42), transparent 32%),
        var(--admin-paper);
    color: var(--admin-ink);
    font-family: var(--admin-sans);
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(39, 140, 121, .35);
    outline-offset: 3px;
}

.auth-shell {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 32px 18px;
}

.auth-card {
    width: min(460px, 100%);
    padding: clamp(26px, 6vw, 44px);
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 26px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 24px 70px rgba(18, 62, 58, .12);
    backdrop-filter: blur(18px);
}

.setup-card {
    width: min(540px, 100%);
}

.admin-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 34px;
    color: var(--admin-deep);
    font-family: var(--admin-display);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -.04em;
}

.admin-brand-logo {
    display: block;
    width: clamp(112px, 30vw, 140px);
    height: auto;
}

.admin-brand > span:last-child {
    color: var(--admin-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
}

.eyebrow {
    display: block;
    margin-bottom: 10px;
    color: var(--admin-leaf);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.7px;
    text-transform: uppercase;
}

.auth-card h1,
.admin-heading h1 {
    margin: 0;
    color: var(--admin-deep);
    font-family: var(--admin-display);
    font-size: clamp(32px, 5vw, 46px);
    font-weight: 700;
    letter-spacing: -.065em;
    line-height: 1.05;
}

.auth-card h1 em,
.admin-heading h1 em {
    color: var(--admin-leaf);
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
}

.auth-description {
    margin: 14px 0 25px;
    color: var(--admin-muted);
    font-size: 14px;
    line-height: 1.7;
}

.form-stack,
.form-grid {
    display: grid;
    gap: 17px;
}

.form-stack label,
.form-grid label,
.topic-filter label,
.topic-form label,
.topic-row label {
    display: grid;
    gap: 8px;
    color: var(--admin-deep);
    font-size: 12px;
    font-weight: 700;
}

.form-stack input,
.form-stack textarea,
.form-grid input,
.topic-form input,
.topic-row input,
.topic-row select,
.topic-filter select {
    width: 100%;
    min-height: 45px;
    padding: 10px 12px;
    border: 1px solid var(--admin-line);
    border-radius: 11px;
    background: #fff;
    color: var(--admin-ink);
    font-size: 13px;
    font-weight: 500;
}

.form-stack textarea {
    min-height: 94px;
    resize: vertical;
    line-height: 1.6;
}

.form-grid textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px 12px;
    border: 1px solid var(--admin-line);
    border-radius: 11px;
    background: #fff;
    color: var(--admin-ink);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.6;
    resize: vertical;
}

.seo-share-preview {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    color: var(--admin-muted);
    font-size: 11px;
}

.seo-share-preview img {
    width: 100%;
    aspect-ratio: 1200 / 630;
    border: 1px solid var(--admin-line);
    border-radius: 12px;
    background: #e8f0ec;
    object-fit: cover;
}

.seo-image-field input[type="file"] {
    width: 100%;
    min-height: 43px;
    padding: 8px;
    border: 1px solid var(--admin-line);
    border-radius: 10px;
    background: #fff;
    color: var(--admin-ink);
    font-size: 12px;
}

.form-stack small,
.form-grid small,
.topic-form small {
    color: var(--admin-muted);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.55;
}

.button {
    display: inline-flex;
    min-height: 43px;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    background: var(--admin-forest);
    color: #fff;
}

.button-primary:hover {
    background: var(--admin-deep);
}

.button-outline {
    border-color: var(--admin-line);
    background: #fff;
    color: var(--admin-forest);
}

.button-outline:hover,
.button-quiet:hover {
    border-color: var(--admin-leaf);
    background: #eff8f4;
}

.button-danger {
    background: #a63c35;
    color: #fff;
}

.button-danger:hover {
    background: #812c27;
}

.button-quiet {
    border-color: transparent;
    background: transparent;
    color: var(--admin-muted);
}

.auth-card > .text-link {
    display: inline-block;
    margin-top: 22px;
    color: var(--admin-forest);
    font-size: 12px;
    font-weight: 700;
}

.notice {
    margin: 18px 0;
    padding: 13px 15px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 12px;
    line-height: 1.6;
}

.notice-error {
    border-color: rgba(168, 61, 50, .18);
    background: #fff1ef;
    color: #8e342b;
}

.notice-success {
    border-color: rgba(39, 140, 121, .2);
    background: #eaf8f1;
    color: var(--admin-deep);
}

.notice-info {
    border-color: rgba(39, 140, 121, .16);
    background: #eef8f3;
    color: #375f54;
}

.notice code,
.folder-instruction code,
.topic-folder code {
    overflow-wrap: anywhere;
    padding: 2px 5px;
    border-radius: 5px;
    background: rgba(23, 103, 93, .08);
    font-family: Consolas, monospace;
    font-size: .95em;
}

.admin-header {
    position: sticky;
    z-index: 10;
    top: 0;
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0 max(24px, calc((100vw - 1280px) / 2));
    border-bottom: 1px solid var(--admin-line);
    background: rgba(248, 252, 249, .9);
    backdrop-filter: blur(18px);
}

.admin-header .admin-brand {
    flex: 0 0 auto;
    margin: 0;
}

.admin-nav,
.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-nav a {
    padding: 10px 12px;
    border-radius: 999px;
    color: var(--admin-muted);
    font-size: 12px;
    font-weight: 700;
}

.admin-nav a:hover {
    background: #eaf4ef;
    color: var(--admin-forest);
}

.admin-header-actions form {
    margin: 0;
}

.admin-main {
    width: min(1100px, calc(100% - 40px));
    margin: 0 auto;
    padding: 66px 0 44px;
}

.admin-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 34px;
}

.admin-heading h1 {
    font-size: clamp(38px, 5vw, 56px);
}

.admin-heading p {
    max-width: 540px;
    margin: 14px 0 0;
    color: var(--admin-muted);
    font-size: 14px;
    line-height: 1.7;
}

.admin-secure-badge {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 9px;
    padding: 10px 13px;
    border: 1px solid var(--admin-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .66);
    color: var(--admin-muted);
    font-size: 10px;
    font-weight: 700;
}

.admin-secure-badge span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #51a879;
    box-shadow: 0 0 0 4px rgba(81, 168, 121, .12);
}

.admin-panel {
    margin: 18px 0;
    padding: clamp(20px, 4vw, 32px);
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 22px;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 14px 44px rgba(18, 62, 58, .055);
    scroll-margin-top: 100px;
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.panel-heading > div:first-child {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.panel-number {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 12px;
    background: #eaf5ef;
    color: var(--admin-forest);
    font-family: var(--admin-display);
    font-size: 11px;
    font-weight: 800;
}

.panel-heading h2 {
    margin: 0;
    color: var(--admin-deep);
    font-family: var(--admin-display);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -.04em;
}

.panel-heading p {
    margin: 6px 0 0;
    color: var(--admin-muted);
    font-size: 12px;
    line-height: 1.6;
}

.form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px;
}

.field-full {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: end;
}

.topic-manager {
    display: grid;
    gap: 22px;
}

.topic-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 15px;
    padding: 18px;
    border: 1px solid var(--admin-line);
    border-radius: 16px;
    background: #f8fbf9;
}

.topic-list {
    display: grid;
    gap: 10px;
}

.topic-row {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) 92px 130px auto;
    align-items: end;
    gap: 12px;
    padding: 15px;
    border: 1px solid var(--admin-line);
    border-radius: 15px;
    background: #fff;
}

.topic-row .order-field input {
    min-height: 41px;
}

.topic-row .status-field select {
    min-height: 41px;
}

.topic-edit-link {
    grid-column: 1 / 3;
    justify-self: start;
    color: var(--admin-forest);
    font-size: 11px;
    font-weight: 700;
}

.topic-edit-link span {
    margin-left: 4px;
}

.topic-folder {
    grid-column: 3 / 5;
    align-self: center;
    color: var(--admin-muted);
    font-size: 10px;
}

.panel-heading-split {
    align-items: center;
}

.topic-filter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topic-filter label {
    white-space: nowrap;
}

.topic-filter select {
    width: auto;
    min-width: 180px;
}

.topic-filter .button {
    flex: 0 0 auto;
}

.folder-instruction {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #eff8f3;
    color: var(--admin-muted);
    font-size: 11px;
}

.folder-instruction strong {
    color: var(--admin-deep);
}

.upload-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(150px, .75fr) minmax(190px, 1fr) auto;
    align-items: end;
    gap: 12px;
    margin-bottom: 20px;
    padding: 18px;
    border: 1px solid var(--admin-line);
    border-radius: 16px;
    background: #f8fbf9;
}

.upload-form label,
.slide-edit-form .upload-image-field {
    display: grid;
    gap: 8px;
    color: var(--admin-deep);
    font-size: 11px;
    font-weight: 700;
}

.upload-form input[type="text"],
.upload-form input[type="file"],
.slide-replace-form input[type="file"] {
    width: 100%;
    min-height: 43px;
    padding: 9px 10px;
    border: 1px solid var(--admin-line);
    border-radius: 10px;
    background: #fff;
    color: var(--admin-ink);
    font-size: 11px;
    font-weight: 500;
}

.upload-form input[type="file"],
.slide-replace-form input[type="file"] {
    padding: 7px;
}

.slide-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.slide-editor {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--admin-line);
    border-radius: 15px;
    background: #fff;
}

.slide-preview {
    width: 100%;
    aspect-ratio: 1.6;
    border-radius: 10px;
    background: #e8f0ec;
    object-fit: cover;
}

.slide-file {
    overflow: hidden;
    margin: 10px 2px 14px;
    color: var(--admin-muted);
    font-family: Consolas, monospace;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.slide-editor .form-stack {
    gap: 12px;
}

.slide-editor .slide-edit-form > label {
    font-size: 11px;
}

.slide-replace-form {
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--admin-line);
}

.slide-replace-form .button,
.slide-edit-form .button {
    justify-self: start;
}

.delete-slide-form {
    display: grid;
    gap: 10px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--admin-line);
}

.delete-slide-form label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--admin-muted);
    font-size: 10px;
    line-height: 1.5;
}

.delete-slide-form .delete-fallback-confirm.is-enhanced {
    display: none;
}

.delete-slide-form input[type="checkbox"] {
    flex: 0 0 auto;
    margin: 1px 0 0;
    accent-color: var(--admin-forest);
}

.delete-slide-form .button {
    justify-self: start;
}

dialog.delete-confirm-dialog {
    width: min(440px, calc(100% - 32px));
    max-width: none;
    max-height: min(90vh, 620px);
    padding: 0;
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 26px;
    background: transparent;
    box-shadow: 0 32px 100px rgba(5, 30, 25, .3);
    color: var(--admin-ink);
}

dialog.delete-confirm-dialog[open] {
    animation: delete-dialog-enter .24s cubic-bezier(.2, .8, .2, 1) both;
}

dialog.delete-confirm-dialog::backdrop {
    background: rgba(8, 29, 26, .58);
    backdrop-filter: blur(7px);
    animation: delete-backdrop-enter .2s ease both;
}

.delete-dialog-card {
    position: relative;
    padding: 32px;
    background:
        radial-gradient(ellipse at 50% 0, rgba(255, 232, 214, .88), transparent 46%),
        linear-gradient(160deg, #fff 0%, #f8fbf9 100%);
    text-align: center;
}

.delete-dialog-icon {
    display: grid;
    width: 76px;
    height: 76px;
    place-items: center;
    margin: 0 auto 19px;
    border: 1px solid rgba(177, 69, 54, .12);
    border-radius: 25px;
    background: linear-gradient(145deg, #fff1eb, #ffe2d8);
    box-shadow: 0 12px 28px rgba(166, 60, 53, .12);
    color: #a63c35;
}

.delete-dialog-icon svg {
    width: 34px;
    height: 34px;
}

.delete-dialog-step {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
    color: #a64c3c;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.delete-dialog-step::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d7785e;
    box-shadow: 0 0 0 4px rgba(215, 120, 94, .13);
    content: "";
}

.delete-dialog-card h2 {
    margin: 0;
    color: var(--admin-deep);
    font-family: var(--admin-display);
    font-size: 24px;
    letter-spacing: -.055em;
}

.delete-dialog-card p {
    margin: 12px 0 0;
    color: var(--admin-muted);
    font-size: 13px;
    line-height: 1.7;
}

.delete-dialog-filename {
    display: block;
    margin-top: 12px;
    overflow-wrap: anywhere;
    color: var(--admin-deep);
    font-size: 12px;
    font-weight: 800;
}

.delete-dialog-warning {
    margin-top: 18px;
    padding: 11px 13px;
    border: 1px solid rgba(166, 60, 53, .11);
    border-radius: 12px;
    background: rgba(255, 241, 237, .72);
    color: #8e4237;
    font-size: 11px;
    line-height: 1.55;
    text-align: left;
}

.delete-dialog-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 23px;
}

.delete-dialog-actions .button {
    min-width: 128px;
}

.delete-dialog-cancel {
    border-color: var(--admin-line);
    background: #fff;
    color: var(--admin-deep);
}

.delete-dialog-cancel:hover {
    background: #eef5f1;
}

@keyframes delete-dialog-enter {
    from { opacity: 0; transform: translateY(12px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes delete-backdrop-enter {
    from { opacity: 0; }
    to { opacity: 1; }
}

.empty-state {
    padding: 25px;
    border: 1px dashed rgba(23, 103, 93, .24);
    border-radius: 14px;
    color: var(--admin-muted);
    font-size: 13px;
    line-height: 1.7;
    text-align: center;
}

.account-panel {
    margin-top: 26px;
}

.password-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 4px;
    color: var(--admin-muted);
    font-size: 10px;
}

@media (max-width: 900px) {
    .admin-header {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 18px;
        padding: 12px 20px;
    }

    .admin-header .admin-brand {
        margin-right: auto;
    }

    .admin-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        border-top: 1px solid var(--admin-line);
        padding-top: 7px;
    }

    .admin-header-actions {
        margin-left: auto;
    }

    .slide-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .upload-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .password-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .auth-card {
        border-radius: 20px;
    }

    .admin-header {
        gap: 6px 10px;
        padding: 10px 14px;
    }

    .admin-header .admin-brand {
        font-size: 13px;
    }

    .admin-header-actions {
        gap: 3px;
    }

    .admin-header-actions .button {
        min-height: 37px;
        padding: 0 10px;
        font-size: 10px;
    }

    .admin-nav {
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 0;
    }

    .admin-nav a {
        padding: 8px 9px;
        font-size: 10px;
    }

    .admin-main {
        width: min(100% - 26px, 560px);
        padding-top: 40px;
    }

    .admin-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
        margin-bottom: 24px;
    }

    .admin-secure-badge {
        font-size: 9px;
    }

    .admin-panel {
        padding: 18px 15px;
        border-radius: 17px;
    }

    .panel-heading-split {
        align-items: flex-start;
        flex-direction: column;
    }

    .topic-filter {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .topic-filter select {
        width: 100%;
    }

    .form-grid,
    .password-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .seo-share-preview {
        grid-template-columns: minmax(0, 1fr);
    }

    .field-full {
        grid-column: auto;
    }

    .topic-form {
        grid-template-columns: minmax(0, 1fr);
        padding: 14px;
    }

    .topic-row {
        grid-template-columns: minmax(0, 1fr) 83px;
        gap: 10px;
        padding: 12px;
    }

    .topic-row .status-field {
        grid-column: 1;
        grid-row: 2;
    }

    .topic-row > .button {
        grid-column: 2;
        grid-row: 2;
    }

    .topic-edit-link {
        grid-column: 1 / -1;
    }

    .topic-folder {
        grid-column: 1 / -1;
    }

    .slide-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .delete-dialog-card {
        padding: 27px 21px;
    }

    .delete-dialog-actions {
        flex-direction: column-reverse;
    }

    .delete-dialog-actions .button {
        width: 100%;
    }

    .upload-form {
        grid-template-columns: 1fr;
    }

    .admin-footer {
        flex-direction: column;
        gap: 7px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

.theme-toggle {
    display: inline-grid;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--admin-line);
    border-radius: 50%;
    background: rgba(255, 255, 255, .72);
    color: var(--admin-forest);
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    background: #eaf4ef;
}

.theme-toggle .theme-icon {
    width: 18px;
    height: 18px;
}

.theme-icon-moon {
    display: none;
}

.auth-card {
    position: relative;
}

.auth-theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --admin-forest: #8ed1bb;
    --admin-deep: #dcebe3;
    --admin-leaf: #82c9ad;
    --admin-paper: #111a17;
    --admin-ink: #e2ece6;
    --admin-muted: #a4b8ad;
    --admin-line: rgba(184, 218, 198, .15);
}

:root[data-theme="dark"] body {
    background:
        radial-gradient(ellipse at 92% 0, rgba(62, 112, 88, .18), transparent 34%),
        var(--admin-paper);
    color: var(--admin-ink);
}

:root[data-theme="dark"] .theme-icon-sun {
    display: none;
}

:root[data-theme="dark"] .theme-icon-moon {
    display: block;
}

:root[data-theme="dark"] .theme-toggle,
:root[data-theme="dark"] .delete-dialog-cancel {
    border-color: var(--admin-line);
    background: #1d2b25;
    color: #d7eee1;
}

:root[data-theme="dark"] .theme-toggle:hover,
:root[data-theme="dark"] .delete-dialog-cancel:hover {
    background: #293d33;
}

:root[data-theme="dark"] .auth-card,
:root[data-theme="dark"] .admin-panel {
    border-color: rgba(184, 218, 198, .12);
    background: rgba(25, 37, 32, .94);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .22);
}

:root[data-theme="dark"] .admin-header {
    border-bottom-color: var(--admin-line);
    background: rgba(17, 26, 23, .94);
}

:root[data-theme="dark"] .admin-nav a:hover {
    background: #25372e;
    color: #c7e9d7;
}

:root[data-theme="dark"] .admin-secure-badge {
    border-color: var(--admin-line);
    background: rgba(31, 47, 39, .82);
}

:root[data-theme="dark"] .panel-number {
    background: #263b30;
    color: #b6e2ca;
}

:root[data-theme="dark"] .form-stack input,
:root[data-theme="dark"] .form-stack textarea,
:root[data-theme="dark"] .form-grid input,
:root[data-theme="dark"] .form-grid textarea,
:root[data-theme="dark"] .topic-form input,
:root[data-theme="dark"] .topic-row input,
:root[data-theme="dark"] .topic-row select,
:root[data-theme="dark"] .topic-filter select,
:root[data-theme="dark"] .seo-image-field input[type="file"],
:root[data-theme="dark"] .upload-form input[type="text"],
:root[data-theme="dark"] .upload-form input[type="file"],
:root[data-theme="dark"] .slide-replace-form input[type="file"] {
    border-color: rgba(184, 218, 198, .16);
    background: #111a17;
    color: #e2ece6;
    color-scheme: dark;
}

:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder {
    color: #83988c;
}

:root[data-theme="dark"] .button-outline,
:root[data-theme="dark"] .button-quiet {
    border-color: var(--admin-line);
    background: #1b2a23;
    color: #c9e8d8;
}

:root[data-theme="dark"] .button-outline:hover,
:root[data-theme="dark"] .button-quiet:hover {
    border-color: #527b65;
    background: #263a30;
}

:root[data-theme="dark"] .button-primary {
    background: #367b65;
    color: #f0fff7;
}

:root[data-theme="dark"] .button-primary:hover {
    background: #438d73;
}

:root[data-theme="dark"] .button-danger {
    background: #a84740;
    color: #fff7f4;
}

:root[data-theme="dark"] .button-danger:hover {
    background: #bd554b;
}

:root[data-theme="dark"] .notice-error {
    border-color: rgba(233, 124, 109, .24);
    background: #3a2422;
    color: #ffc1b6;
}

:root[data-theme="dark"] .notice-success {
    border-color: rgba(117, 200, 154, .22);
    background: #1c3429;
    color: #c4edd4;
}

:root[data-theme="dark"] .notice-info,
:root[data-theme="dark"] .folder-instruction {
    border-color: rgba(135, 193, 159, .16);
    background: #1b3027;
    color: #b3cbbd;
}

:root[data-theme="dark"] .notice code,
:root[data-theme="dark"] .folder-instruction code,
:root[data-theme="dark"] .topic-folder code {
    background: rgba(151, 205, 169, .12);
    color: #d8ede0;
}

:root[data-theme="dark"] .topic-form,
:root[data-theme="dark"] .upload-form {
    border-color: var(--admin-line);
    background: #17241e;
}

:root[data-theme="dark"] .topic-row,
:root[data-theme="dark"] .slide-editor {
    border-color: var(--admin-line);
    background: #1a2821;
}

:root[data-theme="dark"] .slide-preview,
:root[data-theme="dark"] .seo-share-preview img {
    border-color: var(--admin-line);
    background: #25352d;
}

:root[data-theme="dark"] .delete-slide-form,
:root[data-theme="dark"] .slide-replace-form {
    border-top-color: var(--admin-line);
}

:root[data-theme="dark"] .delete-dialog-card {
    background:
        radial-gradient(ellipse at 50% 0, rgba(147, 84, 66, .22), transparent 46%),
        linear-gradient(160deg, #1d2923 0%, #151f1a 100%);
}

:root[data-theme="dark"] dialog.delete-confirm-dialog {
    border-color: rgba(184, 218, 198, .18);
}

:root[data-theme="dark"] .delete-dialog-icon {
    border-color: rgba(233, 124, 109, .2);
    background: linear-gradient(145deg, #4a2d28, #382521);
    color: #ffb6a8;
}

:root[data-theme="dark"] .delete-dialog-step {
    color: #ffb6a8;
}

:root[data-theme="dark"] .delete-dialog-card h2,
:root[data-theme="dark"] .delete-dialog-filename {
    color: #e2ece6;
}

:root[data-theme="dark"] .delete-dialog-warning {
    border-color: rgba(227, 117, 97, .2);
    background: rgba(88, 42, 36, .35);
    color: #ffc1b6;
}

:root[data-theme="dark"] .empty-state {
    border-color: rgba(184, 218, 198, .22);
    color: #a4b8ad;
}

:root[data-theme="dark"] .admin-brand-logo {
    filter: invert(1) hue-rotate(180deg) brightness(1.12);
}

:root[data-theme="dark"] .admin-footer {
    color: #90a69a;
}
