@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

:root {
    --bg: #f9f6f0;
    --surface: #fffdf9;
    --card: #ffffff;
    --ink: #342a20;
    --muted: #8a7868;
    --line: #e8dfd2;
    --accent: #b8926a;
    --accent-dark: #8d6a47;
    --milk: #f3eadf;
    --cream: #fff8ef;
    --success: #1f7a52;
    --error: #a73f3f;
    --shadow: 0 24px 50px rgba(109, 84, 55, 0.08);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Montserrat", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.95), transparent 36%),
        linear-gradient(180deg, #ffffff 0%, var(--bg) 60%, #f4ede2 100%);
    -webkit-text-size-adjust: 100%;
}

.pwa-install-banner[hidden] {
    display: none;
}

.pwa-install-banner {
    position: sticky;
    top: 0;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: min(1180px, calc(100% - 20px));
    margin: 12px auto 0;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 253, 249, 0.96);
    box-shadow: 0 16px 34px rgba(109, 84, 55, 0.12);
    backdrop-filter: blur(12px);
}

.pwa-install-copy {
    display: grid;
    gap: 4px;
}

.pwa-install-copy strong {
    font-size: 0.98rem;
}

.pwa-install-copy span {
    color: var(--muted);
    font-size: 0.92rem;
}

.pwa-install-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.pwa-install-button {
    min-width: 120px;
}

.pwa-install-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(243, 234, 223, 0.96);
    color: var(--ink);
    cursor: pointer;
}

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

body.calendar-open {
    overflow: hidden;
}

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

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

.native-select-source {
    display: none;
}

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

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

.admin-shell.narrow {
    width: min(460px, calc(100% - 32px));
}

.admin-login-shell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 32px 0;
}

.admin-login-shell.narrow {
    width: min(520px, calc(100% - 24px));
}

.admin-login-shell .panel {
    width: 100%;
    max-width: 520px;
}

.admin-login-banner-frame {
    margin-bottom: 18px;
}

.admin-login-banner-image {
    min-height: 180px;
    max-height: 220px;
}

.banner-frame,
.panel,
.stat-card,
.card {
    background: rgba(255, 255, 255, 0.9);
    border: 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.banner-section {
    max-width: 980px;
    margin: 0 auto 26px;
}

.banner-frame {
    margin-bottom: 26px;
    overflow: hidden;
    background: transparent;
}

.banner-image,
.banner-fallback {
    display: block;
    width: 100%;
    min-height: 320px;
    max-height: 520px;
    border-radius: calc(var(--radius) - 10px);
}

.banner-image {
    object-fit: cover;
    background: var(--milk);
}

.banner-fallback {
    display: grid;
    place-items: center;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(243, 234, 223, 0.85)),
        repeating-linear-gradient(135deg, rgba(184, 146, 106, 0.06) 0 18px, rgba(255, 255, 255, 0.16) 18px 36px);
}

.banner-badge {
    padding: 16px 28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(184, 146, 106, 0.35);
    font-size: clamp(2rem, 4vw, 3.4rem);
    letter-spacing: 0.06em;
}

.panel {
    width: 100%;
    padding: 34px;
    margin-bottom: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 248, 239, 0.88) 100%);
}

.panel-head {
    margin-bottom: 20px;
}

.panel-head.inline,
.admin-header,
.toolbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: end;
    flex-wrap: wrap;
}

.panel-head h1,
.panel-head h2,
.setting-block h3 {
    margin: 0 0 6px;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.panel-head p,
.hint {
    margin: 0;
    color: var(--muted);
}

.order-form .grid,
.split-grid,
.stats-grid {
    display: grid;
    gap: 16px;
}

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

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

label,
.stack-form {
    display: grid;
    gap: 8px;
}

.stack-form > .button {
    justify-self: start;
}

input,
select,
textarea {
    width: 100%;
    font-size: 16px;
    border: 0;
    border-radius: 16px;
    padding: 13px 15px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    box-shadow: 0 12px 30px rgba(129, 102, 72, 0.08);
}

textarea {
    resize: vertical;
}

.button {
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

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

.button.primary {
    background: var(--accent);
    color: #fffaf5;
}

.button.secondary {
    background: var(--milk);
    color: var(--ink);
}

.button.danger {
    background: rgba(167, 63, 63, 0.14);
    color: var(--error);
}

.alert {
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 18px;
}

.alert.success {
    background: rgba(31, 122, 82, 0.12);
    color: var(--success);
}

.alert.error {
    background: rgba(167, 63, 63, 0.12);
    color: var(--error);
}

.field-error {
    color: var(--error);
}

.honeypot-field {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    z-index: -1;
}

.honeypot-field label,
.honeypot-field input {
    display: block;
    width: 1px;
    min-width: 1px;
    height: 1px;
    min-height: 1px;
    padding: 0;
    margin: 0;
    border: 0;
}

.admin-header {
    margin-bottom: 20px;
}

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

.admin-brand-copy h1 {
    margin: 0;
    font-size: 1.35rem;
}

.admin-brand-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 12px 26px rgba(109, 84, 55, 0.08);
    flex: 0 0 56px;
}

.admin-brand-logo-fallback {
    display: grid;
    place-items: center;
    font-weight: 700;
    color: var(--accent-dark);
}

.admin-brand-word {
    color: var(--muted);
    font-size: 0.74rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.admin-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 14px 28px rgba(109, 84, 55, 0.1);
}

.admin-menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 3px auto;
    border-radius: 999px;
    background: var(--ink);
}

.admin-nav a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--line);
    font-size: 0.92rem;
}

.admin-nav a.active {
    background: var(--accent);
    color: #fffaf5;
}

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

.admin-nav-modal,
.admin-settings-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 20px;
}

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

.admin-nav-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(109, 92, 72, 0.2);
    backdrop-filter: blur(12px);
}

.admin-nav-window {
    position: relative;
    z-index: 1;
    width: min(360px, 100%);
    padding: 18px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(251, 244, 234, 0.94));
    box-shadow: 0 26px 50px rgba(95, 76, 53, 0.14);
}

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

.admin-brand-mobile .admin-brand-logo {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
}

.admin-nav-mobile {
    display: grid;
    gap: 10px;
}

.admin-nav-mobile a {
    display: block;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 24px rgba(129, 102, 72, 0.08);
}

.admin-nav-mobile a.active {
    background: var(--accent);
    color: #fffaf5;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th,
td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    text-align: left;
}

.stack-form.compact {
    gap: 10px;
}

.stack-list {
    display: grid;
    gap: 14px;
}

.card {
    padding: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(250, 245, 238, 0.94));
}

.add-card {
    border: 1px dashed var(--accent);
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox input {
    width: auto;
}

.split-grid {
    grid-template-columns: 1.3fr 1fr;
}

.stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 16px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}

.dashboard-card {
    display: grid;
    gap: 16px;
    padding: 22px;
    height: 100%;
    align-content: start;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(250, 245, 238, 0.94));
    box-shadow: 0 14px 32px rgba(129, 102, 72, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 36px rgba(129, 102, 72, 0.14);
}

.dashboard-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-card-head strong {
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.dashboard-card-metrics {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(96px, 1fr);
    align-content: start;
}

.dashboard-metric-card {
    display: grid;
    gap: 8px;
    height: 100%;
    align-content: space-between;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 24px rgba(129, 102, 72, 0.08);
}

.dashboard-metric-card span {
    color: var(--muted);
}

.dashboard-metric-card strong {
    font-size: 1.15rem;
}

.dashboard-metric-card small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 500;
}

.dashboard-metric-card-wide {
    grid-column: 1 / -1;
}

.dashboard-link-card {
    display: grid;
    height: 100%;
    min-height: 96px;
    align-content: center;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 24px rgba(129, 102, 72, 0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(129, 102, 72, 0.12);
}

.dashboard-link-card-accent {
    background: linear-gradient(180deg, rgba(201, 164, 125, 0.2), rgba(184, 146, 106, 0.16));
    color: var(--ink);
    font-weight: 600;
}

.stat-card {
    padding: 20px;
}

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

.stat-card strong {
    font-size: 1.8rem;
}

.form-panel {
    max-width: 980px;
    margin: 0 auto 24px;
}

.calendar-field {
    position: relative;
}

.calendar-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 13px 15px;
    border: 0;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    box-shadow: 0 12px 30px rgba(129, 102, 72, 0.08);
}

.select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 13px 15px;
    border: 0;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    box-shadow: 0 12px 30px rgba(129, 102, 72, 0.08);
}

.select-display {
    text-align: left;
}

.calendar-icon {
    color: var(--muted);
    font-size: 1rem;
}

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

.calendar-modal,
.chooser-modal,
.contact-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 20px;
}

.calendar-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(109, 92, 72, 0.2);
    backdrop-filter: blur(12px);
    animation: calendarFade 0.28s ease;
}

.calendar-popover,
.chooser-popover {
    position: relative;
    z-index: 1;
    width: min(340px, 100%);
    padding: 18px;
    border: 0;
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff, #fbf4ea);
    box-shadow: 0 26px 50px rgba(95, 76, 53, 0.14);
    animation: calendarFloatIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

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

.chooser-popover {
    max-height: min(80vh, 560px);
    overflow: hidden;
}

.chooser-list {
    display: grid;
    gap: 10px;
    max-height: calc(min(80vh, 560px) - 92px);
    overflow-y: auto;
    padding-right: 4px;
}

.chooser-option {
    width: 100%;
    border: 0;
    border-radius: 16px;
    padding: 14px 16px;
    text-align: left;
    background: rgba(255, 255, 255, 0.96);
    color: var(--ink);
    box-shadow: 0 10px 24px rgba(129, 102, 72, 0.08);
}

.chooser-option.selected {
    background: var(--accent);
    color: #fffaf5;
}

.floating-message-button {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 45;
    width: 62px;
    height: 62px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, #c9a47d, #b8926a);
    color: #fffaf5;
    box-shadow: 0 20px 38px rgba(109, 84, 55, 0.22);
}

.floating-message-icon {
    width: 24px;
    height: 24px;
    line-height: 1;
}

.contact-popover {
    width: min(360px, 100%);
}

.contact-link-card {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    border-radius: 16px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 24px rgba(129, 102, 72, 0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.contact-link-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
}

.contact-link-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(129, 102, 72, 0.12);
}

.calendar-popover-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.calendar-kicker {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 0.76rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.calendar-close {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: var(--cream);
    color: var(--ink);
    font-size: 1.3rem;
    line-height: 1;
    box-shadow: 0 10px 22px rgba(129, 102, 72, 0.08);
}

.calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.calendar-title {
    font-size: 1rem;
    letter-spacing: 0.04em;
}

.calendar-nav {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: var(--cream);
    color: var(--ink);
    box-shadow: 0 10px 22px rgba(129, 102, 72, 0.08);
}

.calendar-weekdays,
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-weekdays {
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 0.82rem;
    text-align: center;
}

.calendar-day,
.calendar-blank {
    min-height: 38px;
}

.calendar-day {
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--ink);
    box-shadow: 0 8px 18px rgba(129, 102, 72, 0.05);
}

.calendar-day.today {
    background: rgba(243, 234, 223, 0.9);
}

.calendar-day.selected {
    background: var(--accent);
    color: #fffaf5;
}

.form-actions {
    margin-top: 20px;
    padding-top: 12px;
}

.form-actions .button {
    min-width: 180px;
}

.statement-filter {
    min-width: 200px;
}

.statement-subnav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 8px 0 18px;
}

.statement-subnav-link {
    display: block;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 24px rgba(129, 102, 72, 0.08);
    font-size: 0.92rem;
}

.statement-subnav-link.active {
    background: var(--accent);
    color: #fffaf5;
}

.statement-section + .statement-section {
    margin-top: 22px;
}

.statement-month-popover {
    width: min(420px, 100%);
}

.statement-month-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.statement-month-button {
    border: 0;
    border-radius: 16px;
    padding: 14px 12px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 24px rgba(129, 102, 72, 0.08);
    color: var(--ink);
}

.statement-month-button.selected {
    background: var(--accent);
    color: #fffaf5;
}

.statement-card-list {
    display: none;
}

.statement-summary-list {
    display: none;
}

.costs-table th:last-child,
.costs-table td:last-child {
    width: 92px;
}

.cost-card-list {
    display: none;
}

.orders-card-list {
    display: none;
}

.orders-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.orders-filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.orders-filter-button {
    min-width: 84px;
    text-align: center;
}

.orders-filter-button.active {
    background: var(--accent);
    color: #fffaf5;
}

.orders-section + .orders-section {
    margin-top: 24px;
}

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

.orders-section-head h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.orders-section-head span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(243, 234, 223, 0.95);
    color: var(--accent-dark);
    box-shadow: 0 10px 24px rgba(129, 102, 72, 0.08);
    font-size: 0.88rem;
    font-weight: 600;
}

.button-small {
    padding: 10px 14px;
    font-size: 0.88rem;
}

.statement-order-card {
    display: grid;
    gap: 10px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 28px rgba(129, 102, 72, 0.08);
}

.statement-order-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.statement-order-row span {
    color: var(--muted);
}

.statement-order-row.wide {
    display: grid;
    gap: 6px;
}

.statement-order-empty {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 28px rgba(129, 102, 72, 0.08);
    color: var(--muted);
}

.order-admin-summary {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.order-action-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.order-mobile-details {
    display: grid;
    gap: 10px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-8px);
    transition: max-height 0.24s ease, opacity 0.22s ease, transform 0.22s ease, margin-top 0.22s ease;
}

.order-mobile-details.is-open {
    max-height: 520px;
    opacity: 1;
    transform: translateY(0);
    margin-top: 4px;
}

.order-choice-window {
    width: min(320px, 100%);
}

.order-choice-list {
    display: grid;
    gap: 10px;
}

.order-choice-button {
    width: 100%;
    padding: 12px 14px;
    border: 0;
    border-radius: 14px;
    text-align: left;
    background: rgba(255, 255, 255, 0.94);
    color: var(--ink);
    box-shadow: 0 10px 24px rgba(129, 102, 72, 0.08);
}

.order-choice-button-danger {
    background: rgba(167, 63, 63, 0.14);
    color: var(--error);
}

.order-choice-list form {
    display: block;
}

.order-modal-window {
    width: min(560px, 100%);
    max-height: min(86vh, 920px);
    overflow-y: auto;
}

.banner-admin-block {
    margin-bottom: 26px;
}

.settings-media-grid {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.settings-media-stack {
    display: grid;
    gap: 20px;
}

.setting-block + .setting-block {
    margin-top: 22px;
}

.settings-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.settings-tabs a {
    display: block;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 24px rgba(129, 102, 72, 0.08);
    font-size: 0.92rem;
}

.settings-tabs a.active {
    background: var(--accent);
    color: #fffaf5;
}

.settings-upload-card {
    align-content: start;
}

.file-input-native {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.file-input-ui {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 30px rgba(129, 102, 72, 0.08);
    cursor: pointer;
}

.file-input-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--milk);
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 500;
}

.file-input-text {
    color: var(--muted);
    font-size: 0.9rem;
}

.settings-list {
    display: grid;
    gap: 10px;
}

.settings-list-item {
    width: 100%;
    padding: 14px 16px;
    border: 0;
    border-radius: 16px;
    text-align: left;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 24px rgba(129, 102, 72, 0.08);
}

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

.cost-actions {
    margin-bottom: 18px;
}

.cost-layout {
    grid-template-columns: 1fr;
}

.settings-modal-window {
    width: min(420px, 100%);
}

.settings-modal-title {
    margin: 0;
}

.settings-preview-card {
    min-height: 160px;
    width: 420px;
    max-width: 100%;
}

.banner-preview-card {
    display: grid;
    place-items: center;
    min-height: 220px;
    height: 220px;
    background: linear-gradient(180deg, #fff, #f7f0e6);
    overflow: hidden;
}

.banner-preview-image {
    width: 100%;
    height: 220px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 18px;
}

.banner-preview-empty {
    color: var(--muted);
}

.admin-logo-preview-card {
    min-height: 160px;
    height: 220px;
}

.admin-logo-preview-image {
    width: 100%;
    height: 220px;
    object-fit: contain;
    border-radius: 18px;
}

.image-preview-trigger {
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
}

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

.admin-image-modal {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: grid;
    place-items: center;
    padding: 20px;
}

.admin-image-window {
    position: relative;
    z-index: 1;
    width: min(920px, 100%);
    padding: 18px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(251, 244, 234, 0.94));
    box-shadow: 0 26px 50px rgba(95, 76, 53, 0.14);
}

.admin-image-stage {
    display: grid;
    place-items: center;
    min-height: 300px;
}

.admin-image-modal-img {
    display: block;
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 18px;
}

@keyframes calendarFade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes calendarFloatIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 900px) {
    body {
        font-size: 14px;
    }

    .pwa-install-banner {
        flex-direction: column;
        align-items: stretch;
        width: calc(100% - 16px);
        margin-top: 8px;
        padding: 12px 14px;
        border-radius: 16px;
    }

    .pwa-install-copy strong {
        font-size: 0.94rem;
    }

    .pwa-install-copy span {
        font-size: 0.88rem;
    }

    .pwa-install-actions {
        width: 100%;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px;
    }

    .pwa-install-button {
        width: 100%;
        min-width: 0;
    }

    .panel {
        padding: 26px 22px;
    }

    .panel-head h1,
    .panel-head h2,
    .setting-block h3,
    .admin-brand-copy h1 {
        font-size: 1.2rem;
    }

    .button,
    .calendar-trigger,
    .select-trigger,
    .settings-side-link,
    .settings-tabs a,
    .admin-nav-mobile a {
        font-size: 0.92rem;
    }

    input,
    select,
    textarea {
        font-size: 16px;
    }

    .split-grid,
    .stats-grid,
    .dashboard-grid,
    .order-form .grid {
        grid-template-columns: 1fr;
    }

    .statement-summary-table,
    .statement-orders-table {
        display: none;
    }

    .statement-summary-list,
    .statement-card-list {
        display: grid;
        gap: 14px;
    }

    .costs-table {
        display: none;
    }

    .cost-card-list {
        display: grid;
        gap: 14px;
    }

    .orders-table-wrap {
        display: none;
    }

    .orders-card-list {
        display: grid;
        gap: 14px;
    }

    .orders-toolbar {
        align-items: stretch;
    }

    .orders-filter-group {
        width: 100%;
    }

    .settings-media-grid {
        grid-template-columns: 1fr;
    }

    .settings-preview-card {
        width: 100%;
    }

    .banner-preview-card,
    .admin-logo-preview-card,
    .banner-preview-image,
    .admin-logo-preview-image {
        height: 180px;
    }

    .settings-password-grid {
        grid-template-columns: 1fr;
    }

    .calendar-popover {
        width: min(92vw, 340px);
    }

    .banner-image,
    .banner-fallback {
        min-height: 180px;
        max-height: 240px;
    }

    .floating-message-button {
        right: 16px;
        bottom: 16px;
        width: 56px;
        height: 56px;
    }

    .admin-nav {
        display: none;
    }

    .admin-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .admin-header {
        align-items: center;
    }
}

@media (min-width: 700px) and (max-width: 900px) {
    .banner-image,
    .banner-fallback {
        min-height: 260px;
        max-height: 320px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .banner-image,
    .banner-fallback {
        min-height: 300px;
        max-height: 380px;
    }
}
