html[data-theme="light"], :root {
    --prop-bg: #f5f5fa;
    --prop-surface: #fff;
    --prop-soft: #f1f0f8;
    --prop-accent-soft: #eeeaff;
    --prop-text: #18162a;
    --prop-muted: #5c5970;
    --prop-line: #e2e0ec;
    --prop-accent: #5538bd;
    --prop-accent-hover: #42269f;
    --prop-button: #6748d7;
    --prop-shadow: 0 3px 12px #24203c0a;
    --prop-green: #09684f;
    --prop-blue: #3571bd;
    --prop-amber: #99600d;
    --prop-high-bg: #fceaf0;
    --prop-high-text: #9e2851;
}

html[data-theme="dark"] {
    --prop-bg: #151321;
    --prop-surface: #211e32;
    --prop-soft: #29243c;
    --prop-accent-soft: #343054;
    --prop-text: #f4f1ff;
    --prop-muted: #c1bad5;
    --prop-line: #3e3754;
    --prop-accent: #c0acff;
    --prop-accent-hover: #dfd4ff;
    --prop-button: #7555df;
    --prop-shadow: 0 3px 12px #0003;
    --prop-green: #51c9a4;
    --prop-blue: #83b4ff;
    --prop-amber: #f6b964;
    --prop-high-bg: #432438;
    --prop-high-text: #f6adc8;
}

@media (prefers-color-scheme: dark) {
    html:not([data-theme]), html[data-theme="auto"] {
        --prop-bg: #151321;
        --prop-surface: #211e32;
        --prop-soft: #29243c;
        --prop-accent-soft: #343054;
        --prop-text: #f4f1ff;
        --prop-muted: #c1bad5;
        --prop-line: #3e3754;
        --prop-accent: #c0acff;
        --prop-accent-hover: #dfd4ff;
        --prop-button: #7555df;
        --prop-shadow: 0 3px 12px #0003;
        --prop-green: #51c9a4;
        --prop-blue: #83b4ff;
        --prop-amber: #f6b964;
        --prop-high-bg: #432438;
        --prop-high-text: #f6adc8;
    }
}

body.prop-admin {
    --body-bg: var(--prop-surface);
    --body-fg: var(--prop-text);
    --body-quiet-color: var(--prop-muted);
    --body-loud-color: var(--prop-text);
    --hairline-color: var(--prop-line);
    --border-color: var(--prop-line);
    --darkened-bg: var(--prop-soft);
    --selected-bg: var(--prop-soft);
    --selected-row: var(--prop-accent-soft);
    --link-fg: var(--prop-accent);
    --link-hover-color: var(--prop-accent-hover);
    --link-selected-fg: var(--prop-accent-hover);
    --secondary: var(--prop-button);
    --button-bg: var(--prop-button);
    --button-hover-bg: #5235b2;
    --default-button-bg: var(--prop-button);
    --default-button-hover-bg: #5235b2;
    --breadcrumbs-bg: var(--prop-bg);
    --breadcrumbs-fg: var(--prop-muted);
    --breadcrumbs-link-fg: var(--prop-accent);
    --primary-fg: var(--prop-text);
    --primary: var(--prop-soft);
    color: var(--prop-text);
    background: var(--prop-bg);
    font: 15px/1.5 "Inter", "Segoe UI", system-ui, sans-serif;
}

.prop-admin *, .prop-admin *::before, .prop-admin *::after { box-sizing: border-box; }
.prop-admin :focus-visible { outline: 2px solid var(--prop-accent); outline-offset: 3px; }
.prop-admin h1, .prop-admin h2, .prop-admin h3 { color: var(--prop-text); }
.prop-admin #container { min-width: 0; }
.prop-admin #header {
    min-height: 72px; padding: 12px 28px; color: var(--prop-text);
    background: var(--prop-surface); border-bottom: 1px solid var(--prop-line);
    gap: 12px; overflow: visible; position: relative; z-index: 5;
    flex-direction: row; justify-content: space-between;
}
.prop-admin #branding { display: flex; align-items: center; gap: 10px; min-width: 0; }
.prop-admin #header .prop-brand {
    color: var(--prop-text); display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
    font-size: 19px; letter-spacing: -.045em;
}
.prop-brand strong > span { color: var(--prop-accent); }
.prop-brand-mark {
    width: 36px; height: 36px; display: inline-grid; place-items: center;
    flex: none; color: #fff; border-radius: 11px;
    background: linear-gradient(145deg, #876aff, #4d29a7);
    box-shadow: 0 4px 10px #5c39d343;
}
.prop-icon { display: block; flex: none; }
.prop-header-actions { display: flex; gap: 12px; align-items: center; }
.prop-header-actions .theme-toggle, .prop-icon-button {
    width: 44px; height: 44px; border: 1px solid var(--prop-line); border-radius: 10px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center; background: var(--prop-surface); color: var(--prop-text);
}
.prop-admin #header .theme-toggle svg { fill: var(--prop-muted); color: var(--prop-surface); width: 20px; height: 20px; }
.prop-icon-button:hover, .prop-header-actions .theme-toggle:hover { background: var(--prop-soft); }
.prop-mobile-menu { display: none; }
.prop-profile { position: relative; }
.prop-profile summary {
    display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 8px;
    border: 1px solid var(--prop-line); border-radius: 12px; cursor: pointer; font-weight: 650; list-style: none;
}
.prop-profile summary::-webkit-details-marker { display: none; }
.prop-profile summary > .prop-icon { width: 15px; height: 15px; color: var(--prop-muted); }
.prop-avatar {
    width: 29px; height: 29px; border-radius: 9px; display: grid; place-items: center;
    background: var(--prop-accent-soft); color: var(--prop-accent);
}
.prop-profile-menu {
    position: absolute; inset-inline-end: 0; top: calc(100% + 7px); width: 184px; padding: 6px;
    border: 1px solid var(--prop-line); border-radius: 12px; box-shadow: var(--prop-shadow);
    background: var(--prop-surface);
}
.prop-admin #header .prop-profile-menu :is(a, button) {
    display: flex; align-items: center; min-height: 44px; width: 100%; padding: 8px 10px; border: 0;
    border-radius: 8px; background: none; color: var(--prop-text); font: inherit; text-align: start;
}
.prop-admin #header .prop-profile-menu :is(a, button):hover { background: var(--prop-soft); }
.prop-admin #main { align-items: stretch; min-width: 0; }
.prop-sidebar {
    flex: 0 0 228px; width: 228px; padding: 18px 12px;
    border-inline-end: 1px solid var(--prop-line); background: var(--prop-surface);
    align-self: flex-start; position: sticky; top: 0; max-height: 100dvh; overflow: auto;
    scrollbar-width: thin;
}
.prop-nav-group { margin-top: 17px; }
.prop-nav-group h2 {
    margin: 0 0 4px; padding: 0 11px; color: var(--prop-muted); font-size: 11px;
    font-weight: 750; line-height: 1.6; text-transform: uppercase; letter-spacing: .1em;
}
.prop-admin a.prop-nav-link {
    display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 7px 10px;
    border: 1px solid transparent; border-radius: 9px; color: var(--prop-muted);
    font-size: 13px; font-weight: 620; line-height: 1.25;
}
.prop-nav-link .prop-icon { width: 17px; height: 17px; }
.prop-admin a.prop-nav-link:hover { color: var(--prop-text); background: var(--prop-soft); }
.prop-admin a.prop-nav-link[aria-current] {
    color: var(--prop-accent); background: var(--prop-accent-soft); font-weight: 750;
    border-inline-start-color: var(--prop-accent);
}
.prop-admin #content-start { min-width: 0; flex: 1; background: var(--prop-bg); }
.prop-admin #content { padding: 28px clamp(16px, 3vw, 44px) 40px; min-width: 0; }
.prop-admin #content > h1 { font-size: clamp(26px, 3vw, 34px); letter-spacing: -.035em; font-weight: 750; }
.prop-admin #content > h2 { font-size: 18px; font-weight: 650; }
.prop-admin div.breadcrumbs { padding: 10px 28px; border-bottom: 1px solid var(--prop-line); font-size: 13px; }
.prop-admin a.section:link, .prop-admin a.section:visited { color: var(--prop-text); }
.prop-admin .module h2, .prop-admin .module caption, .prop-admin .inline-group h2 {
    color: var(--prop-text); background: var(--prop-soft); font-weight: 700;
}
.prop-admin .module { border-radius: 12px; }
.prop-admin .module.aligned .form-row { padding: 13px 17px; }
.prop-admin .module.aligned h2 { padding: 14px 17px; border-radius: 12px 12px 0 0; }
.prop-admin .module.aligned .description { padding: 9px 17px; color: var(--prop-muted); }
.prop-admin fieldset.module, .prop-admin .inline-group, .prop-admin #changelist {
    background: var(--prop-surface); border: 1px solid var(--prop-line); border-radius: 13px;
}
.prop-admin :is(input:not([type="checkbox"],[type="radio"],[type="hidden"],[type="submit"],[type="button"]), select, textarea) {
    min-height: 36px; max-width: 100%; border-radius: 8px; font: inherit;
}
.prop-admin .submit-row { border-color: var(--prop-line); background: var(--prop-surface); border-radius: 12px; }
.prop-admin :is(input[type="submit"], .object-tools a, .button, #changelist .actions button) { border-radius: 9px; }
.prop-admin .object-tools a { display: flex; align-items: center; min-height: 36px; background: var(--prop-button); color: #fff; }
.prop-admin .object-tools a:hover { background: var(--button-hover-bg); }
.prop-admin #changelist { gap: 0; }
.prop-admin #changelist .changelist-form-container { min-width: 0; }
.prop-admin #changelist :is(#toolbar, .actions, .paginator) { padding: 12px 15px; }
.prop-admin #changelist #toolbar input[type="submit"] {
    min-height: 36px; padding: 5px 14px; background: var(--prop-button); color: #fff; border: 0;
}
.prop-admin #changelist-filter { background: var(--prop-soft); border-radius: 0 12px 12px 0; margin: 0; }
.prop-admin #changelist .results { overflow: auto; margin: 0; }
.prop-admin #result_list th, .prop-admin #result_list td { padding: 12px 10px; }
.prop-admin #result_list thead :is(td, th) { background: var(--prop-soft); }
.prop-admin #result_list tbody tr:hover { background: var(--prop-accent-soft); }
.prop-admin ul.messagelist { padding: 12px clamp(16px, 3vw, 44px) 0; }
.prop-admin ul.messagelist li { border-radius: 9px; }

.prop-dashboard #content { max-width: 1500px; margin-inline: auto; }
.prop-hero {
    isolation: isolate; position: relative; display: flex; align-items: center; min-height: 228px;
    padding: clamp(24px, 4vw, 38px); overflow: hidden; border-radius: 20px;
    color: #f5efff; background: radial-gradient(ellipse at 85% 100%, #45308b, transparent 70%), #241a49;
    box-shadow: 0 12px 30px #2d1d532c;
}
.prop-hero > div:first-child { z-index: 1; }
.prop-hero h1 { color: #fff; margin: 9px 0 7px; font-weight: 760; letter-spacing: -.045em; font-size: clamp(31px, 4vw, 47px); line-height: 1.06; }
.prop-hero p { color: #e8e0f6; margin: 0 0 18px; font-size: 14px; line-height: 1.5; }
.prop-hero p.prop-hero-date { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 690; }
.prop-hero-date span { background: #c7adff; height: 7px; width: 7px; border-radius: 50%; }
.prop-hero-art { position: absolute; inset: 0; overflow: hidden; pointer-events: none; opacity: .8; z-index: -1; }
.prop-hero-art div {
    position: absolute; inset-inline-end: -40px; top: -103px; width: 370px; height: 440px; border-radius: 44%;
    border: 1px solid #b194ff60; transform: rotate(44deg); background: linear-gradient(135deg, #a382fc20, #f4efff00 75%);
}
.prop-hero-art div:nth-child(2) { inset-inline-end: 1px; top: -72px; }
.prop-hero-art div:nth-child(3) { inset-inline-end: 42px; top: -41px; }
.prop-admin .prop-action {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px;
    padding: 7px 13px; border: 1px solid var(--prop-line); border-radius: 9px; background: var(--prop-surface);
    color: var(--prop-accent); font: inherit; font-size: 13px; font-weight: 710; white-space: nowrap;
}
.prop-admin :is(.prop-action.primary, .prop-action.prop-hero-action) { background: var(--prop-button); color: #fff; border-color: transparent; }
.prop-admin .prop-action.prop-hero-action { background: #eee6ff; color: #412581; }
.prop-admin .prop-action:hover { border-color: currentColor; }
.prop-admin .prop-action .prop-icon { width: 17px; height: 17px; }
.prop-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(155px, 100%), 1fr)); gap: 14px; margin-top: 18px; }
.prop-admin a.prop-metric, .prop-panel {
    min-width: 0; background: var(--prop-surface); border: 1px solid var(--prop-line);
    border-radius: 15px; box-shadow: var(--prop-shadow); padding: 17px;
}
.prop-admin a.prop-metric { display: flex; flex-direction: column; gap: 3px; color: var(--prop-text); }
.prop-admin a.prop-metric:hover { border-color: var(--prop-accent); }
.prop-metric-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; color: var(--prop-accent); }
.prop-metric-top > .prop-icon { width: 16px; height: 16px; }
.prop-tile-icon {
    display: inline-grid; place-items: center; width: 37px; height: 37px; flex: none;
    border-radius: 10px; background: var(--prop-accent-soft); color: var(--prop-accent);
}
.prop-tile-icon .prop-icon { width: 19px; height: 19px; }
.prop-metric-label { font-size: 13px; font-weight: 650; }
.prop-metric strong { font-size: 29px; line-height: 1.18; font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
.prop-metric small, .prop-event-list small { color: var(--prop-muted); font-size: 12px; }
.prop-dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 16px; margin-top: 18px; }
.prop-dashboard-grid:has(> :nth-child(2)) { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.prop-widget-heading { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; }
.prop-widget-heading h2, .prop-panel h2 { margin: 0; font-size: 17px; font-weight: 740; letter-spacing: -.02em; }
.prop-widget-heading p { margin: 3px 0 0; color: var(--prop-muted); font-size: 12px; }
.prop-admin .prop-text-action { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 690; font-size: 13px; }
.prop-admin .prop-mobile-filter { display: none; }
.prop-text-action .prop-icon { width: 15px; height: 15px; }
.prop-event-list, .prop-delivery-list { padding: 0; margin: 12px 0 0; }
.prop-event-list li, .prop-delivery-list li { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--prop-line); }
.prop-event-list li:last-child, .prop-delivery-list li:last-child { border-bottom: 0; }
.prop-admin :is(.prop-event-list, .prop-delivery-list) a {
    display: grid; align-items: center; gap: 9px; padding: 9px 2px; min-height: 48px; color: var(--prop-text);
}
.prop-admin .prop-event-list a { grid-template-columns: 45px minmax(0, 1fr) auto; }
.prop-admin .prop-delivery-list a { grid-template-columns: 10px minmax(0, 1fr) auto; }
.prop-admin :is(.prop-event-list, .prop-delivery-list) a:hover { color: var(--prop-accent); }
.prop-event-list span :is(strong, small) { display: block; overflow-wrap: anywhere; }
.prop-event-time strong { font-variant-numeric: tabular-nums; }
.prop-event-title strong { font-size: 13px; }
.prop-pill { border-radius: 999px; padding: 4px 8px; color: var(--prop-accent); background: var(--prop-accent-soft); font-size: 11px; font-weight: 700; }
.prop-pill.prop-pill-high { color: var(--prop-high-text); background: var(--prop-high-bg); }
.prop-pill.prop-pill-warning { color: var(--prop-amber); background: var(--prop-soft); }
.prop-pill.prop-pill-success { color: var(--prop-green); background: var(--prop-soft); }
.prop-status-line { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.prop-empty { display: grid; place-items: center; padding: 29px 8px; color: var(--prop-muted); text-align: center; }
.prop-empty p { margin: 6px 0 0; }
.prop-status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--prop-accent); }
.prop-status-dot.green { background: var(--prop-green); }
.prop-status-dot.blue { background: var(--prop-blue); }
.prop-status-dot.amber { background: var(--prop-amber); }
.prop-widget-footer { margin-top: 7px; }

.prop-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.prop-review-actions { margin-top: 16px; justify-content: flex-start; }
.prop-stack { display: grid; gap: 16px; }
.prop-health { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.prop-health dt, .prop-health dd { margin: 0; overflow-wrap: anywhere; }
.prop-health dt { font-weight: 680; }
.prop-table-scroll, .prop-admin .inline-group .tabular { overflow-x: auto; }
.prop-compare { width: 100%; }
.prop-compare th small { display: block; color: var(--prop-accent); font-weight: 650; }
.prop-compare th, .prop-compare td { padding: 10px; }
.prop-compare td { min-width: 135px; white-space: pre-wrap; overflow-wrap: anywhere; }
.prop-diff { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 30rem; overflow: auto; background: var(--prop-soft); border: 1px solid var(--prop-line); border-radius: 9px; padding: 12px; }
.prop-candidate { border-bottom: 1px solid var(--prop-line); padding-bottom: 12px; }

.prop-login #content { display: grid; place-items: center; min-height: calc(100dvh - 75px); }
.prop-login-shell {
    border: 1px solid var(--prop-line); display: grid; grid-template-columns: 1fr 1fr; width: min(800px, 100%);
    border-radius: 21px; overflow: hidden; background: var(--prop-surface); box-shadow: var(--prop-shadow);
}
.prop-login-intro {
    display: flex; align-items: end; position: relative; isolation: isolate; padding: 34px; min-height: 390px;
    color: #e8e0f6; background: radial-gradient(ellipse at 100% 0%, #4b3492, transparent 70%), #241a49;
}
.prop-login-intro h2 { color: #fff; font-size: 25px; letter-spacing: -.04em; margin: 12px 0 6px; }
.prop-login-intro p { margin: 0; }
.prop-login-form { display: flex; flex-direction: column; justify-content: center; padding: clamp(22px, 4vw, 38px); }
.prop-login-form h1 { margin-bottom: 4px; font-size: 28px; font-weight: 750; }
.prop-login-form > p { color: var(--prop-muted); margin: 4px 0 18px; }
.prop-form-field { margin-bottom: 13px; }
.prop-form-field label { display: block; font-weight: 650; margin-bottom: 5px; }
.prop-admin .prop-login-form input { width: 100%; min-height: 44px !important; }
.prop-login-form form button { width: 100%; margin-top: 4px; }

@media (max-width: 1060px) {
    .prop-dashboard-grid:has(> :nth-child(2)) { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
    .prop-admin #header { min-height: 62px; padding: 8px 13px; flex-wrap: nowrap; gap: 6px; }
    .prop-admin #header .prop-brand { font-size: 17px; gap: 7px; }
    .prop-admin #branding { gap: 6px; }
    .prop-admin .prop-brand-mark { width: 31px; height: 31px; }
    .prop-admin #main { display: block; }
    .prop-sidebar { width: auto; max-height: 53dvh; position: static; border-inline-end: 0; border-bottom: 1px solid var(--prop-line); }
    .prop-nav-ready .prop-mobile-menu { display: inline-flex; }
    .prop-nav-ready:not(:has(#prop-nav-toggle[aria-expanded="true"])) .prop-sidebar { display: none; }
    .prop-admin #content { padding: 17px 14px 27px; }
    .prop-admin div.breadcrumbs { padding-inline: 14px; }
    .prop-profile-name { display: none; }
    .prop-header-actions { gap: 6px; }
    .prop-admin #changelist-filter { border-radius: 12px; }
    .prop-admin .prop-mobile-filter { display: inline-flex; margin-inline: 15px; }
    .prop-hero-art { opacity: .5; }
}
@media (max-width: 530px) {
    .prop-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
    .prop-dashboard-grid { margin-top: 12px; }
    .prop-admin a.prop-metric, .prop-panel { padding: 13px; }
    .prop-login-shell { grid-template-columns: 1fr; }
    .prop-login-intro { min-height: 136px; padding: 19px; }
    .prop-health { grid-template-columns: 1fr; }
    .prop-health dd { margin-bottom: 8px; }
}

.prop-language-button {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding: 0 10px; border: 1px solid var(--prop-line);
    border-radius: 10px; background: var(--prop-surface); color: var(--prop-text);
    font: inherit; font-weight: 650;
}
.prop-language-button:hover { background: var(--prop-soft); }
.prop-language-button abbr { display: none; text-decoration: none; }
html[dir="rtl"] .prop-icon--arrow { transform: scaleX(-1); }
html[dir="rtl"] .prop-admin #changelist-filter { border-radius: 12px 0 0 12px; }
html[dir="rtl"] .prop-nav-group h2 { letter-spacing: 0; }
html[dir="rtl"] .prop-brand { direction: ltr; }
html[dir="rtl"] .prop-admin :is(.prop-hero h1, #content > h1, .prop-widget-heading h2) { letter-spacing: 0; }
html[dir="rtl"] .prop-compare :is(td, th) { text-align: start; }
@media (max-width: 780px) {
    .prop-language-button { min-width: 44px; padding: 0 6px; }
    .prop-language-button span, .prop-profile summary > .prop-icon { display: none; }
    .prop-language-button abbr { display: inline; }
    html[dir="rtl"] .prop-admin #changelist-filter { border-radius: 12px; }
}
@media (max-width: 360px) {
    .prop-admin #header .prop-brand-mark { display: none; }
}
