/* ---------------------------------------------------------------
   Panel admin — MA Muhammadiyah Plus Cisaat
---------------------------------------------------------------- */

:root {
    --green: #0b5a3c;
    --green-dark: #083f2a;
    --green-soft: #e8f0eb;
    --gold: #d9a404;
    --ink: #1d2b24;
    --muted: #647269;
    --line: #e0e4dd;
    --line-dark: #cfd6cd;
    --paper: #f4f5f1;
    --white: #ffffff;
    --danger: #b3261e;
    --danger-soft: #fdeceb;
    --radius: 3px;
}

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

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 14.5px;
    line-height: 1.6;
}

a {
    color: var(--green);
    text-decoration: none;
}

a:hover {
    color: var(--gold-dark, #a97d02);
}

h1, h2, h3, h4 {
    font-family: Georgia, "Times New Roman", serif;
    margin: 0 0 .5em;
    line-height: 1.25;
}

p {
    margin: 0 0 1em;
}

img {
    max-width: 100%;
}

button,
input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ---------------------------------------------------------------
   Kerangka
---------------------------------------------------------------- */

.admin-shell {
    display: grid;
    grid-template-columns: 238px minmax(0, 1fr);
    min-height: 100vh;
}

.admin-sidebar {
    background: var(--green-dark);
    color: #cfe0d5;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 18px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.admin-brand img {
    width: 40px;
    height: 38px;
    object-fit: contain;
    background: #fff;
    border-radius: 2px;
    padding: 2px;
}

.admin-brand strong {
    display: block;
    color: #fff;
    font-family: Georgia, serif;
    font-size: 14.5px;
    line-height: 1.2;
}

.admin-brand span {
    display: block;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: #9fb5a6;
    margin-top: 2px;
}

.admin-menu {
    list-style: none;
    margin: 0;
    padding: 12px 0;
    flex: 1;
}

.admin-menu-label {
    padding: 10px 20px 5px;
    font-size: 10.5px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #7f9a89;
}

.admin-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px;
    color: #cfe0d5;
    font-size: 13.5px;
    border-left: 3px solid transparent;
}

.admin-menu a:hover {
    background: rgba(255, 255, 255, .06);
    color: #fff;
}

.admin-menu a.is-active {
    background: rgba(255, 255, 255, .09);
    border-left-color: var(--gold);
    color: #fff;
    font-weight: 600;
}

.admin-sidebar-foot {
    border-top: 1px solid rgba(255, 255, 255, .12);
    padding: 14px 18px;
}

.admin-user {
    display: block;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-user-role {
    display: block;
    font-size: 11.5px;
    color: #9fb5a6;
    margin-bottom: 10px;
}

.admin-sidebar-foot form {
    margin: 0;
}

.admin-logout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, .25);
    background: transparent;
    color: #dfeae2;
    padding: 6px 12px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 12.5px;
}

.admin-logout:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--green-dark);
}

.admin-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 14px 28px;
    flex-wrap: wrap;
}

.admin-topbar h1 {
    margin: 0;
    font-size: 21px;
}

.admin-topbar p {
    margin: 2px 0 0;
    font-size: 12.5px;
    color: var(--muted);
}

.admin-topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-content {
    padding: 24px 28px 48px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
}

.breadcrumb a {
    color: var(--muted);
}

.breadcrumb a:hover {
    color: var(--green);
}

/* ---------------------------------------------------------------
   Komponen
---------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid var(--green);
    background: var(--green);
    color: #fff;
    padding: 8px 16px;
    font-size: 13.5px;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
}

.btn:hover {
    background: var(--green-dark);
    border-color: var(--green-dark);
    color: #fff;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12.5px;
}

.btn-outline {
    background: var(--white);
    color: var(--ink);
    border-color: var(--line-dark);
}

.btn-outline:hover {
    background: var(--green-soft);
    border-color: var(--green);
    color: var(--green-dark);
}

.btn-gold {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--green-dark);
}

.btn-gold:hover {
    background: #a97d02;
    border-color: #a97d02;
    color: #fff;
}

.btn-danger {
    background: var(--white);
    border-color: #e3c4c1;
    color: var(--danger);
}

.btn-danger:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

.btn-link {
    border: 0;
    background: none;
    color: var(--green);
    padding: 0;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

.btn-link:hover {
    text-decoration: underline;
}

.alert {
    border: 1px solid var(--line-dark);
    border-left: 4px solid var(--green);
    background: var(--white);
    border-radius: var(--radius);
    padding: 11px 16px;
    margin-bottom: 18px;
    font-size: 13.5px;
}

.alert-success {
    background: #eef6f0;
    border-color: #c6ddcd;
    border-left-color: var(--green);
    color: #135035;
}

.alert-error {
    background: var(--danger-soft);
    border-color: #eccfcc;
    border-left-color: var(--danger);
    color: #7a1a16;
}

.alert-error ul {
    margin: 6px 0 0;
    padding-left: 18px;
}

.alert-error li {
    margin-bottom: 2px;
}

.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 22px;
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}

.card-head h2 {
    margin: 0;
    font-size: 16.5px;
}

.card-body {
    padding: 18px 20px;
}

.card-body > :last-child {
    margin-bottom: 0;
}

/* Statistik dashboard */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    display: block;
    background: var(--white);
    border: 1px solid var(--line);
    border-left: 4px solid var(--green);
    border-radius: var(--radius);
    padding: 16px 18px;
    color: var(--ink);
}

.stat-card:hover {
    border-left-color: var(--gold);
    color: var(--ink);
}

.stat-card strong {
    display: block;
    font-family: Georgia, serif;
    font-size: 27px;
    line-height: 1.1;
    color: var(--green);
}

.stat-card span {
    display: block;
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .7px;
    margin-top: 4px;
}

.dash-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

/* Tabel */

.table-wrap {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.table th,
.table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.table th {
    background: #f0f2ed;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .7px;
    color: var(--muted);
    font-weight: 700;
    white-space: nowrap;
}

.table tbody tr:last-child td {
    border-bottom: 0;
}

.table tbody tr:hover td {
    background: #fafbf8;
}

.table .cell-title {
    font-weight: 600;
    color: var(--ink);
    max-width: 380px;
}

.table .cell-title:hover {
    color: var(--green);
}

.table .cell-muted {
    color: var(--muted);
    font-size: 12.5px;
}

.table-thumb {
    width: 58px;
    height: 42px;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid var(--line);
    background: var(--green-soft);
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .4px;
    padding: 2px 8px;
    border-radius: 20px;
    background: #eef0ea;
    color: var(--muted);
    text-transform: uppercase;
}

.pill-live {
    background: #e3f1e7;
    color: #155c3c;
}

.pill-draft {
    background: #f6ecd6;
    color: #7c5a05;
}

.filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Formulir */

.form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 22px;
    align-items: start;
}

.form-grid-main .card:last-child {
    margin-bottom: 0;
}

.field {
    margin-bottom: 16px;
}

.field:last-child {
    margin-bottom: 0;
}

.field label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #3a4a41;
}

.field .hint {
    display: block;
    font-size: 11.8px;
    color: var(--muted);
    margin-top: 4px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="url"],
.field input[type="number"],
.field input[type="datetime-local"],
.field input[type="file"],
.field select,
.field textarea {
    width: 100%;
    border: 1px solid var(--line-dark);
    border-radius: var(--radius);
    background: var(--white);
    padding: 8px 11px;
    font-size: 13.8px;
    color: var(--ink);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: 2px solid var(--green-soft);
    border-color: var(--green);
}

.field textarea {
    resize: vertical;
    line-height: 1.6;
}

.field textarea.code {
    font-family: Consolas, "Courier New", monospace;
    font-size: 12.8px;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    margin-bottom: 10px;
    font-weight: 600;
    color: #3a4a41;
}

.check:last-child {
    margin-bottom: 0;
}

.check input {
    width: 16px;
    height: 16px;
    accent-color: var(--green);
}

.image-preview {
    border: 1px dashed var(--line-dark);
    border-radius: var(--radius);
    padding: 8px;
    margin-bottom: 10px;
    background: #fafbf8;
}

.image-preview img {
    display: block;
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 2px;
}

.image-preview span {
    display: block;
    font-size: 11.5px;
    color: var(--muted);
    margin-top: 6px;
    word-break: break-all;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 6px;
    flex-wrap: wrap;
}

.required {
    color: var(--danger);
}

/* Login */

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--green-dark);
    padding: 24px;
}

.login-box {
    width: 100%;
    max-width: 380px;
    background: var(--white);
    border-radius: var(--radius);
    border-top: 4px solid var(--gold);
    padding: 30px 32px 28px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, .28);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.login-brand img {
    width: 46px;
    height: 44px;
    object-fit: contain;
}

.login-brand strong {
    display: block;
    font-family: Georgia, serif;
    font-size: 15.5px;
    line-height: 1.2;
    color: var(--ink);
}

.login-brand span {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--muted);
    margin-top: 2px;
}

.login-box h1 {
    font-size: 20px;
    margin-bottom: 4px;
}

.login-box .login-sub {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 20px;
}

.login-box .btn {
    width: 100%;
    padding: 10px;
    margin-top: 4px;
}

.login-back {
    display: block;
    text-align: center;
    font-size: 12.5px;
    color: var(--muted);
    margin-top: 16px;
}

.login-back:hover {
    color: var(--green);
}

/* Kosong */

.empty-state {
    color: var(--muted);
    font-size: 13.5px;
    padding: 22px 4px;
    margin: 0;
}

/* Pagination */

.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 9px;
    border: 1px solid var(--line-dark);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--ink);
    font-size: 12.5px;
}

a.page-link:hover {
    border-color: var(--green);
    color: var(--green);
}

.page-link.is-current {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}

.page-link.is-disabled {
    color: #aab4ac;
    background: #f2f3ef;
}

/* Pengaturan */

.setting-group + .setting-group {
    margin-top: 22px;
}

.setting-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 18px;
}

.setting-grid .field {
    margin-bottom: 0;
}

.setting-grid .field-wide {
    grid-column: 1 / -1;
}

@media (max-width: 1080px) {
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .dash-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
        height: auto;
    }

    .admin-menu {
        display: flex;
        flex-wrap: wrap;
        padding: 8px;
    }

    .admin-menu-label {
        display: none;
    }

    .admin-menu a {
        border-left: 0;
        border-bottom: 3px solid transparent;
        padding: 8px 12px;
    }

    .admin-menu a.is-active {
        border-left: 0;
        border-bottom-color: var(--gold);
    }

    .admin-sidebar-foot {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .admin-user-role {
        margin-bottom: 0;
    }

    .admin-content {
        padding: 18px 16px 36px;
    }

    .admin-topbar {
        padding: 12px 16px;
    }

    .setting-grid {
        grid-template-columns: 1fr;
    }

    .field-row {
        grid-template-columns: 1fr;
    }

    .stat-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Pengaturan logo, warna, dan pratinjau */

.image-setting-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.image-setting-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 90px;
    background: #fafbf8;
    border: 1px dashed var(--line-dark);
    border-radius: var(--radius);
    padding: 8px;
    flex-shrink: 0;
}

.image-setting-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.image-setting-preview.is-icon {
    width: 90px;
    height: 90px;
}

.image-setting-preview.is-icon img {
    width: 48px;
    height: 48px;
}

.image-setting-empty {
    font-size: 11.5px;
    color: var(--muted);
}

.image-setting-input {
    flex: 1;
    min-width: 220px;
}

.image-setting-input input[type="file"] {
    width: 100%;
    border: 1px solid var(--line-dark);
    border-radius: var(--radius);
    background: var(--white);
    padding: 8px 11px;
    font-size: 13.5px;
}

.color-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-input input[type="color"] {
    width: 52px;
    height: 38px;
    padding: 2px;
    border: 1px solid var(--line-dark);
    border-radius: var(--radius);
    background: var(--white);
    cursor: pointer;
}

.color-value {
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    color: var(--ink);
    background: #f7f8f4;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 5px 10px;
    min-width: 90px;
    text-align: center;
}

.color-preview {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 20px;
    background: #f6f5f0;
    max-width: 640px;
}

.pv-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--pv-dark, #083f2a);
    padding: 9px 14px;
    color: #fff;
    font-size: 12px;
}

.pv-brand {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 600;
}

.pv-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--pv-gold, #d9a404);
    display: inline-block;
}

.pv-cta {
    background: var(--pv-gold, #d9a404);
    color: var(--pv-dark, #083f2a);
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 2px;
}

.pv-nav {
    display: flex;
    gap: 2px;
    background: var(--pv-primary, #0b5a3c);
    border-bottom: 2px solid var(--pv-gold, #d9a404);
    padding: 0 10px;
    font-size: 10.5px;
    letter-spacing: .4px;
    text-transform: uppercase;
}

.pv-nav span {
    padding: 7px 9px;
    color: #dfeee5;
}

.pv-nav .pv-nav-active {
    background: var(--pv-dark, #083f2a);
    color: #fff;
    font-weight: 700;
}

.pv-body {
    padding: 14px;
}

.pv-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 2px;
    padding: 12px 14px;
}

.pv-badge {
    display: inline-block;
    border-left: 3px solid var(--pv-gold, #d9a404);
    background: #eef2ee;
    color: var(--pv-primary, #0b5a3c);
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    padding: 2px 7px;
    margin-bottom: 6px;
}

.pv-card strong {
    display: block;
    font-family: Georgia, serif;
    font-size: 14px;
    margin-bottom: 3px;
}

.pv-card p {
    margin: 0 0 9px;
    font-size: 11.5px;
    color: #647269;
}

.pv-btn {
    display: inline-block;
    background: var(--pv-primary, #0b5a3c);
    color: #fff;
    font-size: 10.5px;
    font-weight: 600;
    padding: 4px 11px;
    border-radius: 2px;
}

/* Pengguna & Profil */

.admin-profile-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    padding: 2px 0 12px;
}

.admin-profile-link:hover .admin-user {
    color: var(--gold);
}

.admin-profile-link > span:last-child {
    min-width: 0;
}

.admin-profile-link .admin-user {
    margin-bottom: 1px;
}

.admin-profile-link .admin-user-role {
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 165px;
}

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--green-soft);
    color: var(--green);
    border: 2px solid rgba(255, 255, 255, .18);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    line-height: 1;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.avatar-sm {
    width: 28px;
    height: 28px;
    font-size: 10.5px;
}

.avatar-md {
    width: 38px;
    height: 38px;
}

.avatar-lg {
    width: 96px;
    height: 96px;
    font-size: 28px;
    border-color: var(--line);
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 11px;
}

.user-cell .avatar {
    border-color: var(--line);
}

.profile-photo-preview {
    display: flex;
    justify-content: center;
    padding: 8px 0 14px;
}

.profile-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--line);
    font-size: 13px;
}

.profile-meta:last-of-type {
    border-bottom: 0;
}

.profile-meta span {
    color: var(--muted);
}

.profile-meta strong {
    color: var(--ink);
    font-weight: 600;
    text-align: right;
}

/* Editor teks kaya */

.rte {
    position: relative;
    border: 1px solid var(--line-dark);
    border-radius: 3px;
    background: #fff;
}

.rte-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 7px 8px;
    background: #f4f6f1;
    border-bottom: 1px solid var(--line);
    border-radius: 3px 3px 0 0;
}

.rte-toolbar button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 30px;
    height: 30px;
    padding: 0 7px;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 2px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    color: #2f3d35;
    line-height: 1;
}

.rte-toolbar button:hover {
    background: #e6ebe2;
    border-color: #d5dcd0;
}

.rte-toolbar button.is-active {
    background: var(--green-soft);
    border-color: var(--green);
    color: var(--green-dark);
}

.rte .rte-select {
    width: auto;
    height: 30px;
    margin: 0;
    padding: 0 27px 0 10px;
    border: 1px solid #d3dbcf;
    border-radius: 4px;
    background-color: #fff;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2364766b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 9px center;
    background-size: 9px 6px;
    color: #2f3d35;
    font-family: inherit;
    font-size: 12.5px;
    line-height: 28px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.rte .rte-select:hover {
    border-color: #b8c3b2;
}

.rte .rte-select:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(11, 90, 60, .12);
}

.rte [data-rte-font] {
    min-width: 138px;
}

.rte [data-rte-size] {
    min-width: 92px;
}

.rte-sep {
    width: 1px;
    height: 20px;
    background: #d5dcd0;
    margin: 0 3px;
}

.rte-btn-text {
    font-size: 12.5px;
}

.rte-status {
    margin-left: auto;
    font-size: 12px;
    color: var(--muted);
}

.rte-status.is-error {
    color: var(--danger);
}

.rte-canvas {
    min-height: 360px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 16px 18px;
    outline: none;
    font-size: 15px;
    line-height: 1.75;
    color: var(--ink);
}

.rte-canvas:focus {
    box-shadow: inset 0 0 0 2px rgba(11, 90, 60, .12);
}

.rte-canvas p {
    margin: 0 0 1em;
}

.rte-canvas h2 {
    font-size: 21px;
    margin: 1.2em 0 .5em;
}

.rte-canvas h3 {
    font-size: 17.5px;
    margin: 1.1em 0 .4em;
}

.rte-canvas img {
    max-width: 100%;
    height: auto;
    border-radius: 2px;
    margin: 10px 0;
}

.rte-canvas figure {
    margin: 12px 0;
}

.rte-canvas figcaption {
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    margin-top: 4px;
}

.rte-canvas table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}

.rte-canvas th,
.rte-canvas td {
    border: 1px solid #c9d0c6;
    padding: 7px 9px;
    text-align: left;
    vertical-align: top;
}

.rte-canvas th {
    background: var(--green-soft);
    color: var(--green-dark);
}

.rte-canvas ul,
.rte-canvas ol {
    margin: 0 0 1em 1.4em;
}

.rte-canvas blockquote {
    margin: 12px 0;
    padding: 8px 14px;
    border-left: 3px solid var(--gold);
    background: var(--paper);
}

.rte-popover {
    position: absolute;
    top: 46px;
    right: 10px;
    z-index: 30;
    display: grid;
    gap: 10px;
    min-width: 210px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--line-dark);
    border-radius: 3px;
    box-shadow: 0 10px 26px rgba(20, 40, 28, .14);
}

.rte-popover[hidden] {
    display: none;
}

.rte-popover strong {
    font-size: 13px;
}

.rte-popover-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rte-popover-row label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--muted);
}

.rte-popover-row input {
    width: 58px;
    padding: 5px 6px;
    border: 1px solid var(--line-dark);
    border-radius: 2px;
    font-family: inherit;
    font-size: 13px;
}

@media (max-width: 720px) {
    .rte-btn-text {
        display: none;
    }
}

/* Backup & Restore */

.backup-file {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.8px;
    font-family: Consolas, "Courier New", monospace;
    color: var(--ink);
    word-break: break-all;
}

.backup-file svg {
    color: var(--green);
    flex-shrink: 0;
}

.note-warning {
    background: #fff8e8;
    border: 1px solid #efd9a6;
    border-left: 3px solid var(--gold);
    border-radius: 3px;
    color: #6b4e12;
    font-size: 12.5px;
    line-height: 1.55;
    padding: 10px 12px;
    margin-bottom: 14px;
}

.note-warning strong {
    color: #543c08;
}
