:root {
    --admin-red: #ed1b24;
    --admin-bg: #f6f7f9;
    --admin-card: #ffffff;
    --admin-text: #101828;
    --admin-muted: #667085;
    --admin-border: #e4e7ec;
    --admin-shadow: 0 18px 50px rgba(16, 24, 40, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(237, 27, 36, 0.08), transparent 34%),
        var(--admin-bg);
    color: var(--admin-text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

a:hover {
    text-decoration: underline;
}

main,
.admin-shell,
.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

main {
    padding: 36px 0 64px;
}

h1 {
    margin: 0 0 22px;
    font-size: clamp(34px, 4vw, 52px);
    line-height: 1;
    letter-spacing: -0.055em;
}

h2 {
    margin: 32px 0 16px;
    font-size: 26px;
    letter-spacing: -0.035em;
}

p {
    color: var(--admin-muted);
    line-height: 1.6;
}

table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    background: var(--admin-card);
    border: 1px solid var(--admin-border);
    border-radius: 22px;
    box-shadow: var(--admin-shadow);
}

thead {
    background: #f9fafb;
}

th,
td {
    padding: 15px 16px;
    border-bottom: 1px solid var(--admin-border);
    text-align: left;
    vertical-align: middle;
}

th {
    font-size: 13px;
    color: var(--admin-muted);
    font-weight: 700;
}

td {
    font-size: 15px;
}

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

form {
    background: var(--admin-card);
    border: 1px solid var(--admin-border);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--admin-shadow);
}

label {
    display: block;
    margin-bottom: 16px;
    color: var(--admin-muted);
    font-size: 14px;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    margin-top: 7px;
    padding: 13px 14px;
    border: 1px solid var(--admin-border);
    border-radius: 14px;
    background: #fff;
    color: var(--admin-text);
    font: inherit;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

button,
.button,
.btn,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    background: var(--admin-red);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(237, 27, 36, 0.22);
}

button:hover,
.button:hover,
.btn:hover,
input[type="submit"]:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

button.secondary,
.button.secondary,
.btn.secondary {
    background: #111827;
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.18);
}

.admin-card,
.card,
.panel {
    background: var(--admin-card);
    border: 1px solid var(--admin-border);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--admin-shadow);
}

.alert,
.notice,
.error,
.success {
    border-radius: 18px;
    padding: 14px 16px;
    margin: 0 0 18px;
    background: #fff;
    border: 1px solid var(--admin-border);
}

.error {
    border-color: rgba(237, 27, 36, 0.35);
    color: #b42318;
}

.success {
    border-color: rgba(18, 183, 106, 0.35);
    color: #027a48;
}

@media (max-width: 760px) {
    main,
    .admin-shell,
    .container {
        width: min(100% - 20px, 1180px);
    }

    table {
        display: block;
        overflow-x: auto;
    }

    form {
        padding: 18px;
    }
}


.admin-dashboard {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.admin-hero {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--admin-border);
    border-radius: 32px;
    padding: 38px;
    box-shadow: var(--admin-shadow);
    margin-bottom: 22px;
}

.admin-eyebrow {
    display: inline-flex;
    margin-bottom: 12px;
    color: var(--admin-red);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.admin-hero h1 {
    margin-bottom: 14px;
}

.admin-hero p {
    margin: 0;
    max-width: 760px;
}

.admin-hero strong {
    color: var(--admin-text);
}

.admin-nav-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.admin-nav-card {
    display: block;
    min-height: 170px;
    padding: 24px;
    border-radius: 28px;
    background: #fff;
    border: 1px solid var(--admin-border);
    box-shadow: var(--admin-shadow);
    color: var(--admin-text);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.admin-nav-card:hover {
    text-decoration: none;
    transform: translateY(-2px);
    border-color: rgba(237, 27, 36, 0.32);
    box-shadow: 0 24px 70px rgba(16, 24, 40, 0.13);
}

.admin-nav-card span {
    display: inline-flex;
    margin-bottom: 22px;
    color: var(--admin-red);
    font-size: 13px;
    font-weight: 900;
}

.admin-nav-card strong {
    display: block;
    margin-bottom: 10px;
    font-size: 23px;
    letter-spacing: -0.035em;
}

.admin-nav-card small {
    display: block;
    color: var(--admin-muted);
    font-size: 14px;
    line-height: 1.55;
}

.admin-actions {
    margin-top: 24px;
}

.admin-logout {
    display: inline-flex;
    border-radius: 999px;
    padding: 12px 18px;
    background: #111827;
    color: #fff;
    font-weight: 800;
}

.admin-logout:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

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

    .admin-hero {
        padding: 28px;
    }
}

.admin-page-header {
    display: flex;
    justify-content: space-between;
    gap: 22px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.admin-page-header p {
    margin: 0;
}

.admin-badge,
.admin-status {
    display: inline-flex;
    border-radius: 999px;
    padding: 6px 10px;
    background: #f2f4f7;
    color: var(--admin-text);
    font-size: 12px;
    font-weight: 800;
}

.admin-status {
    background: rgba(237, 27, 36, 0.08);
    color: var(--admin-red);
}

.admin-table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.admin-table-actions a {
    display: inline-flex;
    border-radius: 999px;
    padding: 7px 10px;
    background: #f9fafb;
    color: var(--admin-text);
    font-size: 13px;
    font-weight: 700;
}

.admin-table-actions a:hover {
    background: #f2f4f7;
    text-decoration: none;
}

.admin-table-actions form {
    display: inline;
    padding: 0;
    margin: 0;
    border: 0;
    box-shadow: none;
    background: none;
}

.danger-button {
    padding: 7px 10px;
    background: #b42318;
    box-shadow: none;
    font-size: 13px;
}

.admin-empty {
    padding: 28px;
    text-align: center;
    color: var(--admin-muted);
}

.admin-backlink {
    color: var(--admin-muted);
    font-weight: 700;
}

@media (max-width: 820px) {
    .admin-page-header {
        flex-direction: column;
    }
}

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

.admin-form label span {
    display: block;
    margin-bottom: 7px;
}

.admin-form small {
    display: block;
    margin-top: 7px;
    color: var(--admin-muted);
    font-size: 13px;
    line-height: 1.45;
}

.admin-form-actions {
    margin-top: 22px;
}

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

.admin-section {
    margin-top: 24px;
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 22px;
}

.admin-section-header h2 {
    margin: 0 0 8px;
}

.admin-section-header p {
    margin: 0;
}

.compact-form {
    box-shadow: none;
    border-radius: 20px;
    margin-top: 18px;
}

.admin-inline-form {
    margin-top: 16px;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: none;
}

.admin-copy-field {
    margin-bottom: 18px;
}

.admin-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
}

.admin-checkbox input {
    width: auto;
    margin: 0;
}

.admin-checkbox span {
    margin: 0;
    color: var(--admin-text);
}

.admin-code-block {
    margin: 0 0 18px;
    padding: 18px;
    border-radius: 18px;
    background: #111827;
    color: #fff;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.6;
}

.media-preview {
    width: 90px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    display: block;
}

.admin-upload-zone {
    border: 2px dashed #d1d5db;
    border-radius: 22px;
    padding: 42px 28px;
    text-align: center;
    cursor: pointer;
    background: #f9fafb;
    transition: 0.2s ease;
}

.admin-upload-zone strong {
    display: block;
    font-size: 18px;
    color: #111827;
    margin-bottom: 6px;
}

.admin-upload-zone span {
    color: #6b7280;
    font-size: 14px;
}

.admin-upload-zone.is-dragover {
    border-color: #ed1b24;
    background: #fff1f2;
}

.admin-upload-list {
    margin-top: 18px;
    padding: 16px 18px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #374151;
}

.admin-upload-list ul {
    margin: 10px 0 0;
    padding-left: 20px;
}

.admin-upload-list li {
    margin-bottom: 6px;
}

.admin-upload-list span {
    color: #6b7280;
}

.admin-upload-status {
    color: #6b7280;
    font-size: 14px;
    align-items: center;
}
/* Responsive-Ausbau 2026-07-07 */
html {
    -webkit-text-size-adjust: 100%;
}

img,
video {
    max-width: 100%;
    height: auto;
}

.admin-topbar {
    background: #111827;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-topbar-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.admin-brand {
    color: #fff;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.admin-brand:hover,
.admin-topbar-link:hover {
    text-decoration: none;
}

.admin-topbar-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
}

.admin-main {
    width: min(1180px, calc(100% - 32px));
    margin: 30px auto 64px;
    background: rgba(255, 255, 255, 0.88);
    padding: 30px;
    border: 1px solid var(--admin-border);
    border-radius: 26px;
    box-shadow: var(--admin-shadow);
}

.admin-main > :first-child {
    margin-top: 0;
}

.admin-card:has(> table),
.panel:has(> table),
.card:has(> table) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-card > table,
.panel > table,
.card > table,
.admin-main > table {
    min-width: 720px;
}

.media-preview {
    max-width: 90px;
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
}

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

.admin-section-header,
.admin-page-header {
    min-width: 0;
}

.admin-section-header > *,
.admin-page-header > * {
    min-width: 0;
}

.admin-page-header h1,
.admin-section-header h2,
.admin-hero h1 {
    overflow-wrap: anywhere;
}

@media (max-width: 900px) {
    .admin-main {
        width: min(100% - 24px, 1180px);
        padding: 22px;
        margin-top: 18px;
        border-radius: 22px;
    }

    .admin-section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-header-actions {
        width: 100%;
    }

    .admin-header-actions .button,
    .admin-header-actions .btn,
    .admin-header-actions button {
        flex: 1 1 210px;
    }
}

@media (max-width: 640px) {
    main,
    .admin-shell,
    .container,
    .admin-dashboard {
        width: min(100% - 20px, 1180px);
    }

    .admin-topbar-inner {
        width: min(100% - 20px, 1180px);
        min-height: 62px;
    }

    .admin-main {
        width: min(100% - 16px, 1180px);
        padding: 16px;
        margin-top: 10px;
        border-radius: 18px;
    }

    h1 {
        font-size: clamp(30px, 12vw, 42px);
        line-height: 0.98;
    }

    h2 {
        font-size: 23px;
    }

    .admin-hero,
    .admin-card,
    .card,
    .panel,
    form {
        padding: 18px;
        border-radius: 20px;
    }

    .admin-nav-card {
        min-height: auto;
        padding: 20px;
        border-radius: 22px;
    }

    .admin-form-actions,
    .admin-actions,
    .admin-table-actions {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
        width: 100%;
    }

    button,
    .button,
    .btn,
    input[type="submit"],
    .admin-logout,
    .admin-table-actions a,
    .danger-button {
        width: 100%;
        min-height: 44px;
    }

    .admin-table-actions form {
        width: 100%;
    }

    th,
    td {
        padding: 13px 12px;
        font-size: 14px;
        white-space: nowrap;
    }

    td {
        white-space: normal;
    }

    .admin-card > table,
    .panel > table,
    .card > table,
    .admin-main > table {
        min-width: 760px;
    }

    .admin-code-block {
        font-size: 13px;
    }

    .admin-upload-zone {
        padding: 30px 18px;
    }
}

@media (max-width: 430px) {
    .admin-brand span {
        display: inline-block;
        max-width: 180px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .admin-topbar-link {
        padding: 9px 12px;
        font-size: 13px;
    }
}


/* =========================================================
   Downloadportal PS – Backend UI System v1.1
   Einheitliche Komponenten für alle Adminseiten
   ========================================================= */

/* Seitenkopf */

.page-header,
.admin-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 24px;
}

.page-header h1,
.admin-page-header h1 {
    margin-bottom: 10px;
}

.page-header p,
.admin-page-header p {
    margin: 0;
    max-width: 760px;
}

.page-header-actions,
.admin-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

/* Karten */

.card,
.admin-card,
.panel {
    background: var(--admin-card);
    border: 1px solid var(--admin-border);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--admin-shadow);
    margin-bottom: 22px;
}

.card-header,
.admin-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.card-header h2,
.admin-card-header h2 {
    margin: 0 0 6px;
}

.card-header p,
.admin-card-header p {
    margin: 0;
}

.card-body,
.admin-card-body {
    min-width: 0;
}

.card-footer,
.admin-card-footer {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--admin-border);
}

/* Buttons */

.button,
.btn,
button,
input[type="submit"] {
    min-height: 44px;
    white-space: nowrap;
}

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

.button-secondary,
.btn-secondary,
.button.secondary,
.btn.secondary {
    background: #111827;
    color: #fff;
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.18);
}

.button-muted,
.btn-muted {
    background: #f2f4f7;
    color: var(--admin-text);
    box-shadow: none;
}

.button-danger,
.btn-danger,
.danger-button {
    background: #b42318;
    color: #fff;
    box-shadow: 0 12px 30px rgba(180, 35, 24, 0.18);
}

.button-success,
.btn-success {
    background: #027a48;
    color: #fff;
    box-shadow: 0 12px 30px rgba(2, 122, 72, 0.18);
}

/* Filter und Formulare */

.filter-form,
.admin-filter-form {
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
}

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

.form-group label,
.admin-form label span {
    display: block;
    margin-bottom: 7px;
    color: var(--admin-muted);
    font-size: 14px;
    font-weight: 700;
}

.form-group label {
    margin-bottom: 7px;
}

.form-actions,
.admin-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 18px;
}

/* Tabellen */

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table,
.admin-table {
    width: 100%;
    min-width: 760px;
}

.table th,
.admin-table th {
    white-space: nowrap;
}

.table td,
.admin-table td {
    vertical-align: top;
}

/* Tabellenaktionen */

.admin-table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.admin-table-actions a,
.table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 7px 10px;
    background: #f9fafb;
    color: var(--admin-text);
    font-size: 13px;
    font-weight: 800;
}

.admin-table-actions a:hover,
.table-action:hover {
    background: #f2f4f7;
    text-decoration: none;
}

/* Badges */

.badge,
.admin-badge,
.admin-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 6px 10px;
    background: #f2f4f7;
    color: var(--admin-text);
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.badge-primary {
    background: rgba(237, 27, 36, 0.10);
    color: var(--admin-red);
}

.badge-success {
    background: rgba(18, 183, 106, 0.12);
    color: #027a48;
}

.badge-warning {
    background: rgba(247, 144, 9, 0.14);
    color: #b54708;
}

.badge-muted {
    background: #f2f4f7;
    color: #475467;
}

.badge-danger {
    background: rgba(180, 35, 24, 0.12);
    color: #b42318;
}

/* Text-Helfer */

.text-muted {
    color: var(--admin-muted);
}

.text-small {
    font-size: 13px;
}

.text-nowrap {
    white-space: nowrap;
}

.text-break {
    overflow-wrap: anywhere;
}

/* Leere Zustände */

.empty-state,
.admin-empty {
    padding: 32px 20px;
    text-align: center;
    color: var(--admin-muted);
}

/* User-Agent / lange technische Texte */

.monospace-small {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    line-height: 1.45;
    color: var(--admin-muted);
    max-width: 360px;
    overflow-wrap: anywhere;
}

/* Responsive */

@media (max-width: 980px) {
    .form-grid,
    .admin-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-header,
    .admin-page-header,
    .card-header,
    .admin-card-header {
        flex-direction: column;
    }

    .page-header-actions,
    .admin-header-actions {
        justify-content: flex-start;
        width: 100%;
    }
}

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

    .page-header-actions .button,
    .page-header-actions .btn,
    .page-header-actions button,
    .admin-header-actions .button,
    .admin-header-actions .btn,
    .admin-header-actions button {
        width: 100%;
    }

    .form-actions,
    .admin-form-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .form-actions .button,
    .form-actions .btn,
    .form-actions button,
    .admin-form-actions .button,
    .admin-form-actions .btn,
    .admin-form-actions button {
        width: 100%;
    }
}

/* =========================================================
   Tabellenaktionen – Vereinheitlichung Links und Buttons
   ========================================================= */

.admin-table-actions form {
    display: inline-flex;
    margin: 0;
    padding: 0;
}

.admin-table-actions .table-action,
.admin-table-actions button.table-action {
    min-height: 34px;
    height: 34px;
    padding: 7px 12px;
    border: 0;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    box-shadow: none;
    cursor: pointer;
}

.admin-table-actions a.table-action {
    background: #f9fafb;
    color: var(--admin-text);
}

.admin-table-actions a.table-action:hover {
    background: #f2f4f7;
    text-decoration: none;
}

.admin-table-actions button.table-action.button-danger {
    background: rgba(180, 35, 24, 0.10);
    color: #b42318;
}

.admin-table-actions button.table-action.button-danger:hover {
    background: rgba(180, 35, 24, 0.16);
}
/* =========================================================
   Downloadportal PS – Backend UI System v1.1 Final
   ========================================================= */

.admin-page { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }

.page-header,
.admin-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 24px;
}

.page-header h1,
.admin-page-header h1 { margin-bottom: 10px; }
.page-header p,
.admin-page-header p { margin: 0; max-width: 760px; }

.page-header-actions,
.admin-header-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; }

.card,
.admin-card,
.panel { background: var(--admin-card); border: 1px solid var(--admin-border); border-radius: 24px; padding: 24px; box-shadow: var(--admin-shadow); margin-bottom: 22px; }

.card-header,
.admin-card-header,
.admin-section-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.card-header h2,
.admin-card-header h2,
.admin-section-header h2 { margin: 0 0 6px; }
.card-header p,
.admin-card-header p,
.admin-section-header p { margin: 0; }

.button,
.btn,
button,
input[type="submit"] { min-height: 44px; white-space: nowrap; }
.button-primary,
.btn-primary { background: var(--admin-red); color: #fff; }
.button-secondary,
.btn-secondary,
.button.secondary,
.btn.secondary,
button.secondary { background: #111827; color: #fff; box-shadow: 0 12px 30px rgba(17, 24, 39, 0.18); }
.button-muted,
.btn-muted { background: #f2f4f7; color: var(--admin-text); box-shadow: none; }
.button-danger,
.btn-danger,
.danger-button { background: #b42318; color: #fff; box-shadow: 0 12px 30px rgba(180, 35, 24, 0.18); }
.button-success,
.btn-success { background: #027a48; color: #fff; box-shadow: 0 12px 30px rgba(2, 122, 72, 0.18); }

.filter-form,
.admin-filter-form { padding: 0; border: 0; box-shadow: none; background: transparent; }
.form-grid,
.admin-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.form-group label,
.admin-form label span { display: block; margin-bottom: 7px; color: var(--admin-muted); font-size: 14px; font-weight: 700; }
.form-group label { margin-bottom: 7px; }
.form-actions,
.admin-form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
.admin-form small,
.form-group small { display: block; margin-top: 6px; color: var(--admin-muted); font-size: 12px; line-height: 1.45; }
.admin-checkbox,
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; }
.admin-checkbox input,
.checkbox-row input { width: auto; margin: 4px 0 0; }
.admin-checkbox span,
.checkbox-row span { margin: 0; color: var(--admin-text); }

.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table,
.admin-table { width: 100%; min-width: 760px; }
.table th,
.admin-table th { white-space: nowrap; }
.table td,
.admin-table td { vertical-align: top; }

.admin-table-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.admin-table-actions form { display: inline-flex; margin: 0; padding: 0; border: 0; box-shadow: none; background: transparent; }
.admin-table-actions .table-action,
.admin-table-actions a,
.admin-table-actions button.table-action { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; height: 34px; padding: 7px 12px; border: 0; border-radius: 999px; background: #f9fafb; color: var(--admin-text); font-size: 13px; font-weight: 800; line-height: 1; box-shadow: none; cursor: pointer; }
.admin-table-actions .table-action:hover,
.admin-table-actions a:hover { background: #f2f4f7; text-decoration: none; }
.admin-table-actions button.table-action.button-danger,
.admin-table-actions .danger-button { background: rgba(180, 35, 24, 0.10); color: #b42318; }
.admin-table-actions button.table-action.button-danger:hover,
.admin-table-actions .danger-button:hover { background: rgba(180, 35, 24, 0.16); }

.badge,
.admin-badge,
.admin-status { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; padding: 6px 10px; background: #f2f4f7; color: var(--admin-text); font-size: 12px; font-weight: 900; line-height: 1; white-space: nowrap; }
.badge-primary { background: rgba(237, 27, 36, 0.10); color: var(--admin-red); }
.badge-success { background: rgba(18, 183, 106, 0.12); color: #027a48; }
.badge-warning { background: rgba(247, 144, 9, 0.14); color: #b54708; }
.badge-muted { background: #f2f4f7; color: #475467; }
.badge-danger { background: rgba(180, 35, 24, 0.12); color: #b42318; }

.text-muted { color: var(--admin-muted); }
.text-small { font-size: 13px; }
.text-nowrap { white-space: nowrap; }
.text-break { overflow-wrap: anywhere; }
.empty-state,
.admin-empty { padding: 32px 20px; text-align: center; color: var(--admin-muted); }
.monospace-small { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; font-size: 12px; line-height: 1.45; color: var(--admin-muted); max-width: 360px; overflow-wrap: anywhere; }

.admin-alert { margin-bottom: 18px; }
.admin-copy-field input[readonly] { background: #f9fafb; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }
.media-preview { width: 72px; height: 48px; object-fit: cover; border-radius: 10px; border: 1px solid var(--admin-border); }
.admin-upload-zone { border: 2px dashed var(--admin-border); border-radius: 22px; padding: 34px 20px; text-align: center; background: #f9fafb; cursor: pointer; transition: 0.16s ease; }
.admin-upload-zone strong { display: block; margin-bottom: 6px; }
.admin-upload-zone span { color: var(--admin-muted); }
.admin-upload-zone.is-dragover { border-color: var(--admin-red); background: rgba(237, 27, 36, 0.06); }
.admin-upload-list { margin-top: 14px; color: var(--admin-muted); }
.admin-upload-status { align-items: center; color: var(--admin-muted); font-weight: 700; }
.admin-upload-hint { margin: 14px 0 0; color: var(--admin-muted); font-size: 0.92rem; }
.chunk-upload-progress { margin-top: 18px; padding: 20px; border: 1px solid var(--admin-border); border-radius: 18px; background: #fff; }
.chunk-progress-row { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 8px; color: var(--admin-text); }
.chunk-progress-row strong { min-width: 0; overflow-wrap: anywhere; }
.chunk-progress-overall-label { margin-top: 18px; font-size: 0.9rem; color: var(--admin-muted); }
.chunk-progress-track { height: 14px; overflow: hidden; border-radius: 999px; background: #e5e7eb; }
.chunk-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--admin-red), #ff5961); transition: width 0.15s linear; }
.chunk-progress-track-overall { height: 9px; }
.chunk-progress-track-overall span { background: var(--admin-dark); }
.chunk-upload-detail { margin: 14px 0 0; color: var(--admin-muted); font-size: 0.9rem; }
.chunk-upload-message { margin-top: 14px; padding: 12px 14px; border-radius: 12px; font-weight: 700; }
.chunk-upload-message.is-success { color: #166534; background: #dcfce7; }
.chunk-upload-message.is-error { color: #991b1b; background: #fee2e2; }
.chunk-upload-message.is-info { color: #1e40af; background: #dbeafe; }

@media (max-width: 980px) {
    .form-grid,
    .admin-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .page-header,
    .admin-page-header,
    .card-header,
    .admin-card-header,
    .admin-section-header { flex-direction: column; }
    .page-header-actions,
    .admin-header-actions { justify-content: flex-start; width: 100%; }
}

@media (max-width: 640px) {
    .admin-page { width: min(100% - 20px, 1180px); }
    .form-grid,
    .admin-form-grid { grid-template-columns: 1fr; }
    .page-header-actions .button,
    .page-header-actions .btn,
    .page-header-actions button,
    .admin-header-actions .button,
    .admin-header-actions .btn,
    .admin-header-actions button { width: 100%; }
    .form-actions,
    .admin-form-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
    .form-actions .button,
    .form-actions .btn,
    .form-actions button,
    .admin-form-actions .button,
    .admin-form-actions .btn,
    .admin-form-actions button { width: 100%; }
}


.developer-credit-card-admin {
    width: min(100% - 48px, 1180px);
    margin: 0 auto 28px;
    padding: 18px 22px;
    border: 1px solid var(--admin-border);
    border-radius: 18px;
    background: #ffffff;
    color: var(--admin-muted);
    display: flex;
    justify-content: space-between;
    gap: 18px;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
    font-size: 13px;
    line-height: 1.55;
}

.developer-credit-card-admin strong {
    color: var(--admin-text);
}

.developer-credit-card-admin a {
    color: var(--admin-red);
    font-weight: 800;
    text-decoration: none;
}

.developer-credit-card-admin a:hover {
    text-decoration: underline;
}

@media (max-width: 640px) {
    .developer-credit-card-admin {
        width: min(100% - 20px, 1180px);
        flex-direction: column;
    }
}
