:root {
    color-scheme: light;
    --navy: #081b33;
    --blue: #0c63ce;
    --blue-dark: #084c9f;
    --surface: #ffffff;
    --background: #f3f6fa;
    --border: #dbe3ee;
    --text: #152238;
    --muted: #66758a;
    --danger-bg: #fff0f0;
    --danger: #a82323;
    --success: #18794e;
    --surface-soft: #f8faff;
    --shadow-sm: 0 8px 24px rgb(20 45 80 / 7%);
    --shadow-md: 0 18px 48px rgb(20 45 80 / 11%);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 88% 8%, rgb(12 99 206 / 8%), transparent 28rem),
        var(--background);
    font-family: Inter, Montserrat, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.admin-login {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 80% 10%, rgb(12 99 206 / 20%), transparent 32rem),
        linear-gradient(145deg, #061426, #0a284b);
}

.login-card {
    position: relative;
    overflow: hidden;
    width: min(100%, 430px);
    display: grid;
    gap: 24px;
    padding: 36px;
    border: 1px solid rgb(255 255 255 / 24%);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: 0 34px 84px rgb(0 0 0 / 32%);
}

.login-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: linear-gradient(90deg, #1680ed, #084c9f);
}

.login-brand img,
.admin-header img {
    display: block;
    width: auto;
    max-width: 220px;
    height: 42px;
    object-fit: contain;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 8px;
}

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

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

label {
    margin-top: 6px;
    font-size: 14px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #ced9e8;
    border-radius: 11px;
    color: var(--text);
    background: #fff;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgb(12 99 206 / 12%);
}

textarea {
    resize: vertical;
}

button {
    margin-top: 8px;
    padding: 13px 18px;
    border: 0;
    border-radius: 10px;
    color: white;
    background: var(--blue);
    cursor: pointer;
    font-weight: 800;
    transition: background .18s ease, box-shadow .18s ease, color .18s ease, transform .18s ease;
}

button:hover {
    background: var(--blue-dark);
    transform: translateY(-1px);
}

.alert,
.setup-notice {
    padding: 14px 16px;
    border-radius: 10px;
}

.alert {
    color: var(--danger);
    background: var(--danger-bg);
}

.admin-header {
    position: sticky;
    z-index: 50;
    top: 0;
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 30px;
    border-bottom: 1px solid var(--border);
    background: rgb(255 255 255 / 94%);
    box-shadow: 0 5px 22px rgb(20 45 80 / 6%);
    backdrop-filter: blur(12px);
}

.admin-user,
.admin-user form {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-user > span {
    padding: 9px 13px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-soft);
    font-size: 13px;
    font-weight: 800;
}

.button-secondary {
    margin: 0;
    padding: 9px 14px;
    color: var(--text);
    border: 1px solid var(--border);
    background: #f3f6fa;
}

.button-primary,
.button-secondary {
    gap: 8px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 800;
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease, transform .18s ease;
}

.button-primary {
    padding: 12px 18px;
    color: #fff;
    background: linear-gradient(135deg, #0c6fdf, #084c9f);
    box-shadow: 0 9px 20px rgb(12 99 206 / 22%);
}

.button-primary:hover {
    color: #fff;
    background: linear-gradient(135deg, #0a5fbe, #073f83);
    box-shadow: 0 12px 26px rgb(12 99 206 / 28%);
    transform: translateY(-2px);
}

.button-secondary:hover {
    color: var(--blue-dark);
    border-color: #b8c9dd;
    background: #e8eef6;
    transform: translateY(-1px);
}

.button-create::before {
    content: "+";
    display: grid;
    width: 21px;
    height: 21px;
    place-items: center;
    border-radius: 7px;
    background: rgb(255 255 255 / 18%);
    font-size: 18px;
    line-height: 1;
}

.button-save::before {
    content: "✓";
}

.button-send::before {
    content: "↗";
}

.button-manage::after {
    content: "→";
}

.admin-layout {
    min-height: calc(100vh - 78px);
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
}

.admin-sidebar {
    position: sticky;
    top: 78px;
    min-height: calc(100vh - 78px);
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 26px 18px;
    background:
        radial-gradient(circle at 20% 0%, rgb(24 113 221 / 22%), transparent 18rem),
        linear-gradient(180deg, #0a203c, #06162a);
    box-shadow: 10px 0 30px rgb(8 27 51 / 8%);
}

.admin-sidebar a,
.admin-sidebar span {
    position: relative;
    padding: 12px 14px;
    border-radius: 10px;
    color: #d8e5f5;
    text-decoration: none;
    font-size: 14px;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.admin-sidebar a:hover {
    color: #fff;
    background: rgb(255 255 255 / 8%);
    transform: translateX(3px);
}

.admin-sidebar .active {
    color: white;
    background: linear-gradient(135deg, #1476e5, #0b56ac);
    box-shadow: 0 9px 22px rgb(0 0 0 / 20%);
    font-weight: 800;
}

.admin-sidebar .active::before {
    content: "";
    position: absolute;
    top: 11px;
    bottom: 11px;
    left: -18px;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: #72b2ff;
}

.admin-sidebar span {
    opacity: .55;
}

.admin-content {
    width: 100%;
    max-width: 1440px;
    padding: 42px 46px 56px;
}

.setup-notice {
    margin: 24px 0;
    border: 1px solid #f1cd75;
    background: #fff8df;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 28px;
}

.stat-card,
.next-steps {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.stat-card {
    position: relative;
    overflow: hidden;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.stat-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, #1680ed, #084c9f);
}

.stat-card:hover {
    border-color: #bfd3e9;
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.stat-card span {
    display: block;
    margin-bottom: 12px;
    color: var(--muted);
}

.stat-card strong {
    color: var(--navy);
    font-size: 32px;
}

.next-steps {
    margin-top: 24px;
}

.next-steps > h2 {
    margin-bottom: 18px;
}

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

.dashboard-shortcuts a {
    position: relative;
    min-height: 112px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 18px 48px 18px 18px;
    border: 1px solid #dce6f1;
    border-radius: 13px;
    color: var(--text);
    background: var(--surface-soft);
    text-decoration: none;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.dashboard-shortcuts a:hover {
    border-color: #b7cee7;
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.dashboard-shortcuts span {
    margin-bottom: 5px;
    font-weight: 850;
}

.dashboard-shortcuts small {
    color: var(--muted);
}

.dashboard-shortcuts strong {
    position: absolute;
    top: 50%;
    right: 18px;
    color: var(--blue);
    font-size: 22px;
    transform: translateY(-50%);
}

.admin-page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border);
}

.admin-page-heading h1 {
    font-size: clamp(28px, 3vw, 38px);
    letter-spacing: -.035em;
}

.alert-success {
    color: #176b3a;
    background: #eaf8f0;
}

.admin-panel {
    margin-bottom: 22px;
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.admin-panel > h2 {
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e8edf4;
    font-size: 19px;
}

.admin-only-panel {
    border-color: #b9d2ee;
    background:
        linear-gradient(135deg, rgb(239 247 255 / 88%), #fff 48%);
}

.admin-only-panel > .eyebrow {
    margin-bottom: 4px;
}

.admin-feature-toggle {
    align-self: end;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #cddbeb;
    border-radius: 11px;
    background: #fff;
}

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

.admin-table-wrap {
    overflow-x: auto;
    border: 1px solid #e5ebf3;
    border-radius: 12px;
}

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

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

.admin-table th {
    background: #f5f8fc;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.admin-table tbody tr {
    transition: background .15s ease;
}

.admin-table tbody tr:hover {
    background: #f7faff;
}

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

.admin-featured,
.status-badge {
    display: inline-flex;
    margin-left: 7px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.admin-featured {
    color: #8a4b00;
    background: #fff2d8;
}

.status-badge {
    margin-left: 0;
}

.status-published {
    color: #176b3a;
    background: #e4f7ec;
}

.status-draft {
    color: #715500;
    background: #fff7d7;
}

.status-pending,
.status-pending_review {
    color: #084c9f;
    background: #e7f1ff;
}

.status-rejected,
.status-changes_requested {
    color: #8a4b00;
    background: #fff2d8;
}

.status-not_started {
    color: #66758a;
    background: #edf2f8;
}

.status-active {
    color: #176b3a;
    background: #e4f7ec;
}

.status-inactive {
    color: #66758a;
    background: #edf2f8;
}

.status-archived {
    color: #66758a;
    background: #edf2f8;
}

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

.admin-actions form {
    margin: 0;
}

.button-action {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: 7px 10px;
    border: 1px solid transparent;
    border-radius: 9px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.button-action::before {
    font-size: 14px;
    line-height: 1;
}

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

.button-action-edit {
    color: #075bb8;
    border-color: #c9def7;
    background: #eef6ff;
}

.button-action-edit::before {
    content: "✎";
}

.button-action-edit:hover {
    color: #fff;
    border-color: var(--blue);
    background: var(--blue);
}

.button-action-review {
    color: #5b3b00;
    border-color: #f0d28c;
    background: #fff7df;
}

.button-action-review::before {
    content: "✓";
}

.button-action-review:hover {
    color: #fff;
    border-color: #996500;
    background: #996500;
}

.button-action-view {
    color: #176b3a;
    border-color: #bde5cd;
    background: #ecf9f1;
}

.button-action-view::before {
    content: "↗";
}

.button-action-view:hover,
.button-action-enable:hover {
    color: #fff;
    border-color: var(--success);
    background: var(--success);
}

.button-action-danger {
    color: var(--danger);
    border-color: #f2cccc;
    background: #fff4f4;
}

.button-action-danger::before {
    content: "×";
}

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

.button-action-enable {
    color: var(--success);
    border-color: #bde5cd;
    background: #ecf9f1;
}

.button-action-enable::before {
    content: "✓";
}

.admin-form {
    display: block;
}

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

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
}

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

.company-name-field input {
    font-size: 14px;
}

.form-field small {
    color: var(--muted);
    font-weight: 500;
}

.required-fields-note {
    margin: 0 0 20px;
    padding: 11px 14px;
    border: 1px solid #e2e9f2;
    border-radius: 10px;
    color: #52647a;
    background: #f8fafd;
    font-size: 13px;
}

.required-mark {
    color: var(--danger);
    font-weight: 800;
}

.form-check {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    padding-left: 0;
    cursor: pointer;
}

.form-check input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--blue);
}

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

.selection-grid fieldset {
    display: grid;
    gap: 12px;
    margin: 0;
    align-content: start;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-soft);
}

.selection-grid legend {
    padding: 0 7px;
    font-weight: 800;
}

.selection-grid .form-check {
    padding: 10px 12px;
    border: 1px solid #e0e7f0;
    border-radius: 10px;
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.selection-grid .form-check:hover {
    border-color: #b8cee6;
    box-shadow: 0 5px 14px rgb(20 45 80 / 7%);
    transform: translateY(-1px);
}

.catalog-option-status {
    display: inline-flex;
    margin-left: 5px;
    padding: 2px 6px;
    border-radius: 999px;
    color: #68788c;
    background: #e9eef5;
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
    text-transform: uppercase;
}

.catalog-empty {
    margin: 0;
    padding: 14px;
    border: 1px dashed #cbd7e6;
    border-radius: 10px;
    color: var(--muted);
    background: #fff;
    font-size: 13px;
}

.admin-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 36px;
}

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

.auth-switch {
    margin: 0;
    color: var(--muted);
    text-align: center;
}

.auth-switch a {
    color: var(--blue);
    font-weight: 800;
}

.partner-layout {
    grid-template-columns: 248px minmax(0, 1fr);
}

.partner-summary,
.review-notes,
.moderation-actions {
    margin-top: 24px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.partner-summary {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-color: #c9dcef;
    background:
        radial-gradient(circle at 92% 8%, rgb(12 99 206 / 13%), transparent 18rem),
        linear-gradient(135deg, #fff, #f6faff);
}

.partner-summary::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, #1680ed, #084c9f);
}

.partner-summary h2 {
    margin: 14px 0 8px;
    color: var(--navy);
    font-size: 25px;
}

.partner-summary p,
.review-notes p {
    margin-bottom: 0;
}

.review-notes {
    border-color: #f1cd75;
    background: #fff8df;
    box-shadow: 0 10px 28px rgb(113 85 0 / 8%);
}

.form-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.form-fieldset:disabled {
    opacity: .7;
}

.submission-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--border);
}

.submission-cover {
    width: min(100%, 560px);
    max-height: 320px;
    display: block;
    margin-bottom: 20px;
    border-radius: 12px;
    object-fit: cover;
}

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

.provider-image-field {
    display: grid;
    gap: 12px;
    margin: 0;
}

.provider-image-field > span {
    font-weight: 800;
}

.provider-image-field img {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #edf2f8;
    object-fit: cover;
}

.provider-image-field:nth-child(2) img {
    aspect-ratio: 4 / 3;
}

.crop-modal[hidden] {
    display: none;
}

.crop-modal {
    position: fixed;
    z-index: 1080;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgb(3 12 24 / 82%);
    backdrop-filter: blur(5px);
}

.crop-modal__dialog {
    width: min(100%, 1080px);
    max-height: calc(100vh - 48px);
    overflow: hidden;
    border: 1px solid rgb(255 255 255 / 12%);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 32px 90px rgb(0 0 0 / 42%);
}

.crop-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--border);
}

.crop-modal__heading {
    display: flex;
    align-items: center;
    gap: 14px;
}

.crop-modal__heading .eyebrow {
    margin-bottom: 4px;
}

.crop-modal__heading h2 {
    margin: 0;
    font-size: 22px;
}

.crop-modal__heading p:last-child {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.crop-modal__icon {
    position: relative;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 13px;
    background: #e7f1ff;
}

.crop-modal__icon::before,
.crop-modal__icon::after {
    content: "";
    position: absolute;
    border: 2px solid var(--blue);
}

.crop-modal__icon::before {
    inset: 11px 13px 13px 11px;
    border-top: 0;
    border-right: 0;
}

.crop-modal__icon::after {
    inset: 13px 11px 11px 13px;
    border-bottom: 0;
    border-left: 0;
}

.crop-modal__close {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    margin: 0;
    padding: 0;
    color: var(--text);
    background: #edf2f8;
    font-size: 24px;
    line-height: 1;
}

.crop-modal__close:hover {
    color: #fff;
    background: var(--danger);
}

.crop-modal__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    max-height: calc(100vh - 220px);
    overflow: auto;
    background: #f7f9fc;
}

.crop-modal__workspace {
    min-width: 0;
    padding: 24px;
}

.crop-modal__canvas {
    height: min(56vh, 570px);
    min-height: 360px;
    overflow: hidden;
    border-radius: 14px;
    background:
        linear-gradient(45deg, #172235 25%, transparent 25%),
        linear-gradient(-45deg, #172235 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #172235 75%),
        linear-gradient(-45deg, transparent 75%, #172235 75%),
        #101827;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0;
    background-size: 20px 20px;
}

.crop-modal__canvas img {
    display: block;
    max-width: 100%;
}

.crop-modal__gesture-hint {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.crop-modal__sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 24px;
    border-left: 1px solid var(--border);
    background: var(--surface);
}

.crop-modal__info {
    display: grid;
    gap: 4px;
}

.crop-modal__info span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.crop-modal__info strong {
    overflow-wrap: anywhere;
    font-size: 14px;
}

.crop-modal__info:first-child strong {
    color: var(--blue);
    font-size: 24px;
}

.crop-modal__info small {
    color: var(--muted);
}

.crop-modal__tip {
    margin-top: auto;
    padding: 14px;
    border: 1px solid #cfe1f8;
    border-radius: 12px;
    background: #f1f7ff;
    font-size: 13px;
}

.crop-modal__tip strong {
    color: var(--blue-dark);
}

.crop-modal__tip p {
    margin: 4px 0 0;
    color: var(--muted);
}

.crop-modal__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.crop-modal__footer button {
    min-width: 150px;
    margin: 0;
}

.crop-modal__footer button:disabled {
    opacity: .68;
    background: #8092a8;
    box-shadow: none;
    cursor: wait;
    transform: none;
}

.crop-modal-open {
    overflow: hidden;
}

.submission-details div {
    min-width: 0;
    padding: 16px;
    background: var(--surface);
}

.submission-details dt {
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.submission-details dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.moderation-actions {
    display: grid;
    grid-template-columns: minmax(220px, .6fr) minmax(320px, 1.4fr);
    align-items: start;
    gap: 24px;
}

.moderation-actions .admin-panel {
    margin: 0;
}

.button-danger {
    background: var(--danger);
}

.button-danger:hover {
    background: #7c1717;
}

.button-small {
    padding: 8px 12px;
    font-size: 13px;
}

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

    .admin-sidebar {
        display: none;
    }

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

    .dashboard-shortcuts {
        grid-template-columns: 1fr;
    }

    .admin-content {
        max-width: none;
    }

    .crop-modal__body {
        grid-template-columns: 1fr;
    }

    .crop-modal__sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        border-top: 1px solid var(--border);
        border-left: 0;
    }

    .crop-modal__tip {
        margin-top: 0;
    }
}

.relation-debug-panel {
    border-color: #f0b35a;
    background: #fffaf1;
}

.relation-debug-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.relation-debug-summary article,
.relation-debug-queries {
    padding: 18px;
    border: 1px solid #ead9bd;
    border-radius: 14px;
    background: #fff;
}

.relation-debug-summary h3,
.relation-debug-queries h3 {
    margin: 0 0 12px;
    font-size: 15px;
}

.relation-debug-summary dl,
.relation-debug-summary dl div {
    display: grid;
    gap: 6px;
}

.relation-debug-summary dl {
    margin: 0;
}

.relation-debug-summary dl div {
    grid-template-columns: minmax(130px, 0.8fr) minmax(0, 1.2fr);
    padding: 8px 0;
    border-bottom: 1px solid #f0e8dc;
}

.relation-debug-summary dt {
    font-weight: 700;
}

.relation-debug-summary dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.relation-debug-panel details summary {
    cursor: pointer;
    font-weight: 700;
}

.relation-debug-queries {
    margin-top: 12px;
}

.relation-debug-queries pre {
    max-width: 100%;
    padding: 12px;
    overflow-x: auto;
    border-radius: 10px;
    color: #f8fafc;
    background: #172033;
    white-space: pre-wrap;
}

.relation-debug-queries code {
    font-family: Consolas, "Courier New", monospace;
}

@media (max-width: 560px) {
    .login-card,
    .admin-content {
        padding: 24px;
    }

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

    .admin-user {
        width: 100%;
        justify-content: space-between;
    }

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

    .admin-page-heading,
    .admin-form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .form-grid,
    .selection-grid,
    .provider-image-grid,
    .relation-debug-summary,
    .submission-details,
    .moderation-actions {
        grid-template-columns: 1fr;
    }

    .partner-summary {
        align-items: stretch;
        flex-direction: column;
    }

    .form-field-wide {
        grid-column: auto;
    }

    .relation-debug-summary dl div {
        grid-template-columns: 1fr;
    }

    .crop-modal {
        align-items: end;
        padding: 0;
    }

    .crop-modal__dialog {
        max-height: 96vh;
        border-radius: 20px 20px 0 0;
    }

    .crop-modal__header {
        padding: 18px;
    }

    .crop-modal__icon {
        display: none;
    }

    .crop-modal__heading h2 {
        font-size: 19px;
    }

    .crop-modal__heading p:last-child {
        display: none;
    }

    .crop-modal__body {
        max-height: calc(96vh - 170px);
    }

    .crop-modal__workspace,
    .crop-modal__sidebar {
        padding: 16px;
    }

    .crop-modal__canvas {
        height: 42vh;
        min-height: 270px;
    }

    .crop-modal__sidebar {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .crop-modal__footer {
        padding: 14px 16px;
    }

    .crop-modal__footer button {
        min-width: 0;
        flex: 1;
    }
}
