:root {
    --navy: #182b46;
    --navy-light: #274564;
    --coral: #ef665c;
    --ink: #17263a;
    --muted: #778497;
    --line: #dde4eb;
    --surface: #f4f6f8;
}

/* Galerie-Kunstwerkstamm */
.gallery-content { max-width: 1600px; }
.gallery-search { background: #fff; border: 1px solid var(--border); border-radius: 18px; display: grid; gap: .6rem; padding: 1.2rem; }
.gallery-search label { font-weight: 700; }
.gallery-search > div { align-items: center; display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; gap: .8rem; }
.gallery-search input { width: 100%; }
.gallery-search button { width: auto; }
.gallery-result-note { color: var(--muted); margin: 1rem 0 .6rem; }
.gallery-table-wrap { background: #fff; border: 1px solid var(--border); border-radius: 18px; overflow-x: auto; }
.gallery-table { border-collapse: collapse; min-width: 900px; width: 100%; }
.gallery-table th, .gallery-table td { border-bottom: 1px solid var(--border); padding: .85rem 1rem; text-align: left; vertical-align: top; }
.gallery-table th { background: #edf1f4; color: var(--navy); }
.gallery-table a { color: var(--coral-dark); font-weight: 700; }
.gallery-detail-heading { align-items: end; display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 1.3rem; }
.gallery-mask { align-items: start; display: grid; grid-template-columns: minmax(540px, .95fr) minmax(480px, 1.05fr); gap: 1.2rem; }
.gallery-master-card, .gallery-child-card { background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 1.4rem; }
.gallery-create-card { max-width: 1100px; }
.gallery-main-image-upload { align-items: end; display: grid; gap: .8rem; margin-top: 1rem; }
.gallery-main-image-upload label { display: grid; gap: .35rem; }
.gallery-main-image-upload input[type="file"] { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: .7rem; }
.gallery-original-download { display: inline-flex; margin-top: .55rem; font-weight: 700; }
.gallery-section-title { align-items: center; display: flex; justify-content: space-between; }
.gallery-section-title span { background: #edf1f4; border-radius: 999px; color: var(--muted); padding: .35rem .7rem; }
.gallery-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin: 1rem 0; }
.gallery-fields > div, .gallery-long-fields > div { display: grid; gap: .3rem; }
.gallery-fields .wide { grid-column: 1 / -1; }
.gallery-fields dt, .gallery-long-fields dt { color: var(--muted); font-size: .88rem; }
.gallery-fields dd, .gallery-long-fields dd { background: #f8fafb; border: 1px solid var(--border); border-radius: 10px; margin: 0; min-height: 2.6rem; overflow-wrap: anywhere; padding: .65rem .75rem; white-space: pre-wrap; }
.gallery-flags { display: flex; flex-wrap: wrap; gap: .55rem; margin: 1rem 0; }
.gallery-flags span { background: #edf1f4; border-radius: 999px; color: var(--muted); padding: .4rem .7rem; }
.gallery-flags span.active { background: #fee4e1; color: #a64038; font-weight: 700; }
.gallery-long-fields { display: grid; gap: .8rem; margin: 0; }
.gallery-child-note { color: var(--muted); }
.gallery-child-card section { border-top: 1px solid var(--border); padding: 1.2rem 0; }
.gallery-child-card section h2 { font-size: 1.1rem; margin: 0 0 .7rem; }
.gallery-child-card section div { background: #f4f6f8; color: var(--muted); font-style: italic; padding: 1rem; }
.gallery-filter-main { grid-template-columns: minmax(320px, 1fr) auto auto; }
.gallery-heading-actions { align-items: center; display: flex; flex-wrap: wrap; gap: .8rem; }
.gallery-export-content { max-width: 1100px; }
.gallery-export-card { background: #fff; border: 1px solid var(--border); border-radius: 24px; box-shadow: 0 18px 50px rgba(23, 41, 65, .07); padding: 2rem; }
.gallery-export-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gallery-export-grid label { color: var(--muted); display: grid; font-size: .85rem; font-weight: 700; gap: .45rem; }
.gallery-export-grid input, .gallery-export-grid select { background: #f8fafc; border: 1px solid var(--border); border-radius: 12px; color: var(--navy); font: inherit; height: 50px; padding: 0 .9rem; width: 100%; }
.gallery-export-grid small { font-weight: 400; }
.gallery-export-search-option { align-items: center; color: var(--navy); display: flex; gap: .7rem; margin-top: 1.4rem; }
.gallery-export-search-option input { accent-color: var(--coral); height: 1.1rem; width: 1.1rem; }
.gallery-export-note { background: #edf2f6; border-radius: 14px; color: var(--muted); line-height: 1.55; margin-top: 1.4rem; padding: 1rem 1.1rem; }
.gallery-export-submit { border: 0; cursor: pointer; margin-top: 1.4rem; width: auto; }
.gallery-export-download { align-items: center; display: flex; flex-wrap: wrap; gap: 1rem; }
.gallery-export-download span { color: var(--muted); margin-top: 1.4rem; }
.gallery-export-submit:disabled { cursor: wait; opacity: .7; }
.gallery-export-error:not(:empty) { background: #fee8e6; border: 1px solid #f4b8b3; border-radius: 12px; font-weight: 700; padding: .85rem 1rem; }
.gallery-export-grid .validation-message { color: #a64038; font-weight: 700; }
.gallery-archive-table { min-width: 1050px; }
.gallery-media-list { background: transparent !important; display: grid; gap: .8rem; padding: 0 !important; }
.gallery-media-upload-item { display: grid; gap: .55rem; }
.gallery-media-upload-item form, .gallery-media-upload-item button { width: 100%; }
.gallery-media-list a { background: #fff; border: 1px solid var(--border); border-radius: 12px; color: var(--navy); display: grid; gap: .35rem; overflow: hidden; padding: .7rem; }
.gallery-media-list img { aspect-ratio: 4 / 3; border-radius: 8px; object-fit: contain; width: 100%; }
.gallery-media-list span { color: var(--muted); font-size: .85rem; }
.gallery-media-section h3 { color: var(--muted); font-size: .9rem; margin: 1rem 0 .6rem; }
.gallery-file-symbol { align-items: center; aspect-ratio: 4 / 3; background: #edf1f4; border-radius: 8px; color: var(--navy) !important; display: flex; font-size: 1.1rem !important; font-weight: 800; justify-content: center; }
.gallery-child-table-wrap { background: transparent !important; overflow-x: auto; padding: 0 !important; }
.gallery-child-table { border-collapse: collapse; min-width: 680px; width: 100%; }
.gallery-child-table th, .gallery-child-table td { border-bottom: 1px solid var(--border); padding: .7rem .65rem; text-align: left; vertical-align: top; }
.gallery-child-table th { background: #edf1f4; color: var(--navy); font-size: .82rem; white-space: nowrap; }
.gallery-child-table td { color: var(--ink); font-size: .9rem; }
.gallery-stock-table { min-width: 1120px; }
.gallery-edit-form fieldset { border: 0; margin: 0; min-width: 0; padding: 0; }
.gallery-edit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin-top: 1rem; }
.gallery-edit-grid label, .gallery-edit-long label { display: grid; gap: .35rem; }
.gallery-edit-grid label > span:first-child, .gallery-edit-long label > span:first-child { color: var(--muted); font-size: .88rem; }
.gallery-edit-grid .wide { grid-column: 1 / -1; }
.gallery-edit-grid input, .gallery-edit-long textarea { background: #f8fafb; border: 1px solid var(--border); border-radius: 10px; width: 100%; }
.gallery-edit-form fieldset:disabled input, .gallery-edit-form fieldset:disabled textarea { color: var(--ink); opacity: 1; }
.gallery-edit-flags { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1rem 0; }
.gallery-edit-flags label { align-items: center; display: flex; gap: .35rem; }
.gallery-edit-flags input { accent-color: var(--coral); height: 1.1rem; width: 1.1rem; }
.gallery-edit-long { display: grid; gap: .8rem; }
.gallery-edit-long textarea { resize: vertical; }
.gallery-edit-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.2rem; }
.gallery-edit-actions button { width: auto; }
.danger-button { background: #a64038; border: 0; border-radius: 999px; color: #fff; cursor: pointer; font-weight: 800; padding: .75rem 1.1rem; }
.gallery-history-card { margin-top: 1.4rem; }
@media (max-width: 1050px) { .gallery-mask { grid-template-columns: 1fr; } }
@media (max-width: 620px) {
  .gallery-search > div, .gallery-fields, .gallery-filter-main, .gallery-edit-grid { grid-template-columns: 1fr; }
  .gallery-fields .wide { grid-column: auto; }
  .gallery-edit-grid .wide { grid-column: auto; }
  .gallery-detail-heading { align-items: start; flex-direction: column; }
  .gallery-export-grid { grid-template-columns: 1fr; }
  .gallery-export-card { padding: 1.2rem; }
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    color: var(--ink);
    background: var(--surface);
    font-family: "Segoe UI", Inter, Arial, sans-serif;
}

button,
input {
    font: inherit;
}

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(360px, 44%) 1fr;
}

.brand-panel {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: clamp(32px, 5vw, 72px);
    overflow: hidden;
    position: relative;
    color: white;
    background:
        radial-gradient(circle at 15% 85%, rgba(239, 102, 92, .20), transparent 28%),
        radial-gradient(circle at 90% 18%, rgba(255, 255, 255, .08), transparent 32%),
        linear-gradient(145deg, #13253c 0%, #1b3553 62%, #213e5c 100%);
}

.brand-panel::after {
    width: 330px;
    height: 330px;
    content: "";
    position: absolute;
    right: -190px;
    bottom: -170px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 46% 54% 60% 40%;
    transform: rotate(24deg);
}

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

.brand img {
    width: 230px;
    height: 105px;
    object-fit: contain;
    filter: invert(1) grayscale(1) contrast(1.35);
    mix-blend-mode: screen;
}

.brand span {
    display: none;
}

.brand-copy {
    margin: auto 0;
    position: relative;
    z-index: 1;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--coral);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .18em;
}

.brand-copy h1 {
    margin: 0;
    font: 400 clamp(35px, 4.2vw, 61px)/1.08 Georgia, serif;
    letter-spacing: -.025em;
}

.brand-copy > p:last-child {
    max-width: 510px;
    margin: 28px 0 0;
    color: #c6d2de;
    font-size: 16px;
    line-height: 1.7;
}

.server-note {
    margin: 0;
    color: #879bb0;
    font-size: 11px;
}

.form-panel {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 38px;
    position: relative;
}

.login-card {
    width: min(430px, 100%);
    padding: 42px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: white;
    box-shadow: 0 20px 55px rgba(21, 41, 64, .10);
}

.login-card h2 {
    margin: 0;
    font: 400 38px/1.15 Georgia, serif;
}

.intro {
    margin: 10px 0 30px;
    color: var(--muted);
    font-size: 14px;
}

form label {
    display: block;
    margin: 18px 0 7px;
    color: #4c5a6b;
    font-size: 12px;
    font-weight: 650;
}

.input-wrap {
    height: 49px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 15px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
    transition: border-color .15s, box-shadow .15s;
}

.input-wrap:focus-within {
    border-color: #6e8ead;
    box-shadow: 0 0 0 3px rgba(78, 116, 151, .10);
}

.input-wrap span {
    color: #93a0af;
    font-size: 8px;
}

.input-wrap input {
    width: 100%;
    height: 100%;
    border: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
}

.input-wrap input::placeholder {
    color: #a6afbb;
}

form button {
    width: 100%;
    height: 49px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 26px;
    padding: 0 19px;
    border: 0;
    border-radius: 8px;
    color: white;
    background: var(--coral);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 9px 20px rgba(239, 102, 92, .22);
}

form button:hover {
    background: #df574e;
}

.validation {
    display: block;
    margin-top: 5px;
    color: #c93e36;
    font-size: 11px;
}

.validation:empty {
    display: none;
}

.information {
    margin-top: 16px;
    padding: 12px;
    border: 1px solid #c9ddec;
    border-radius: 7px;
    color: #315d7d;
    background: #f0f7fb;
    font-size: 11px;
    line-height: 1.45;
}

.help {
    margin: 26px 0 0;
    color: #929dab;
    font-size: 11px;
    text-align: center;
}

.system-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 14px;
    color: #929dab;
    font-size: 10px;
}

.system-status span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d5a13a;
    box-shadow: 0 0 0 3px rgba(213, 161, 58, .12);
}

.system-status.ready span {
    background: #4ca877;
    box-shadow: 0 0 0 3px rgba(76, 168, 119, .12);
}

.copyright {
    position: absolute;
    bottom: 24px;
    color: #9da6b1;
    font-size: 10px;
}

.error-page {
    max-width: 620px;
    margin: 15vh auto;
    padding: 40px;
    border-radius: 12px;
    background: white;
    box-shadow: 0 15px 45px rgba(21, 41, 64, .08);
}

.error-page h1 {
    font-family: Georgia, serif;
    font-weight: 400;
}

.error-page a {
    color: var(--coral);
}

.setup-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 36px 18px;
    background:
        radial-gradient(circle at 15% 15%, rgba(241, 99, 89, .08), transparent 30%),
        #f2f5f8;
}

.setup-card {
    width: min(100%, 520px);
    padding: 42px 48px;
    border: 1px solid #d9e2ea;
    border-radius: 18px;
    background: white;
    box-shadow: 0 22px 60px rgba(22, 45, 70, .09);
}

.setup-logo {
    display: block;
    width: min(180px, 55%);
    height: 80px;
    margin: 0 0 24px;
    object-fit: contain;
    object-position: left center;
}

.setup-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 34px;
    color: var(--navy);
    font-size: 11px;
    letter-spacing: .2em;
}

.setup-brand img {
    width: 100px;
    height: 52px;
    object-fit: contain;
}

.setup-card h1 {
    margin: 8px 0 10px;
    color: var(--navy);
    font-family: Georgia, serif;
    font-size: 40px;
    font-weight: 400;
}

.setup-intro {
    margin: 0 0 24px;
    color: #748296;
    line-height: 1.6;
}

.account-preview {
    margin: 0 0 26px;
    padding: 16px 18px;
    border-radius: 10px;
    background: #f4f7fa;
}

.account-preview div {
    display: grid;
    grid-template-columns: 105px 1fr;
    gap: 12px;
}

.account-preview div + div {
    margin-top: 8px;
}

.account-preview dt {
    color: #8996a7;
    font-size: 12px;
}

.account-preview dd {
    margin: 0;
    color: #34465b;
    font-size: 12px;
}

.setup-card form > label {
    display: block;
    margin: 17px 0 7px;
    color: #425166;
    font-size: 12px;
    font-weight: 700;
}

.setup-card form > input {
    box-sizing: border-box;
    width: 100%;
    padding: 14px 15px;
    border: 1px solid #d6e0e9;
    border-radius: 8px;
    color: #25384c;
    font-size: 15px;
}

.setup-card form > input:focus {
    border-color: #6f99bc;
    outline: 3px solid rgba(111, 153, 188, .16);
}

.password-note,
.setup-security {
    color: #929dab;
    font-size: 11px;
}

.password-note {
    margin: 9px 0 18px;
}

.setup-security {
    margin: 20px 0 0;
    text-align: center;
}

.setup-validation:not(:empty) {
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 7px;
    background: #fff1f0;
}

.dashboard-page {
    min-height: 100vh;
    color: var(--navy);
    background: #f2f5f8;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 86px;
    padding: 0 clamp(24px, 5vw, 78px);
    border-bottom: 1px solid #dce4eb;
    background: white;
}

.dashboard-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--navy);
    font-size: 11px;
    letter-spacing: .2em;
    text-decoration: none;
}

.dashboard-brand img {
    width: 150px;
    height: 58px;
    object-fit: contain;
}

.dashboard-brand > span {
    display: none;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 22px;
}

.user-menu > div {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.user-menu strong {
    font-size: 12px;
}

.user-menu span {
    color: #8996a7;
    font-size: 10px;
}

.user-menu form {
    margin: 0;
}

.user-menu form button {
    width: auto;
    margin: 0;
    padding: 10px 15px;
    border: 1px solid #d7e0e8;
    color: #526175;
    background: white;
    box-shadow: none;
    font-size: 11px;
}

.user-menu form button:hover {
    color: white;
    background: var(--navy);
}

.dashboard-content {
    max-width: 1180px;
    margin: 0 auto;
    padding: clamp(58px, 8vw, 110px) 28px 80px;
}

.dashboard-content > h1 {
    max-width: 760px;
    margin: 12px 0 18px;
    font-family: Georgia, serif;
    font-size: clamp(38px, 5vw, 64px);
    font-weight: 400;
    line-height: 1.06;
}

.dashboard-intro {
    max-width: 680px;
    margin: 0;
    color: #738195;
    font-size: 16px;
    line-height: 1.7;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 60px;
}

.dashboard-grid article {
    min-height: 220px;
    padding: 27px;
    border: 1px solid #dce4eb;
    border-radius: 14px;
    background: white;
    box-shadow: 0 12px 32px rgba(27, 48, 72, .05);
}

.card-number {
    color: var(--coral);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .16em;
}

.dashboard-grid h2 {
    margin: 42px 0 9px;
    font-family: Georgia, serif;
    font-size: 24px;
    font-weight: 400;
}

.dashboard-grid p {
    min-height: 42px;
    margin: 0 0 24px;
    color: #7c8999;
    font-size: 12px;
    line-height: 1.6;
}

.coming-soon,
.ready-label {
    display: inline-block;
    padding: 6px 9px;
    border-radius: 5px;
    color: #8b96a4;
    background: #f0f3f6;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ready-label {
    color: #347b58;
    background: #e9f6ef;
}

.card-link {
    color: var(--coral);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.admin-page {
    min-height: 100vh;
    color: var(--navy);
    background: #f2f5f8;
}

.admin-nav {
    display: flex;
    align-self: stretch;
    gap: 30px;
}

.admin-nav a {
    display: flex;
    align-items: center;
    border-bottom: 2px solid transparent;
    color: #7d8998;
    font-size: 12px;
    text-decoration: none;
}

.admin-nav a.active {
    border-color: var(--coral);
    color: var(--navy);
    font-weight: 700;
}

.compact-logout button {
    width: auto;
    margin: 0;
    padding: 10px 15px;
    border: 1px solid #d7e0e8;
    color: #526175;
    background: white;
    box-shadow: none;
    font-size: 11px;
}

.admin-content,
.form-content {
    max-width: 1180px;
    margin: 0 auto;
    padding: 58px 28px 80px;
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 36px;
}

.page-heading h1,
.form-content h1 {
    margin: 9px 0 9px;
    font-family: Georgia, serif;
    font-size: 42px;
    font-weight: 400;
}

.page-heading > div > p:last-child,
.form-intro {
    margin: 0;
    color: #7c8999;
    font-size: 14px;
}

.primary-link {
    padding: 13px 18px;
    border-radius: 7px;
    color: white;
    background: var(--coral);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(241, 99, 89, .2);
}

.secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 14px;
    border: 1px solid #cad7e2;
    border-radius: 7px;
    color: #385b79;
    background: #fff;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition:
        border-color .15s ease,
        color .15s ease,
        background .15s ease,
        transform .15s ease;
}

.secondary-link:hover {
    border-color: #ef8d85;
    color: #c95149;
    background: #fff8f7;
    transform: translateY(-1px);
}

.success-banner {
    margin-bottom: 20px;
    padding: 13px 16px;
    border: 1px solid #bfe3ce;
    border-radius: 8px;
    color: #347b58;
    background: #edf8f2;
    font-size: 12px;
}

.user-table-wrap {
    overflow-x: auto;
    border: 1px solid #dce4eb;
    border-radius: 12px;
    background: white;
    box-shadow: 0 12px 34px rgba(27, 48, 72, .05);
}

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

.user-table th {
    padding: 15px 18px;
    border-bottom: 1px solid #e1e7ed;
    color: #8b96a5;
    font-size: 9px;
    letter-spacing: .1em;
    text-align: left;
    text-transform: uppercase;
}

.user-table td {
    padding: 17px 18px;
    border-bottom: 1px solid #edf0f3;
    color: #536174;
    font-size: 11px;
}

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

.user-list {
    display: grid;
    gap: 12px;
}

.user-row {
    display: grid;
    grid-template-columns: minmax(260px, 1.6fr) auto auto minmax(150px, .8fr) auto;
    gap: 18px;
    align-items: center;
    padding: 20px 22px;
    border: 1px solid #dce4eb;
    border-radius: 12px;
    background: white;
    box-shadow: 0 10px 28px rgba(27, 48, 72, .045);
}

.user-row > div:first-child strong,
.user-row > div:first-child span {
    display: block;
}

.user-row > div:first-child strong {
    margin-bottom: 5px;
    color: #253a52;
    font-size: 15px;
}

.user-row > div:first-child span,
.user-row > span:not(.role-badge):not(.status-badge) {
    color: #7e8b9b;
    font-size: 12px;
}

.user-row .secondary-link {
    justify-self: end;
    white-space: nowrap;
}

.user-row form {
    justify-self: end;
    margin: 0;
}

.archive-link {
    margin-top: 20px;
}

.archive-link a {
    color: #49657f;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.archive-link a:hover {
    color: var(--coral);
}

.user-table td:first-child strong,
.user-table td:first-child span {
    display: block;
}

.user-table td:first-child strong {
    margin-bottom: 4px;
    color: #2b3e53;
    font-size: 12px;
}

.user-table td:first-child span {
    color: #96a0ad;
    font-size: 10px;
}

.role-badge,
.status-badge {
    display: inline-block;
    padding: 6px 8px;
    border-radius: 5px;
    font-size: 9px;
    font-weight: 700;
}

.role-badge {
    color: #46647e;
    background: #edf3f8;
}

.status-badge.active {
    color: #347b58;
    background: #e9f6ef;
}

.status-badge.pending {
    color: #8f681c;
    background: #fbf3df;
}

.status-badge.inactive {
    color: #8d6262;
    background: #f6ecec;
}

.edit-link,
.back-link {
    color: var(--coral);
    font-weight: 700;
    text-decoration: none;
}

.back-link {
    display: inline-block;
    margin-bottom: 38px;
    font-size: 11px;
}

.form-content {
    max-width: 780px;
}

.admin-form {
    margin-top: 34px;
    padding: 30px;
    border: 1px solid #dce4eb;
    border-radius: 12px;
    background: white;
    box-shadow: 0 12px 34px rgba(27, 48, 72, .05);
}

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

.form-grid .full-width {
    grid-column: 1 / -1;
}

.admin-form label:not(.switch-row) {
    display: block;
    margin-bottom: 7px;
    color: #425166;
    font-size: 11px;
    font-weight: 700;
}

.admin-form input:not([type="checkbox"]),
.admin-form select,
.admin-form textarea {
    box-sizing: border-box;
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #d6e0e9;
    border-radius: 7px;
    color: #25384c;
    background: white;
    font: inherit;
    font-size: 13px;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
    border-color: #6f99bc;
    outline: 3px solid rgba(111, 153, 188, .16);
}

.admin-form textarea {
    min-height: 96px;
    resize: vertical;
}

.admin-form small {
    display: block;
    margin-top: 6px;
    color: #98a2ae;
    font-size: 9px;
}

.switch-row {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 25px;
    color: #425166;
    font-size: 11px;
    font-weight: 700;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-top: 30px;
}

.form-actions button {
    width: auto;
    margin: 0;
    padding: 13px 19px;
    font-size: 11px;
}

.form-actions a {
    color: #7f8b9a;
    font-size: 11px;
    text-decoration: none;
}

.form-error:not(:empty) {
    margin-bottom: 20px;
    padding: 11px 13px;
    border-radius: 7px;
    background: #fff1f0;
}

.invitation-result,
.invite-panel {
    margin-top: 34px;
    padding: 30px;
    border: 1px solid #dce4eb;
    border-radius: 12px;
    background: white;
    box-shadow: 0 12px 34px rgba(27, 48, 72, .05);
}

.result-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-bottom: 18px;
    border-radius: 50%;
    color: white;
    background: #4ca877;
    font-size: 20px;
}

.invitation-result h2,
.invite-panel h2 {
    margin: 0 0 8px;
    font-family: Georgia, serif;
    font-size: 25px;
    font-weight: 400;
}

.invitation-result > p,
.invite-panel p {
    color: #7c8999;
    font-size: 12px;
    line-height: 1.6;
}

.invitation-result > label,
.invite-link-result > label {
    display: block;
    margin: 22px 0 7px;
    color: #425166;
    font-size: 11px;
    font-weight: 700;
}

.copy-field {
    display: flex;
    gap: 8px;
}

.copy-field input {
    min-width: 0;
    flex: 1;
    padding: 12px 13px;
    border: 1px solid #d6e0e9;
    border-radius: 7px;
    color: #526175;
    background: #f7f9fb;
    font-size: 11px;
}

.copy-field button,
.invite-panel > form button {
    width: auto;
    margin: 0;
    padding: 11px 15px;
    border-radius: 7px;
    box-shadow: none;
    font-size: 10px;
}

.sensitive-note {
    margin: 8px 0 25px;
    color: #9a7680 !important;
    font-size: 10px !important;
}

.invite-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 20px;
}

.invite-panel > form {
    margin: 0;
}

.invite-link-result {
    grid-column: 1 / -1;
}

.invite-link-result small {
    display: block;
    margin-top: 7px;
    color: #8996a7;
    font-size: 9px;
}

.danger-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 20px;
    margin-top: 22px;
    padding: 24px 30px;
    border: 1px solid #efd4d2;
    border-radius: 12px;
    background: #fffafa;
}

.danger-panel h2 {
    margin: 0 0 6px;
    color: #713b39;
    font-family: Georgia, serif;
    font-size: 21px;
    font-weight: 400;
}

.danger-panel p {
    margin: 0;
    color: #9b7775;
    font-size: 11px;
    line-height: 1.55;
}

.danger-panel form {
    margin: 0;
}

.danger-panel button {
    width: auto;
    margin: 0;
    padding: 11px 15px;
    border: 1px solid #d8847e;
    color: #a7443e;
    background: white;
    box-shadow: none;
    font-size: 10px;
}

.danger-panel button:hover {
    color: white;
    background: #b94f48;
}

.archive-navigation {
    margin: 18px 2px 0;
    text-align: right;
}

.archive-navigation a {
    color: #7d8998;
    font-size: 10px;
    text-decoration: none;
}

.restore-button {
    width: auto;
    margin: 0;
    padding: 8px 11px;
    border: 1px solid #cfdce6;
    color: #46647e;
    background: white;
    box-shadow: none;
    font-size: 9px;
}

.empty-state {
    padding: 45px;
    border: 1px dashed #cfd9e2;
    border-radius: 12px;
    color: #8d98a6;
    background: rgba(255, 255, 255, .55);
    font-size: 12px;
    text-align: center;
}

.error-banner {
    margin-bottom: 20px;
    padding: 13px 16px;
    border: 1px solid #edc7c4;
    border-radius: 8px;
    color: #a0443e;
    background: #fff2f1;
    font-size: 12px;
}

.mail-overview {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr);
    gap: 20px;
}

.mail-settings-card,
.test-mail-card {
    padding: 27px;
    border: 1px solid #dce4eb;
    border-radius: 12px;
    background: white;
    box-shadow: 0 12px 34px rgba(27, 48, 72, .05);
}

.mail-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.mail-settings-card h2,
.test-mail-card h2,
.queue-heading h2 {
    margin: 7px 0 18px;
    font-family: Georgia, serif;
    font-size: 25px;
    font-weight: 400;
}

.mail-settings-card dl {
    margin: 0;
}

.mail-settings-card dl div {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 14px;
    padding: 9px 0;
    border-bottom: 1px solid #edf1f4;
    font-size: 11px;
}

.mail-settings-card dt {
    color: #8d98a6;
}

.mail-settings-card dd {
    margin: 0;
    color: #435469;
    word-break: break-word;
}

.server-command {
    margin-top: 18px;
    padding: 13px;
    border-radius: 7px;
    background: #f3f6f8;
}

.server-command span,
.server-command code {
    display: block;
}

.server-command span {
    margin-bottom: 6px;
    color: #8996a7;
    font-size: 9px;
}

.server-command code {
    overflow-wrap: anywhere;
    color: #526175;
    font-size: 9px;
}

.test-mail-card > p {
    color: #7c8999;
    font-size: 11px;
    line-height: 1.55;
}

.test-mail-card form {
    margin-top: 22px;
}

.test-mail-card label {
    display: block;
    margin-bottom: 7px;
    color: #425166;
    font-size: 10px;
    font-weight: 700;
}

.test-mail-card input {
    box-sizing: border-box;
    width: 100%;
    padding: 12px;
    border: 1px solid #d6e0e9;
    border-radius: 7px;
}

.test-mail-card button {
    margin-top: 14px;
    padding: 12px 15px;
    font-size: 10px;
}

.queue-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin: 48px 0 18px;
}

.queue-heading h2 {
    margin-bottom: 0;
}

.queue-heading > a {
    color: #7d8998;
    font-size: 10px;
    text-decoration: none;
}

.queue-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.queue-actions > a {
    color: #7d8998;
    font-size: 10px;
    text-decoration: none;
}

.queue-actions form {
    margin: 0;
}

.queue-actions button {
    width: auto;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid #e0c2c0;
    color: #a0443e;
    background: white;
    box-shadow: none;
    font-size: 9px;
}

.mail-queue {
    overflow: hidden;
    border: 1px solid #dce4eb;
    border-radius: 12px;
    background: white;
    box-shadow: 0 12px 34px rgba(27, 48, 72, .05);
}

.mail-entry {
    display: grid;
    grid-template-columns: 1fr 190px;
    gap: 24px;
    padding: 20px 22px;
    border-bottom: 1px solid #e8edf1;
}

.mail-entry:last-child {
    border-bottom: 0;
}

.event-type {
    margin-left: 8px;
    color: #9aa4b0;
    font-size: 9px;
}

.mail-entry h3 {
    margin: 11px 0 6px;
    color: #34465b;
    font-size: 13px;
}

.mail-entry-main > p {
    margin: 0;
    color: #8c97a5;
    font-size: 10px;
}

.mail-entry-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 7px;
    color: #8c97a5;
    font-size: 9px;
}

.mail-entry-meta form {
    margin: 4px 0 0;
}

.mail-entry-meta button {
    width: auto;
    margin: 0;
    padding: 7px 10px;
    border: 1px solid #cad8e3;
    color: #46647e;
    background: white;
    box-shadow: none;
    font-size: 9px;
}

.mail-status.sent {
    color: #347b58;
    background: #e9f6ef;
}

.mail-status.failed {
    color: #a0443e;
    background: #fff0ef;
}

.mail-status.pending,
.mail-status.sending {
    color: #8f681c;
    background: #fbf3df;
}

.mail-error {
    margin-top: 12px;
    color: #a0443e;
    font-size: 10px;
}

.mail-error summary {
    cursor: pointer;
}

.mail-error p {
    margin: 7px 0 0;
    padding: 9px 11px;
    border-radius: 6px;
    background: #fff3f2;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.invitation-login {
    display: inline-block;
    margin-top: 8px;
}

.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;
}

.archive-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 92% 2%, rgba(242, 99, 90, .08), transparent 26rem),
        #f3f6f9;
    color: #172941;
}

.archive-content {
    width: min(1720px, calc(100% - 64px));
    margin: 0 auto;
    padding: 58px 0 80px;
}

.archive-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 30px;
}

.archive-heading h1 {
    margin: 7px 0 8px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(42px, 4vw, 62px);
    font-weight: 400;
    letter-spacing: -.025em;
}

.archive-heading p:last-child {
    margin: 0;
    color: #748399;
    font-size: 18px;
}

.disabled-link {
    cursor: default;
    opacity: .55;
}

.archive-filters {
    padding: 24px;
    border: 1px solid #d9e2ea;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 14px 40px rgba(23, 41, 65, .06);
}

.filter-main {
    display: grid;
    grid-template-columns: 130px minmax(260px, 1.7fr) minmax(170px, .65fr) minmax(190px, .75fr) auto auto;
    gap: 14px;
    align-items: end;
}

.filter-main label {
    display: grid;
    gap: 7px;
    color: #526176;
    font-size: 13px;
    font-weight: 700;
}

.filter-main input,
.filter-main select,
.archive-summary select {
    min-width: 0;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #d7e0e9;
    border-radius: 10px;
    background: #f9fbfd;
    color: #172941;
    font: inherit;
    outline: none;
}

.filter-main input:focus,
.filter-main select:focus,
.archive-summary select:focus {
    border-color: #789fc4;
    box-shadow: 0 0 0 3px rgba(120, 159, 196, .15);
}

.filter-main button {
    height: 48px;
    padding: 0 28px;
    border: 0;
    border-radius: 10px;
    background: #f2635a;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.archive-search-actions {
    display: flex;
    gap: 8px;
}

.filter-main .express-search-button {
    border: 1px solid #315c84;
    background: #fff;
    color: #315c84;
    box-shadow: none;
}

.filter-main .express-search-button:hover,
.filter-main .express-search-button:focus-visible {
    background: #edf4fa;
}

.reset-filters {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    color: #75849a;
    text-decoration: none;
}

.filter-main.gallery-filter-main {
    grid-template-columns: minmax(0, 1fr) max-content max-content;
}

.filter-main.gallery-filter-main .wide-filter {
    min-width: 0;
}

.filter-main.gallery-filter-main input {
    width: 100%;
}

.filter-main.gallery-filter-main button {
    width: auto;
    min-width: 8rem;
}

.filter-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #edf1f5;
}

.filter-flags label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #47576c;
    font-size: 14px;
    font-weight: 700;
}

.filter-flags input {
    width: 18px;
    height: 18px;
    accent-color: #f2635a;
}

.archive-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
    padding: 0 6px;
    color: #75849a;
}

.archive-summary strong {
    margin-right: 5px;
    color: #172941;
}

.archive-search-mode {
    display: inline-flex;
    margin-left: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #edf4fa;
    color: #315c84;
    font-size: 11px;
    font-weight: 800;
}

.archive-summary label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.archive-summary select {
    height: 38px;
    padding: 0 28px 0 10px;
}

#page-size-form {
    display: none;
}

.archive-empty {
    display: grid;
    justify-items: center;
    padding: 84px 30px;
    border: 1px dashed #cad7e2;
    border-radius: 20px;
    background: rgba(255, 255, 255, .75);
    text-align: center;
}

.archive-empty > span {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 18px;
    border-radius: 50%;
    background: #e9f1f7;
    color: #52789d;
    font-size: 34px;
}

.archive-empty h2 {
    margin: 0 0 10px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 30px;
    font-weight: 400;
}

.archive-empty p {
    max-width: 620px;
    margin: 0;
    color: #748399;
    line-height: 1.7;
}

.archive-table-wrap {
    overflow-x: auto;
    border: 1px solid #d9e2ea;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 14px 40px rgba(23, 41, 65, .05);
}

.archive-table {
    width: 100%;
    min-width: 1320px;
    border-collapse: collapse;
    font-size: 14px;
}

.archive-table th {
    padding: 17px 15px;
    background: #172941;
    color: #fff;
    text-align: left;
    white-space: nowrap;
    font-size: 12px;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.sortable-column {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.sortable-column:hover,
.sortable-column:focus-visible {
    color: #ffd9d5;
    text-decoration: underline;
    text-underline-offset: .2rem;
}

.sortable-column span {
    min-width: .8rem;
    font-size: 1rem;
    line-height: 1;
}

.archive-table td {
    padding: 16px 15px;
    border-bottom: 1px solid #e7edf2;
    vertical-align: middle;
    color: #45556a;
}

.archive-table tbody tr:hover {
    background: #f9fbfd;
}

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

.archive-row-action a,
.archive-edit-jump {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 9px;
    background: var(--coral);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(242, 99, 91, .18);
}

.archive-row-action a:hover,
.archive-edit-jump:hover {
    background: #df554d;
    color: #fff;
}

.archive-row-action {
    box-sizing: border-box;
    width: 132px;
    min-width: 132px;
    position: sticky;
    right: 0;
    z-index: 1;
    padding-right: 18px !important;
    background: #fff;
    box-shadow: -10px 0 18px rgba(23, 41, 65, .06);
}

.archive-table th.archive-row-action {
    z-index: 2;
    background: #172941;
}

.archive-table tbody tr:hover .archive-row-action {
    background: #f9fbfd;
}

.archive-edit-form {
    scroll-margin-top: 24px;
}

.archive-id {
    display: inline-grid;
    place-items: center;
    min-width: 38px;
    height: 32px;
    padding: 0 8px;
    border-radius: 8px;
    background: #edf3f8;
    color: #315c84;
    font-weight: 800;
}

.archive-thumbnail-cell {
    width: 88px;
}

.archive-thumbnail-cell a {
    display: grid;
    width: 64px;
    height: 48px;
    overflow: hidden;
    place-items: center;
    border-radius: 10px;
    background: #eef3f7;
    text-decoration: none;
}

.archive-thumbnail-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.archive-media-symbol {
    color: var(--navy);
    font-size: 1.35rem;
    font-weight: 800;
}

.archive-media-symbol.pdf {
    font-size: 0.7rem;
    letter-spacing: 0.05em;
}

.archive-media-symbol.empty {
    color: var(--muted);
}

.archive-transcript-state span {
    display: inline-grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    background: #dff4e9;
    color: #25825a;
    font-weight: 900;
}

.archive-transcript-state span.empty {
    background: transparent;
    color: var(--muted);
}

.vector-test-results {
    display: grid;
    gap: 0.75rem;
    margin: 1.25rem 0;
}

.vector-test-results > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.vector-test-results a {
    display: grid;
    color: var(--navy);
    text-decoration: none;
}

.vector-test-results a span,
.vector-test-results > div > span {
    color: var(--muted);
    font-size: 0.9rem;
}

.archive-title-cell {
    min-width: 250px;
}

.archive-title-cell strong,
.archive-title-cell span,
.archive-table td small {
    display: block;
}

.archive-title-cell strong {
    color: #172941;
}

.archive-title-cell span,
.archive-table td small {
    margin-top: 4px;
    color: #8a98aa;
    font-size: 12px;
}

.archive-title-cell .archive-similarity {
    display: inline-flex;
    width: fit-content;
    margin-top: 6px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eef4fa;
    color: #315d7c;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.file-type-badge,
.rights-badge,
.process-status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 7px;
    background: #edf3f8;
    color: #52677e;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.rights-badge.warning-1 {
    background: #fff4d8;
    color: #8b6712;
}

.rights-badge.warning-2 {
    background: #fee8e6;
    color: #a84741;
}

.archive-status-icons {
    display: flex;
    gap: 5px;
}

.archive-status-icons span {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 900;
}

.archive-status-icons .ok {
    background: #def3e9;
    color: #277552;
}

.archive-status-icons .warn {
    background: #fff1ce;
    color: #946b08;
}

.archive-status-icons .error,
.process-status.failed {
    background: #fee5e3;
    color: #a6413b;
}

.process-status.succeeded {
    background: #def3e9;
    color: #277552;
}

.process-status.pending,
.process-status.processing {
    background: #fff1ce;
    color: #8a650e;
}

.process-status.none {
    background: transparent;
    color: #a0acba;
}

.archive-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding-top: 24px;
    color: #748399;
}

.archive-pagination a {
    color: #315c84;
    font-weight: 800;
    text-decoration: none;
}

.archive-detail-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.archive-detail-navigation nav {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.archive-detail-navigation a,
.archive-preview-caption a {
    color: var(--navy);
    font-weight: 700;
    text-decoration: none;
}

.archive-detail-navigation nav a,
.archive-detail-navigation nav span {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid #cad7e2;
    border-radius: 9px;
    background: #fff;
    white-space: nowrap;
}

.archive-detail-navigation nav a:hover,
.archive-detail-navigation nav a:focus-visible {
    border-color: #789fc4;
    background: #edf4fa;
}

.archive-detail-navigation nav .disabled {
    color: #9aa8b8;
    cursor: default;
    opacity: 0.65;
}

.archive-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 0.8fr);
    gap: 1.5rem;
    align-items: start;
}

.archive-preview-card,
.archive-metadata-card,
.archive-description-card {
    padding: 2rem;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(20, 42, 68, 0.06);
}

.archive-preview-card video,
.archive-preview-card img,
.archive-preview-card iframe {
    display: block;
    width: 100%;
    max-height: 66vh;
    border: 0;
    border-radius: 16px;
    background: #0d1724;
    object-fit: contain;
}

.archive-preview-card iframe {
    height: 66vh;
    background: #f4f7fa;
}

.archive-preview-card audio {
    width: 100%;
    margin: 3rem 0;
}

.archive-preview-empty {
    padding: 5rem 2rem;
    border-radius: 16px;
    background: var(--surface);
    color: var(--muted);
    text-align: center;
}

.archive-preview-empty form {
    margin-top: 1rem;
}

.archive-preview-caption {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-top: 1rem;
    color: var(--muted);
}

.archive-metadata-card dl {
    margin: 0;
}

.archive-metadata-card dl div {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
}

.archive-metadata-card dt {
    color: var(--muted);
}

.archive-metadata-card dd {
    margin: 0;
    font-weight: 700;
}

.archive-immutable-note {
    margin: 0 0 0.75rem;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.archive-break-value {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.archive-edit-form {
    margin-top: 1.5rem;
    padding: 2rem;
    border-radius: 24px;
}

.archive-edit-grid {
    margin-top: 1.5rem;
}

.archive-edit-wide {
    grid-column: 1 / -1;
}

.archive-edit-badge {
    flex: 0 0 auto;
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    color: #19784f;
    background: #ddf4e9;
    font-size: 0.82rem;
    font-weight: 800;
}

.archive-edit-intro {
    max-width: 940px;
    margin: 1rem 0 0;
    color: var(--muted);
    line-height: 1.65;
}

.archive-relevance-row {
    width: fit-content;
    margin-top: 1.5rem;
}

.archive-save-button {
    width: auto;
    min-width: 220px;
    margin-top: 1.5rem;
}

.archive-readonly-card {
    color: var(--muted);
}

.archive-editorial-summary dl {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin: 1rem 0 0;
}

.archive-editorial-summary dl div {
    padding: 1rem;
    border-radius: 14px;
    background: var(--surface);
}

.archive-editorial-summary dt {
    margin-bottom: 0.35rem;
    color: var(--muted);
    font-size: 0.82rem;
}

.archive-editorial-summary dd {
    margin: 0;
    color: var(--navy);
    font-weight: 800;
}

.archive-description-card {
    margin-top: 1.5rem;
}

.archive-description-card > p:last-child {
    white-space: pre-wrap;
    line-height: 1.7;
}

.archive-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.archive-tag-list span {
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    background: #eef3f7;
    color: var(--navy);
    font-size: 0.9rem;
    font-weight: 700;
}

.archive-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.archive-section-heading h2 {
    margin: 0.3rem 0 0;
    color: var(--navy);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    font-weight: 500;
}

.archive-enrichment-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 1rem 0;
}

.archive-enrichment-buttons form {
    margin: 0;
}

.archive-enrichment-buttons button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.archive-enrichment-status {
    margin: 0.65rem 0 0;
}

.archive-analysis-date {
    margin: 0.75rem 0 1.25rem;
    color: var(--muted);
}

.archive-analysis-text {
    white-space: pre-wrap;
    line-height: 1.7;
}

.archive-title-cell > a {
    color: inherit;
    text-decoration: none;
}

@media (max-width: 980px) {
    .archive-detail-grid {
        grid-template-columns: 1fr;
    }

    .archive-editorial-summary dl {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .archive-edit-form {
        padding: 1.25rem;
    }

    .archive-edit-grid,
    .archive-editorial-summary dl {
        grid-template-columns: 1fr;
    }

    .archive-edit-wide {
        grid-column: auto;
    }

    .archive-section-heading {
        flex-direction: column;
    }

    .archive-save-button {
        width: 100%;
    }
}

.scan-content {
    max-width: 1500px;
}

.scan-start {
    border: 0;
    font: inherit;
    cursor: pointer;
}

.scan-start:disabled {
    cursor: wait;
    opacity: .55;
}

.scan-cancel {
    border: 1px solid #d59a96;
    background: #fff;
    color: #a6413b;
    font: inherit;
    cursor: pointer;
}

.scan-source-card {
    display: grid;
    grid-template-columns: 1fr minmax(320px, auto) auto;
    align-items: center;
    gap: 24px;
    margin-bottom: 26px;
    padding: 24px 28px;
    border: 1px solid #d9e2ea;
    border-radius: 18px;
    background: #fff;
}

.scan-source-card h2,
.scan-current h2,
.scan-groups h2 {
    margin: 5px 0 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 28px;
    font-weight: 400;
}

.scan-source-card code {
    overflow: hidden;
    padding: 11px 14px;
    border-radius: 9px;
    background: #edf3f8;
    color: #315c84;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.read-only-badge {
    padding: 8px 11px;
    border-radius: 999px;
    background: #def3e9;
    color: #277552;
    font-size: 12px;
    font-weight: 800;
}

.scan-current,
.scan-groups,
.scan-history {
    margin-bottom: 26px;
    padding: 30px;
    border: 1px solid #d9e2ea;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 14px 40px rgba(23, 41, 65, .05);
}

.scan-current-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.scan-current-heading p:last-child {
    margin: 9px 0 0;
    color: #748399;
}

.scan-state {
    display: inline-flex;
    padding: 7px 11px;
    border-radius: 999px;
    background: #edf3f8;
    color: #52677e;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.scan-state.running,
.scan-state.pending {
    background: #fff1ce;
    color: #8a650e;
}

.scan-state.succeeded {
    background: #def3e9;
    color: #277552;
}

.scan-state.failed,
.scan-state.cancelled {
    background: #fee5e3;
    color: #a6413b;
}

.scan-metrics {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-top: 26px;
}

.scan-metrics > div {
    padding: 20px;
    border-radius: 14px;
    background: #f4f7fa;
}

.scan-metrics strong,
.scan-metrics span {
    display: block;
}

.scan-metrics strong {
    color: #172941;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 31px;
    font-weight: 400;
}

.scan-metrics span {
    margin-top: 4px;
    color: #7d8b9e;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.scan-time {
    margin-top: 18px;
    color: #8795a7;
    font-size: 13px;
}

.scan-heartbeat {
    margin-top: 18px;
    color: #66788d;
    font-size: 13px;
}

.scan-current-path {
    display: block;
    max-width: 100%;
    margin-top: 10px;
    padding: 11px 13px;
    overflow: hidden;
    border-radius: 10px;
    background: #edf3f8;
    color: #315c84;
    font-family: Consolas, monospace;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scan-groups > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 22px;
}

.scan-groups article {
    padding: 18px;
    border: 1px solid #e2e9ef;
    border-radius: 13px;
}

.scan-groups article strong,
.scan-groups article span {
    display: block;
}

.scan-groups article strong {
    color: #172941;
    font-size: 24px;
}

.scan-groups article span {
    margin-top: 4px;
    color: #7d8b9e;
}

.scan-evaluation-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
    gap: 22px;
}

.scan-evaluation-card {
    padding: 28px 30px;
    border: 1px solid #dce5ed;
    border-radius: 18px;
    background: #fff;
}

.scan-evaluation-card h2 {
    margin: 6px 0 20px;
}

.scan-ranking {
    display: grid;
    gap: 2px;
}

.scan-ranking > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 16px;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid #edf1f5;
}

.scan-ranking span {
    overflow: hidden;
    color: #30445c;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scan-ranking strong {
    color: #172941;
    font-size: 13px;
}

.scan-ranking small {
    min-width: 72px;
    color: #8795a7;
    text-align: right;
}

.unknown-extension-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.unknown-extension-list span {
    padding: 8px 11px;
    border-radius: 999px;
    background: #fff1ce;
    color: #765711;
    font-size: 13px;
}

.unknown-extension-list strong {
    margin-right: 6px;
}

.scan-all-known {
    color: #277552;
}

.scan-history {
    padding: 0;
    overflow: hidden;
}

.scan-history .queue-heading {
    padding: 26px 30px 20px;
}

.scan-history .queue-heading a {
    color: #315c84;
    font-weight: 800;
    text-decoration: none;
}

.job-history-actions,
.job-history-actions form,
.job-history-actions label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.job-history-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.job-history-actions label span {
    color: #66768a;
    font-size: 0.86rem;
    font-weight: 700;
}

.job-history-actions select {
    min-height: 38px;
    min-width: 78px;
}

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

.job-control-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 24px;
}

.job-control-grid .mail-card {
    min-width: 0;
}

.job-control-grid .admin-form {
    display: grid;
    gap: 18px;
    margin-top: 24px;
}

.job-control-grid .admin-form label:not(.checkbox-row) {
    display: grid;
    gap: 8px;
}

.job-control-grid .admin-form input[type="time"],
.job-control-grid .admin-form input[type="email"] {
    width: 100%;
}

.job-progress-list {
    margin: 24px 0;
}

.job-progress-list > div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 0;
    border-bottom: 1px solid #e3e9ef;
}

.job-progress-list dt {
    color: #8a98aa;
}

.job-progress-list dd {
    margin: 0;
    font-weight: 700;
}

.job-error-row td {
    color: #a1433c;
    background: #fff1ef;
}

.job-warning-row td {
    color: #7a5415;
    background: #fff8e6;
}

@media (max-width: 900px) {
    .job-control-grid {
        grid-template-columns: 1fr;
    }
}

.scan-table-wrap table {
    width: 100%;
    border-collapse: collapse;
}

.scan-table-wrap th,
.scan-table-wrap td {
    padding: 15px 22px;
    border-top: 1px solid #e7edf2;
    text-align: left;
}

.scan-table-wrap th {
    color: #7d8b9e;
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.scan-table-wrap td {
    color: #45556a;
    font-size: 14px;
}

.info-banner {
    margin-bottom: 22px;
    padding: 16px 18px;
    border: 1px solid #c8deef;
    border-radius: 12px;
    background: #edf6fc;
    color: #315f83;
}

@media (max-width: 1180px) {
    .user-row {
        grid-template-columns: minmax(240px, 1fr) auto auto;
    }

    .user-row > span:not(.role-badge):not(.status-badge) {
        grid-column: 1 / 2;
    }

    .filter-main {
        grid-template-columns: 120px 1fr 1fr;
    }
}

@media (max-width: 760px) {
    .user-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .user-row > span:not(.role-badge):not(.status-badge),
    .user-row .secondary-link,
    .user-row form {
        grid-column: auto;
        justify-self: start;
    }

    .login-page {
        display: block;
    }

    .brand-panel {
        min-height: 260px;
        padding: 28px;
    }

    .brand-copy {
        margin: 54px 0 0;
    }

    .brand-copy h1 {
        font-size: 35px;
    }

    .brand img {
        width: 118px;
        height: 62px;
    }

    .brand-copy > p:last-child,
    .server-note {
        display: none;
    }

    .form-panel {
        min-height: auto;
        padding: 28px 18px 70px;
    }

    .login-card {
        padding: 28px 23px;
        box-shadow: none;
    }

    .copyright {
        bottom: 24px;
    }

    .setup-card {
        padding: 30px 24px;
    }

    .dashboard-header {
        padding: 0 18px;
    }

    .dashboard-brand span,
    .user-menu > div {
        display: none;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        margin-top: 42px;
    }

    .admin-nav {
        display: none;
    }

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

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

    .form-grid .full-width {
        grid-column: auto;
    }

    .admin-form {
        padding: 22px;
    }

    .copy-field,
    .invite-panel,
    .danger-panel {
        display: block;
    }

    .copy-field button,
    .invite-panel > form button {
        width: 100%;
        margin-top: 8px;
    }

    .danger-panel form button {
        width: 100%;
        margin-top: 14px;
    }

    .mail-overview,
    .mail-entry {
        grid-template-columns: 1fr;
    }

    .mail-entry-meta {
        align-items: flex-start;
    }

    .archive-content {
        width: min(100% - 28px, 1720px);
        padding-top: 34px;
    }

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

    .archive-heading h1 {
        font-size: 40px;
    }

    .filter-main {
        grid-template-columns: 1fr;
    }

    .filter-main.gallery-filter-main {
        grid-template-columns: 1fr;
    }

    .filter-main.gallery-filter-main button {
        width: 100%;
    }

    .scan-source-card {
        grid-template-columns: 1fr;
    }

    .scan-metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    .scan-evaluation-grid {
        grid-template-columns: 1fr;
    }

    .scan-ranking > div {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .scan-ranking small {
        grid-column: 1 / -1;
        text-align: left;
    }

    .filter-main button,
    .reset-filters {
        width: 100%;
    }

    .archive-search-actions,
    .archive-detail-navigation {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .archive-detail-navigation nav {
        width: 100%;
    }

    .archive-detail-navigation nav a,
    .archive-detail-navigation nav span {
        flex: 1;
        justify-content: center;
    }

    .archive-summary {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        padding: 16px 6px;
    }

    .scan-current-heading {
        flex-direction: column;
    }
}
/* Benutzerrechte und Anmeldeprotokoll */
.permission-panel, .login-panel { margin-top: 2rem; padding: 2rem; border: 1px solid #dbe4ec; border-radius: 1.25rem; background: #fff; }
.permission-table, .audit-table { margin-top: 1.25rem; border: 1px solid #dbe4ec; border-radius: 1rem; overflow: hidden; }
.permission-head, .permission-row { display: grid; grid-template-columns: minmax(16rem, 1fr) 7rem 7rem; align-items: center; gap: 1rem; padding: 1rem 1.25rem; }
.permission-head, .audit-head { background: #182f4c; color: #fff; font-weight: 700; }
.permission-row + .permission-row, .audit-entry + .audit-entry { border-top: 1px solid #e4eaf0; }
.permission-row > span { display: flex; flex-direction: column; gap: .25rem; }
.permission-row small, .audit-entry small { color: #8392a6; }
.permission-row label { justify-self: center; }
.permission-row input[type="checkbox"] { width: 1.25rem; height: 1.25rem; accent-color: #f2645a; }
.permission-row input:disabled { opacity: .45; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; }
.audit-list { margin-top: 1rem; }
.audit-row { display: grid; grid-template-columns: 9rem 13rem 1fr; align-items: center; gap: 1rem; padding: .8rem 0; border-top: 1px solid #e4eaf0; }
.audit-head, .audit-entry { display: grid; grid-template-columns: 12rem minmax(14rem, 1fr) 10rem 11rem; align-items: center; gap: 1rem; padding: 1rem 1.25rem; }
.audit-entry > span:nth-child(2) { display: flex; flex-direction: column; gap: .2rem; }
.audit-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 1rem; margin-top: 1.5rem; }
.audit-filters label { display: grid; gap: .4rem; }
.audit-filters label:first-child { flex: 1 1 24rem; }
.audit-filters input, .audit-filters select { min-height: 2.8rem; }
.audit-summary { margin-top: 1.25rem; color: var(--muted); }
.audit-summary strong { color: var(--ink); }
.audit-empty { margin: 0; padding: 1.5rem 1.25rem; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
@media (max-width: 760px) {
  .permission-head, .permission-row { grid-template-columns: minmax(10rem, 1fr) 4rem 4rem; padding: .8rem; }
  .audit-head { display: none; }
  .audit-entry, .audit-row { grid-template-columns: 1fr; }
}
.archive-history-count {
    color: var(--muted);
    font-size: 0.9rem;
}

.archive-history-empty {
    color: var(--muted);
    margin: 1rem 0 0;
}

.archive-history-list {
    display: grid;
    gap: 0.8rem;
    margin-top: 1.2rem;
}

.archive-history-entry {
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

.archive-history-entry summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
}

.archive-history-entry summary > span:first-child {
    display: grid;
    gap: 0.2rem;
}

.archive-history-entry summary small,
.archive-history-entry summary > span:last-child {
    color: var(--muted);
}

.archive-history-entry dl {
    border-top: 1px solid var(--border);
    margin: 0;
    padding: 0 1.15rem;
}

.archive-history-entry dl div {
    display: grid;
    grid-template-columns: minmax(130px, 0.35fr) 1fr;
    gap: 1rem;
    padding: 0.9rem 0;
}

.archive-history-entry dl div + div {
    border-top: 1px solid var(--border);
}

.archive-history-entry dd {
    display: grid;
    gap: 0.35rem;
    margin: 0;
    overflow-wrap: anywhere;
}

.archive-history-old {
    color: var(--muted);
    text-decoration: line-through;
}

.archive-history-new {
    color: var(--ink);
    font-weight: 700;
}

@media (max-width: 700px) {
    .archive-history-entry dl div {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }
}

/* Adressen und zeitlich begrenzte Dateifreigaben */
.share-grid {
    display: grid;
    grid-template-columns: minmax(300px, .8fr) minmax(420px, 1.2fr);
    gap: 1.5rem;
    align-items: start;
}

.content-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 1.6rem;
}

.share-form, .share-form label, .share-items, .address-grid, .share-list {
    display: grid;
    gap: 1rem;
}

.share-form label span { font-weight: 700; }
.share-form input, .share-form select, .share-form textarea {
    width: 100%;
}
.share-form textarea { resize: vertical; }

.share-items { list-style: none; margin: 1rem 0 0; padding: 0; }
.share-items li { display: grid; gap: .3rem; padding: .9rem 0; border-top: 1px solid var(--border); }
.share-items span { color: var(--muted); overflow-wrap: anywhere; }

.address-row, .share-card, .share-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.25rem;
    align-items: center;
}
.address-row.inactive { opacity: .62; }
.address-row > div:last-child, .share-card > div:last-child { display: grid; gap: .7rem; justify-items: end; }
.share-card h2 { margin-bottom: .35rem; }

.archive-share-toolbar {
    align-items: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: .8rem 1rem;
}
.archive-share-toolbar p { margin: 0; color: var(--muted); }
.archive-share-toolbar button { width: auto; }
.archive-share-select { text-align: center; }
.archive-share-select input { accent-color: var(--coral); height: 1.15rem; width: 1.15rem; }
.validation-summary:empty { display: none; }
.validation-summary { color: #a64038; margin-bottom: 1rem; }
.download-page { min-height: 100vh; display: grid; place-items: center; padding: 2rem; }

.share-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.share-summary > div {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    display: grid;
    gap: .25rem;
    padding: 1.2rem 1.35rem;
}
.share-summary strong { color: var(--navy); font-family: Georgia, serif; font-size: 2rem; }
.share-summary span, .share-created, .share-empty-note { color: var(--muted); }
.share-created { font-size: .9rem; margin-bottom: 0; }

.process-status.ready { background: #ddf4e8; color: #1d7650; }
.process-status.packaging, .process-status.pending { background: #fff0c9; color: #916300; }

.face-review-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,260px)); gap:1rem; justify-content:start; margin-top:1.25rem; }
.face-review-item { display:grid; min-width:0; gap:.8rem; padding:.8rem; border:1px solid #e5ded5; border-radius:16px; background:#fff; }
.face-review-item.is-ignored { opacity:.62; background:#f3f0ec; }
.face-review-item img { display:block; width:100%; max-width:100%; aspect-ratio:1; object-fit:cover; border-radius:12px; }
.face-review-item small { display:block; color:#6f675f; margin-top:.2rem; }
.face-review-item form { display:grid; min-width:0; gap:.55rem; margin:0; }
.face-review-item input, .face-review-item select, .face-review-item button { box-sizing:border-box; width:100%; min-width:0; }
.face-review-item input, .face-review-item select { min-height:38px; padding:.45rem .55rem; }
.face-review-item button { justify-content:center; height:auto; min-height:46px; margin:0; padding:.7rem .8rem; text-align:center; }
.process-status.expired, .process-status.revoked { background: #edf1f4; color: #586779; }
.process-status.failed { background: #fee4e1; color: #a64038; }

.share-status-card { align-self: stretch; min-width: min(100%, 330px); }
.share-facts { margin: 1rem 0; }
.share-facts > div {
    display: grid;
    grid-template-columns: minmax(7rem, .6fr) 1fr;
    gap: .8rem;
    padding: .7rem 0;
}
.share-facts > div + div { border-top: 1px solid var(--border); }
.share-facts dt { color: var(--muted); }
.share-facts dd { font-weight: 700; margin: 0; }

.share-download-history { margin-top: 1.5rem; }
.section-title-row { align-items: end; display: flex; justify-content: space-between; gap: 1rem; }
.section-title-row h2 { margin-bottom: 0; }
.section-title-row > span { color: var(--muted); }
.share-download-list { display: grid; margin-top: 1rem; }
.share-download-list article {
    align-items: center;
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: minmax(13rem, .7fr) minmax(0, 1.3fr);
    gap: 1rem;
    padding: .9rem 0;
}
.share-download-list article > div { display: grid; gap: .2rem; min-width: 0; }
.share-download-list span, .share-download-list small { color: var(--muted); }
.share-download-list small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 850px) {
    .share-grid, .address-row, .share-card, .share-detail-grid { grid-template-columns: 1fr; }
    .share-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .address-row > div:last-child, .share-card > div:last-child { justify-items: start; }
    .archive-share-toolbar { align-items: stretch; flex-direction: column; }
    .archive-share-toolbar button { width: 100%; }
    .share-download-list article { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .share-summary { grid-template-columns: 1fr; }
    .share-facts > div { grid-template-columns: 1fr; gap: .2rem; }
}

.gallery-child-section-heading { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-top:2rem; }
.gallery-child-section-heading h2 { margin:0; }
.gallery-child-section-heading a, .gallery-row-edit { color:#fff; background:#f16359; border-radius:999px; padding:.55rem 1rem; text-decoration:none; font-weight:700; white-space:nowrap; }
.gallery-row-edit { display:inline-block; padding:.35rem .7rem; font-size:.82rem; }
.gallery-media-edit { align-self:flex-start; margin:.5rem 0 -.25rem; }
.gallery-child-editor-shell { min-height:calc(100vh - 90px); padding:3rem 5vw; background:#f2f5f8; }
.gallery-child-editor { max-width:1000px; margin:auto; background:#fff; border-radius:24px; padding:2rem; box-shadow:0 20px 60px rgba(19,41,68,.14); }
.gallery-child-editor-heading { display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid #e2e8ee; margin:-.5rem 0 1.5rem; padding-bottom:1rem; }
.gallery-child-editor-heading h1 { margin:0; color:#132944; }
.gallery-child-editor-heading a { font-size:2.5rem; line-height:1; color:#132944; text-decoration:none; }
.gallery-child-editor-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1rem; }
.gallery-child-editor-grid label { display:flex; flex-direction:column; gap:.4rem; color:#708098; }
.gallery-child-editor-grid input { width:100%; box-sizing:border-box; border:1px solid #d6e0e9; border-radius:12px; padding:.75rem; font:inherit; color:#132944; }
.gallery-child-editor-grid .wide { grid-column:span 2; }
.gallery-child-editor-grid .check input { width:auto; align-self:flex-start; }
.gallery-upload-note { color:#708098; margin:0; }
@media (max-width:800px) { .gallery-child-editor-grid { grid-template-columns:1fr 1fr; } .gallery-child-editor-grid .wide { grid-column:1/-1; } }

.woo-admin-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:1.5rem; margin-top:2rem; }
.woo-connection-form { display:grid; gap:1rem; }
.woo-connection-form label { display:grid; gap:.4rem; color:var(--muted); }
.woo-connection-form input { border:1px solid var(--border); border-radius:12px; padding:.8rem; font:inherit; }
.woo-status-list { display:grid; gap:.75rem; }
.woo-status-list div { display:grid; grid-template-columns:10rem 1fr; border-bottom:1px solid var(--border); padding-bottom:.7rem; }
.woo-status-list dt { color:var(--muted); }
.woo-status-list dd { margin:0; font-weight:700; overflow-wrap:anywhere; }
.woo-statistics-card { margin-top:1.5rem; }
.woo-statistics-filter { display:flex; align-items:end; gap:1rem; flex-wrap:wrap; margin:1.25rem 0; }
.woo-statistics-filter label { display:grid; gap:.4rem; color:var(--muted); min-width:14rem; }
.woo-statistics-filter select { border:1px solid var(--border); border-radius:12px; padding:.8rem; background:#fff; font:inherit; color:#132944; }
.woo-statistics-filter button { width:auto; }
.woo-year-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(13rem,1fr)); gap:.8rem; margin:1rem 0 1.5rem; }
.woo-year-grid div { display:grid; gap:.3rem; padding:1rem; border:1px solid var(--border); border-radius:14px; background:#f7fafc; }
.woo-year-grid span,.woo-year-grid small { color:var(--muted); }
.woo-year-grid strong { color:#132944; font-size:1.35rem; }
.woo-chart-wrap { overflow-x:auto; border:1px solid var(--border); border-radius:14px; padding:1rem; margin-bottom:1.25rem; background:#fff; }
.woo-sales-chart { display:block; width:100%; min-width:700px; height:auto; }
.woo-sales-chart rect { fill:#f2635b; rx:6px; }
.woo-sales-chart text { fill:#61738c; font:14px system-ui,sans-serif; }
.woo-statistics-table { min-width:720px; }
.woo-statistics-table td:nth-child(n+2),.woo-statistics-table th:nth-child(n+2) { text-align:right; }
.woo-statistics-generated { color:var(--muted); font-size:.85rem; margin:.8rem 0 0; }
@media(max-width:800px) { .woo-admin-grid { grid-template-columns:1fr; } }
@media(max-width:800px) { .woo-statistics-filter { align-items:stretch; flex-direction:column; } .woo-statistics-filter label,.woo-statistics-filter button { width:100%; } }

.gallery-commerce-warning { background:#fff3e8; color:#8a5325; border-radius:12px; padding:1rem; }
.gallery-product-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1px; background:var(--border); margin-top:1rem; border:1px solid var(--border); }
.gallery-product-stats div { display:grid; gap:.35rem; background:#fff; padding:.8rem; }
.gallery-product-stats span { color:var(--muted); font-size:.82rem; }
.gallery-product-stats strong { color:#132944; }
@media(max-width:800px) { .gallery-product-stats { grid-template-columns:repeat(2,minmax(0,1fr)); } }

.gallery-presentation-editor { display:grid; grid-template-columns:minmax(22rem,.9fr) minmax(24rem,1.1fr); gap:1.5rem; align-items:start; }
.gallery-presentation-image { display:grid; place-items:center; min-height:32rem; overflow:hidden; background:#eef3f7; }
.gallery-presentation-image img { display:block; width:100%; max-height:70vh; object-fit:contain; }
.editorial-form,.editorial-form fieldset { display:grid; gap:1rem; }
.editorial-form fieldset { border:0; padding:0; margin:0; }
.editorial-form label { display:grid; gap:.45rem; color:var(--muted); }
.editorial-form input,.editorial-form textarea { box-sizing:border-box; width:100%; border:1px solid var(--border); border-radius:12px; padding:.85rem; font:inherit; color:#132944; background:#fff; }
.editorial-form .checkbox-line { display:flex; flex-direction:row; align-items:center; gap:.7rem; color:#132944; font-weight:700; }
.editorial-form .checkbox-line input { width:auto; }
.presentation-actions { display:flex; align-items:center; gap:1rem; flex-wrap:wrap; margin-bottom:1.5rem; }
.presentation-actions form { margin-left:auto; }
.presentation-actions button { width:auto; }
.history-entry { border-top:1px solid var(--border); padding:1rem 0; }
.history-entry ul { margin-bottom:0; }
@media(max-width:900px) { .gallery-presentation-editor { grid-template-columns:1fr; } .gallery-presentation-image { min-height:20rem; } }
