* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #ffffff;
    color: #222;
}

.admin-logout-form {
    margin: 0;
}

.admin-sidebar-link-button {
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    padding: 0;
    font: inherit;
    cursor: pointer;
}

.drag-handle-cell {
    width: 180px;
}

.page-order-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.page-home-form {
    margin: 0;
}

.page-menu-form {
    margin: 0;
}

.drag-handle {
    border: 0;
    background: #eef4fb;
    color: #2a6ebb;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: grab;
    font-weight: 700;
}

tr.is-dragging {
    opacity: .45;
}

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

.admin-shell,
.login-shell {
    min-height: 100vh;
}

.admin-header,
.login-header {
    background: #fff;
    border-bottom: 1px solid #ececec;
}

.admin-header {
    position: sticky;
    top: 0;
    z-index: 50;
}

.login-header {
    position: relative;
}

.admin-wrap,
.login-wrap {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 20px;
}

.admin-header-inner,
.login-header-inner {
    min-height: 96px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.admin-brand,
.login-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-brand img {
    height: 46px;
    width: auto;
    display: block;
    flex: 0 0 auto;
}

.login-brand img {
    height: 52px;
    width: auto;
    display: block;
}

.admin-brand-text h1,
.login-brand-text h1 {
    margin: 0 0 4px;
    font-size: 1.8rem;
    line-height: 1.1;
}

.admin-brand-text p,
.login-brand-text p {
    margin: 0;
    color: #666;
    font-size: .98rem;
}

.admin-top-links {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-top-link,
.login-top-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #d9d9d9;
    background: #fff;
    color: #333;
    font-size: .95rem;
    font-weight: 600;
    transition: all .2s ease;
}

.admin-top-link:hover,
.login-top-link:hover {
    background: #f6f6f6;
}

.admin-top-link.primary {
    border-color: #2a6ebb;
    color: #2a6ebb;
}

.admin-top-link.primary:hover {
    background: #2a6ebb;
    color: #fff;
}

.admin-main {
    padding: 38px 0 60px;
}

.admin-hero {
    margin-bottom: 24px;
}

.admin-hero h2 {
    margin: 0 0 8px;
    font-size: 2.5rem;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.admin-hero p {
    margin: 0;
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
}

.admin-card,
.form-card,
.stat-card,
.admin-section,
.login-card {
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 18px;
    background: #fff;
    padding: 24px;
}

.admin-card {
    transition: all .2s ease;
}

.admin-card:hover {
    box-shadow: 0 6px 18px rgba(0,0,0,.08);
    transform: translateY(-1px);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.stat-label,
.admin-card-kicker,
.login-kicker {
    margin: 0 0 10px;
    font-size: .82rem;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #6a6a6a;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-note {
    color: #666;
    font-size: .95rem;
    line-height: 1.5;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-bottom: 32px;
}

.admin-card {
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.admin-card h3 {
    margin: 0 0 10px;
    font-size: 1.45rem;
    line-height: 1.22;
    font-weight: 700;
    color: #111;
}

.admin-card p {
    margin: 0 0 16px;
    font-size: .98rem;
    line-height: 1.6;
    color: #555;
}

.admin-card-actions,
.actions,
.login-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.admin-btn,
.btn,
.login-btn,
.btn-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 8px;
    background: #2a6ebb;
    color: #fff;
    border: 0;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
}

.admin-btn:hover,
.btn:hover,
.login-btn:hover,
.btn-small:hover {
    background: #1e4f86;
    color: #fff;
}

.btn-small {
    padding: 7px 11px;
    font-size: .88rem;
}

.admin-btn.secondary,
.btn-secondary,
.btn-small.secondary {
    background: #f3f6fb;
    color: #2a6ebb;
    border: 1px solid rgba(42,110,187,.18);
}

.admin-btn.secondary:hover,
.btn-secondary:hover,
.btn-small.secondary:hover {
    background: #e9f0fa;
    color: #2a6ebb;
}

.admin-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.admin-section-head h3 {
    margin: 0;
    font-size: 1.35rem;
}

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 14px 10px;
    border-bottom: 1px solid rgba(0,0,0,.08);
    vertical-align: middle;
}

th {
    font-size: .84rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #6a6a6a;
}

td {
    font-size: .97rem;
}

.title-cell strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 4px;
    color: #111;
}

.title-cell span {
    color: #666;
    font-size: .92rem;
}

.slug,
.current,
.hint,
.login-intro,
.login-note {
    color: #666;
}

.slug,
.current,
.hint,
.login-note {
    font-size: .92rem;
    line-height: 1.5;
}

.form-grid {
    display: grid;
    gap: 20px;
}

.row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 18px;
}

label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
}

input[type="text"],
input[type="password"],
input[type="email"],
textarea,
input[type="file"],
select {
    width: 100%;
}

input[type="text"],
input[type="password"],
input[type="email"],
textarea,
select {
    border: 1px solid #cfcfcf;
    border-radius: 8px;
    padding: 12px 14px;
    font: inherit;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease;
}

textarea {
    min-height: 260px;
    resize: vertical;
    line-height: 1.6;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #2a6ebb;
    box-shadow: 0 0 0 3px rgba(42,110,187,.12);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 700;
}

.status-on {
    background: #eaf5ea;
    color: #2d7a39;
}

.status-off {
    background: #f3f3f3;
    color: #666;
}

.tiny-link {
    color: #2a6ebb;
    font-weight: 600;
}

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

.check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #333;
}

.check input {
    width: auto;
}

.login-shell {
    display: flex;
    flex-direction: column;
}

.login-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px 60px;
}

.login-card {
    width: 100%;
    max-width: 520px;
    box-shadow: 0 6px 18px rgba(0,0,0,.04);
}

.login-card h2 {
    margin: 0 0 10px;
    font-size: 2rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.login-intro {
    margin: 0 0 22px;
    font-size: .98rem;
    line-height: 1.6;
}

.login-error {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #fff3f3;
    border: 1px solid #f1c8c8;
    color: #9a2f2f;
    font-size: .95rem;
}

/* Vorschauen */

.cover-preview-wrap {
    margin-top: 10px;
}

.cover-preview {
    width: 120px;
    border-radius: 6px;
    border: 1px solid #ddd;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    display: block;
}

.pdf-preview {
    margin-top: 8px;
    font-size: .9rem;
    color: #555;
    background: #f5f5f5;
    padding: 6px 10px;
    border-radius: 6px;
    display: inline-block;
    min-height: 34px;
    max-width: 100%;
    word-break: break-word;
}

/* Sidebar-Layout */

.admin-app {
    min-height: 100vh;
    display: flex;
    background: #f7f7f7;
}

.admin-sidebar {
    width: 260px;
    background: #ffffff;
    border-right: 1px solid #ececec;
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex-shrink: 0;
    min-height: 100vh;
}

.admin-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 4px 14px;
    border-bottom: 1px solid #f0f0f0;
}

.admin-sidebar-brand img {
    height: 42px;
    width: auto;
    display: block;
}

.admin-sidebar-title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.1;
}

.admin-sidebar-subtitle {
    color: #666;
    font-size: .92rem;
    margin-top: 2px;
}

.admin-sidebar-nav {
    display: grid;
    gap: 8px;
}

.admin-sidebar-nav a {
    padding: 11px 12px;
    border-radius: 10px;
    color: #333;
    font-weight: 600;
    transition: all .2s ease;
}

.admin-sidebar-nav a:hover {
    background: #f5f7fb;
    color: #2a6ebb;
}

.admin-sidebar-nav a.active {
    background: #eef4fb;
    color: #2a6ebb;
}

.admin-sidebar-user {
    margin-top: auto;
    padding: 14px 12px;
    border-radius: 12px;
    background: #f7f7f7;
    color: #666;
    font-size: .92rem;
    line-height: 1.5;
}

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

.admin-topbar {
    min-height: 72px;
    background: #ffffff;
    border-bottom: 1px solid #ececec;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.admin-topbar-title {
    font-size: 1.2rem;
    font-weight: 700;
    min-width: 0;
}

.admin-sidebar-toggle {
    display: none;
    border: 0;
    background: transparent;
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px 6px;
}

.admin-content {
    padding: 28px 28px 40px;
}

/* Login etwas luftiger */

.login-card .form-grid {
    gap: 18px;
}

.login-card input[type="password"] {
    margin-bottom: 4px;
}

.login-actions {
    margin-top: 18px;
}

.login-btn {
    min-width: 140px;
    justify-content: center;
}

/* Asset-Modal */

.asset-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.asset-modal-box {
    background: #fff;
    max-width: 760px;
    width: 100%;
    max-height: calc(100vh - 40px);
    overflow: auto;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,.18);
}

.asset-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.asset-modal-head h3 {
    margin: 0;
    font-size: 1.2rem;
}

/* Medien-Grid */

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    max-height: 420px;
    overflow: auto;
    padding: 4px;
}

.media-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    transition: .2s;
}

.media-item:hover {
    border-color: #2a6ebb;
    box-shadow: 0 4px 10px rgba(0,0,0,.1);
}

.media-item.active {
    border: 2px solid #2a6ebb;
}

.media-item img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    display: block;
}

.media-item span {
    display: block;
    font-size: .75rem;
    padding: 6px;
    text-align: center;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-empty {
    grid-column: 1 / -1;
    color: #666;
    padding: 20px 8px;
}

/* Dateimanager / Explorer */

.filemanager-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.filemanager-sidebar {
    min-width: 0;
}

.filemanager-main {
    min-width: 0;
}

.filemanager-main .form-card {
    margin-bottom: 20px;
}

.filemanager-section-title {
    font-size: .82rem;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #6a6a6a;
    margin-bottom: 10px;
}

.filemanager-type-switch {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filemanager-type-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 8px;
    background: #f3f6fb;
    color: #2a6ebb;
    border: 1px solid rgba(42,110,187,.18);
    font-weight: 600;
}

.filemanager-type-btn.active {
    background: #2a6ebb;
    color: #fff;
    border-color: #2a6ebb;
}

.filemanager-folder-list {
    display: grid;
    gap: 6px;
    max-height: 520px;
    overflow: auto;
    padding-left: 0;
}

.filemanager-folder-link {
    position: relative;
    display: block;
    padding: 10px 12px 10px 30px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e7e7e7;
    color: #333;
    font-weight: 600;
    line-height: 1.35;
    word-break: break-word;
}

.filemanager-folder-link::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c7d7ee;
    transform: translateY(-50%);
}

.filemanager-folder-link::after {
    display: none;
}

.filemanager-folder-link:hover {
    background: #f5f7fb;
    color: #2a6ebb;
}

.filemanager-folder-link.active {
    background: #eef4fb;
    color: #2a6ebb;
    border-color: #cfe0f6;
}

.filemanager-folder-link.active::before {
    background: #2a6ebb;
}

.filemanager-content-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.filemanager-summary-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.folder-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.folder-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f3f3f3;
    color: #555;
    font-size: .86rem;
    font-weight: 600;
}

.folder-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.folder-card {
    display: grid;
    gap: 6px;
    padding: 18px 18px 16px;
    border: 1px solid var(--admin-line);
    border-radius: 18px;
    background: var(--admin-surface);
    box-shadow: var(--admin-shadow);
    color: #1f1a15;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.folder-card:hover {
    transform: translateY(-1px);
    border-color: rgba(42, 110, 187, 0.22);
    box-shadow: 0 18px 34px rgba(43, 34, 21, 0.08);
}

.folder-card strong {
    font-size: 1rem;
    line-height: 1.35;
}

.folder-card span {
    color: var(--admin-muted);
    font-size: 0.86rem;
    word-break: break-word;
}

.folder-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef4fb;
    color: #2a6ebb;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* übersichtlichere Dateiansicht */

.filemanager-files {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.file-card {
    border: 1px solid var(--admin-line);
    border-radius: 18px;
    padding: 14px;
    background: var(--admin-surface);
    box-shadow: var(--admin-shadow);
    transition: .2s;
}

.file-card-select {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--admin-muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.file-card-select input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.file-card:hover {
    border-color: rgba(42, 110, 187, 0.24);
    box-shadow: 0 18px 34px rgba(43, 34, 21, 0.08);
}

.file-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.file-card-name {
    display: block;
    font-size: .92rem;
    line-height: 1.45;
    margin-top: 10px;
    color: #2b241d;
    text-align: left;
    word-break: break-word;
}

.file-card-folder {
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--admin-muted);
    word-break: break-word;
}

.file-card-actions {
    justify-content: flex-start;
    margin-top: 12px;
}

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

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

@media (max-width: 980px) {
    .admin-header-inner,
    .login-header-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 18px 0;
    }

    .admin-hero h2 {
        font-size: 2.1rem;
    }

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

    .filemanager-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .filemanager-folder-list {
        max-height: none;
    }

    .asset-modal-box {
        max-width: 100%;
    }
}

@media (max-width: 900px) {
    .admin-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: min(320px, 85vw);
        height: 100vh;
        transform: translateX(-100%);
        transition: transform .25s ease;
        z-index: 60;
        box-shadow: 0 10px 30px rgba(0,0,0,.12);
        overflow: auto;
    }

    .admin-app.sidebar-open .admin-sidebar {
        transform: translateX(0);
    }

    .admin-sidebar-toggle {
        display: inline-block;
    }

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

    .admin-content {
        padding: 22px 18px 32px;
    }

    .admin-section-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .filemanager-content-head {
        flex-direction: column;
        align-items: stretch;
    }

    .filemanager-folder-list {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .filemanager-folder-link {
        flex: 1 1 auto;
        min-width: 120px;
        text-align: center;
    }

    .filemanager-main {
        width: 100%;
    }

    .filemanager-content-head .actions {
        width: 100%;
    }

    .filemanager-content-head .actions > * {
        width: 100%;
    }

    .filemanager-content-head form {
        width: 100%;
        display: grid !important;
        gap: 8px !important;
    }

    .filemanager-content-head input[type="text"],
    .filemanager-content-head input[type="file"],
    .filemanager-content-head button {
        width: 100% !important;
    }

    .media-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: none;
    }
}

@media (max-width: 700px) {
    .admin-wrap,
    .login-wrap {
        padding: 0 16px;
    }

    .admin-brand img {
        height: 38px;
    }

    .login-brand img {
        height: 44px;
    }

    .admin-hero h2,
    .login-card h2 {
        font-size: 1.8rem;
    }

    .admin-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .admin-card,
    .form-card,
    .stat-card,
    .admin-section,
    .login-card {
        padding: 18px;
        border-radius: 16px;
    }

    textarea {
        min-height: 220px;
    }

    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    thead {
        display: none;
    }

    tr {
        padding: 12px 0;
        border-bottom: 1px solid rgba(0,0,0,.08);
    }

    td {
        border: 0;
        padding: 6px 0;
        word-break: break-word;
    }

    .asset-modal {
        padding: 0;
        align-items: stretch;
        justify-content: stretch;
    }

    .asset-modal-box {
        max-height: 100vh;
        min-height: 100vh;
        border-radius: 0;
        padding: 16px;
    }

    .asset-modal-head {
        position: sticky;
        top: 0;
        background: #fff;
        padding-bottom: 10px;
        z-index: 2;
    }

    .actions,
    .login-actions,
    .admin-card-actions {
        align-items: stretch;
    }

    .actions .btn,
    .actions .btn-small,
    .actions .btn-secondary,
    .login-actions .btn,
    .login-actions .btn-small,
    .login-actions .btn-secondary {
        width: 100%;
    }

    .filemanager-type-switch {
        width: 100%;
    }

    .filemanager-type-btn {
        flex: 1 1 auto;
    }

    .admin-top-link,
    .login-top-link {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 520px) {
    .admin-content {
        padding: 18px 14px 26px;
    }

    .admin-topbar {
        min-height: 64px;
        padding: 0 14px;
    }

    .admin-topbar-title {
        font-size: 1.05rem;
    }

    .admin-header-inner,
    .login-header-inner {
        min-height: auto;
        padding: 16px 0;
    }

    .media-grid,
    .filemanager-files {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .media-item img {
        height: 84px;
    }

    .filemanager-folder-link {
        min-width: 100%;
        padding: 10px 10px 10px 28px;
        font-size: .92rem;
    }

    .filemanager-folder-link::before {
        left: 10px;
    }
}

/* ==============================
   AGH Admin Theme
   ============================== */

:root {
    --admin-bg: #ffffff;
    --admin-surface: rgba(255,255,255,.97);
    --admin-surface-soft: #f8fbfc;
    --admin-surface-muted: #f5f8fa;
    --admin-text: #1f1e1b;
    --admin-muted: #7b7369;
    --admin-line: rgba(79,66,48,.08);
    --admin-line-strong: rgba(79,66,48,.13);
    --admin-accent: #1f5f78;
    --admin-accent-soft: #f1f7f8;
    --admin-shadow: 0 10px 24px rgba(44,37,27,.055);
}

body,
.admin-app {
    background: var(--admin-bg);
    color: var(--admin-text);
}

.admin-header,
.login-header,
.admin-topbar {
    background: rgba(255,255,253,.94);
    border-bottom-color: var(--admin-line);
    backdrop-filter: blur(14px);
}

.admin-brand-text p,
.login-brand-text p,
.admin-hero p,
.slug,
.current,
.hint,
.login-intro,
.login-note,
.title-cell span,
.stat-note,
.admin-sidebar-subtitle,
.admin-sidebar-user {
    color: var(--admin-muted);
}

.admin-card,
.form-card,
.stat-card,
.admin-section,
.login-card {
    position: relative;
    border: 1px solid var(--admin-line);
    border-radius: 24px;
    background: var(--admin-surface);
    box-shadow: var(--admin-shadow);
}

.admin-card::before,
.form-card::before,
.stat-card::before,
.admin-section::before,
.login-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255,255,255,.34), transparent 40%);
}

.admin-card:hover {
    box-shadow: 0 14px 30px rgba(44,37,27,.065);
}

.stat-label,
.admin-card-kicker,
.login-kicker,
th {
    color: var(--admin-muted);
}

.admin-card p {
    color: #5f5850;
}

.admin-btn,
.btn,
.login-btn,
.btn-small {
    border-radius: 999px;
    background: var(--admin-accent-soft);
    color: var(--admin-accent);
    border: 1px solid rgba(31,95,120,.12);
    font-weight: 700;
}

.admin-btn:hover,
.btn:hover,
.login-btn:hover,
.btn-small:hover {
    background: #e6f1f4;
    color: var(--admin-accent);
}

.admin-btn.secondary,
.btn-secondary,
.btn-small.secondary,
.admin-top-link,
.login-top-link {
    border-radius: 999px;
    background: rgba(255,255,255,.94);
    color: var(--admin-accent);
    border: 1px solid var(--admin-line-strong);
}

.admin-btn.secondary:hover,
.btn-secondary:hover,
.btn-small.secondary:hover,
.admin-top-link:hover,
.login-top-link:hover {
    background: var(--admin-surface-soft);
    color: var(--admin-accent);
}

.admin-top-link.primary {
    border-color: rgba(31,95,120,.12);
    color: var(--admin-accent);
    background: var(--admin-accent-soft);
}

.admin-top-link.primary:hover {
    background: #e7f2f5;
    color: var(--admin-accent);
}

input[type="text"],
input[type="password"],
input[type="email"],
textarea,
select {
    border: 1px solid var(--admin-line-strong);
    border-radius: 16px;
    background: rgba(255,255,255,.96);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
    border-color: var(--admin-accent);
    box-shadow: 0 0 0 3px rgba(31,95,120,.10);
}

th,
td {
    border-bottom-color: var(--admin-line);
}

.status-on {
    background: #edf7ef;
}

.status-off {
    background: #f5f7f8;
    color: var(--admin-muted);
}

.tiny-link {
    color: var(--admin-accent);
}

.login-error {
    border-radius: 16px;
    background: #fff7f7;
    border-color: #f2d8d8;
}

.cover-preview {
    border-radius: 12px;
    border-color: var(--admin-line);
    box-shadow: var(--admin-shadow);
}

.pdf-preview {
    background: var(--admin-surface-muted);
    border-radius: 12px;
}

.drag-handle {
    background: var(--admin-accent-soft);
    color: var(--admin-accent);
    border-radius: 999px;
}

.admin-topbar-title,
.admin-sidebar-title,
.admin-hero h2,
.login-card h2 {
    color: #181511;
}

.admin-app .tox.tox-tinymce {
    border-radius: 18px;
    border-color: var(--admin-line);
    box-shadow: var(--admin-shadow);
}

.structured-editor {
    display: grid;
    gap: 24px;
}

.structured-editor-block {
    padding: 22px 24px;
    border: 1px solid var(--admin-line);
    border-radius: 20px;
    background: var(--admin-surface-soft);
}

.structured-editor-block h3,
.structured-item h4 {
    margin: 0;
}

.structured-repeater {
    display: grid;
    gap: 16px;
    margin-top: 14px;
}

.structured-item {
    padding: 20px 22px;
    border: 1px solid var(--admin-line);
    border-radius: 18px;
    background: var(--admin-surface);
    box-shadow: var(--admin-shadow);
}

.page-block-editor {
    display: grid;
    gap: 18px;
}

.page-block-editor > .hint {
    margin: 0;
}

.page-block-editor .admin-section-head .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.page-block {
    padding: 22px 24px;
    border: 1px solid var(--admin-line);
    border-radius: 20px;
    background: var(--admin-surface-soft);
}

.page-block-kind {
    padding: 14px 16px;
    border: 1px solid rgba(95, 84, 69, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.7);
}

.page-block-kind-label {
    margin-bottom: 4px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--admin-muted);
}

.page-block-kind-title {
    font-size: 1rem;
    font-weight: 700;
    color: #181511;
}

.page-block-items {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}

.page-block-item {
    padding: 18px 20px;
    border: 1px solid var(--admin-line);
    border-radius: 18px;
    background: var(--admin-surface);
    box-shadow: var(--admin-shadow);
}

.page-block-type-hint {
    margin-top: 8px;
    max-width: 48rem;
}
