:root {
    --ink: #271f22;
    --muted: #82777a;
    --green: #762f43;
    --line: #e9e1e2;
    --paper: #f7f4f2;
    --orange: #a56a45;
    --wine: #762f43;
    --wine-deep: #542234;
    --wine-dark: #311d26;
    --rose: #f4e8eb;
    --surface: #fff;
    --shadow: 0 8px 26px #36202b0a;
}

* { scrollbar-color: #cbb9bd transparent; }

body {
    color: var(--ink);
    background: var(--paper);
    font-family: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
    letter-spacing: 0;
}

a { color: var(--wine); }
a:hover { color: var(--wine-deep); }

.sidebar {
    z-index: 20;
    width: 258px;
    padding: 26px 16px 18px;
    color: #f7eef0;
    background: linear-gradient(180deg, #39202b 0%, #2e1b24 100%);
    border: 0;
    box-shadow: 8px 0 34px #2b172214;
}

.sidebar .brand {
    min-height: 53px;
    padding: 0 10px 24px;
    color: #fff;
    border-bottom: 1px solid #ffffff19;
    font-size: 15px;
    letter-spacing: 0;
    gap: 12px;
}

.sidebar .brand img {
    width: 41px;
    height: 41px;
    padding: 3px;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
}

.brand-copy { display: flex; flex-direction: column; gap: 3px; }
.brand-copy b { font-size: 16px; letter-spacing: .01em; }
.brand-copy small { color: #c7adb5; font-size: 9px; font-weight: 700; letter-spacing: .16em; }
.sidebar .nav-label { margin: 24px 12px 12px; color: #bca4ac; font-size: 9px; font-weight: 700; letter-spacing: .16em; }
.sidebar nav { gap: 7px; }
.sidebar nav > a { align-items: center; padding: 11px 12px; color: #dbcbd0; border-radius: 10px; font-size: 13px; font-weight: 600; transition: background .16s ease, color .16s ease; }
.sidebar nav > a:hover, .sidebar nav > a.active { color: #fff; background: #ffffff19; }
.sidebar nav > a.active { box-shadow: inset 3px 0 #d995a8; }
.nav-group { margin: 2px 0; }
.nav-group summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    color: #dbcbd0;
    border-radius: 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 650;
    list-style: none;
    transition: background .16s ease, color .16s ease;
}
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::after { content: "+"; color: #bca4ac; font-size: 16px; }
.nav-group[open] summary::after { content: "−"; }
.nav-group summary:hover, .nav-group[open] summary { color: #fff; background: #ffffff12; }
.sidebar nav .nav-group-links { gap: 3px; padding: 4px 0 7px 8px; }
.sidebar nav .nav-group-links a { align-items: center; padding: 8px 10px; color: #cbb8be; border-radius: 8px; font-size: 12px; }
.sidebar nav .nav-group-links a:hover { color: #fff; background: #ffffff12; }
.sidebar nav .nav-group-links a.active { color: #fff; background: #762f43; box-shadow: 0 5px 14px #1c0c1270; }
.sidebar-bottom { margin: auto 4px 0; padding: 14px 10px 0; color: #d3bfc5; border-top: 1px solid #ffffff19; font-size: 10px; line-height: 1.8; }
.sidebar-bottom small { color: #a99098; font-size: 10px; }
.status-dot { background: #77c49d; }

.shell { min-height: 100vh; margin-left: 258px; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    height: 70px;
    padding: 0 38px;
    color: var(--ink);
    background: #fffcfbf2;
    border-bottom: 1px solid #e9e1e2;
    box-shadow: 0 4px 18px #301c2607;
    backdrop-filter: blur(14px);
}
.topbar-start, .breadcrumbs, .user-menu { display: flex; align-items: center; }
.topbar-start { gap: 16px; }
.breadcrumbs { flex-direction: column; align-items: flex-start; gap: 2px; }
.breadcrumbs span { color: #9a8d90; font-size: 9px; font-weight: 750; letter-spacing: .15em; }
.breadcrumbs b { color: #3a2a30; font-size: 14px; font-weight: 650; letter-spacing: 0; }
.user-menu { gap: 12px; color: #66585d; font-size: 12px; letter-spacing: 0; }
.user-menu form { margin: 0 0 0 6px; }
.user-name { font-weight: 650; }
.today { padding-right: 14px; color: #8b7e82; border-right: 1px solid var(--line); font-size: 11px; }
.user-avatar { display: grid; width: 34px; height: 34px; place-items: center; color: #fff; background: var(--wine); border-radius: 50%; font-size: 13px; font-weight: 700; }
.sidebar-toggle { display: none; }

main { max-width: 1680px; padding: 34px 40px 54px; }
footer { padding: 19px 40px; color: #988b8e; border-color: #e9e1e2; font-size: 10px; }
.page-head { align-items: center; margin: 4px 0 27px; }
.page-head h1 { margin-bottom: 7px; color: #30242a; font-size: clamp(26px, 2.4vw, 34px); font-weight: 700; letter-spacing: -.045em; }
.page-head p.subtitle { max-width: 760px; color: #84787b; font-size: 13px; line-height: 1.6; }
.eyebrow { margin-bottom: 8px; color: #8d4258; font-size: 9px; font-weight: 750; letter-spacing: .17em; }
h2 { color: #36272d; font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
h3 { color: #44343a; font-weight: 650; }

button, .button {
    min-height: 39px;
    padding: 9px 16px;
    color: #fff;
    background: linear-gradient(135deg, #81394e, #6d2b40);
    border: 1px solid #762f43;
    border-radius: 9px;
    box-shadow: 0 4px 10px #762f4319;
    font-size: 12px;
    font-weight: 650;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
button:hover, .button:hover { color: #fff; background: #5e2435; box-shadow: 0 7px 15px #762f4324; transform: translateY(-1px); }
.secondary { color: #58474d; background: #fff; border-color: #e3d9dc; box-shadow: none; }
.secondary:hover { color: #63273b; background: #faf4f5; border-color: #d7c3ca; }
.destructive { color: #fff; background: #a33131; border-color: #8d2929; box-shadow: 0 4px 10px #a3313119; }
.destructive:hover { color: #fff; background: #842626; border-color: #842626; }
.small { min-height: 31px; padding: 5px 10px; border-radius: 7px; font-size: 11px; }
.text-button { min-height: auto; padding: 3px 0; color: #7a3348; background: transparent; border: 0; box-shadow: none; }
.text-button:hover { color: #542234; background: transparent; box-shadow: none; transform: none; }
.actions { gap: 10px; }

.cards { gap: 16px; margin: 23px 0; }
.card, .panel {
    background: var(--surface);
    border: 1px solid #e9e1e2;
    border-radius: 14px;
    box-shadow: var(--shadow);
}
.card { position: relative; overflow: hidden; padding: 20px 21px; }
.card .label { color: #887b7f; font-size: 11px; font-weight: 600; }
.card .value { margin: 11px 0 8px; color: #32242a; font-size: 29px; font-weight: 700; letter-spacing: -.045em; }
.card .foot { color: #998d90; font-size: 10px; }
.card.accent { color: #fff; background: linear-gradient(135deg, #863c53 0%, #5b2639 100%); border-color: #712d42; }
.card.accent::after { position: absolute; right: -20px; bottom: -55px; width: 150px; height: 150px; border: 1px solid #ffffff23; border-radius: 50%; content: ""; box-shadow: 0 0 0 18px #ffffff0b, 0 0 0 38px #ffffff08; }
.card.accent .label, .card.accent .foot { color: #ead9df; }
.card.accent .value { color: #fff; }
.panel { margin-bottom: 20px; padding: 23px 24px; }
.panel-header { margin-bottom: 17px; }
.panel-header h2 { margin: 0; }
.panel-header .muted { font-size: 11px; }

.table-wrap { border: 1px solid #eee7e8; border-radius: 10px; }
table { font-size: 12px; }
th { color: #87797d; background: #faf7f6; font-size: 9px; font-weight: 750; letter-spacing: .08em; }
th, td { padding: 12px 13px; border-bottom-color: #f0e9ea; }
tbody tr { transition: background .12s ease; }
tbody tr:hover { background: #fdfaf9; }
tbody tr:last-child td { border-bottom: 0; }
td { color: #51454a; }
td b, td strong { color: #34262c; }
td.numeric, th.numeric { font-variant-numeric: tabular-nums; }
.empty { color: #918589; }
.badge { padding: 5px 9px; color: #6b2b40; background: #f5e9ec; border-radius: 20px; font-size: 10px; font-weight: 700; }
.badge.amber { color: #94632c; background: #fbf1df; }
.badge.gray { color: #746b6f; background: #f1eeee; }

.form-grid, .grid-2, .grid-3 { gap: 17px; }
label { color: #594b50; font-size: 11px; font-weight: 650; }
input, select, textarea {
    min-height: 40px;
    padding: 9px 11px;
    color: #34292d;
    background: #fff;
    border: 1px solid #e1d7da;
    border-radius: 8px;
    font-size: 12px;
    transition: border .15s ease, box-shadow .15s ease;
}
textarea { min-height: 90px; }
input::placeholder, textarea::placeholder { color: #aa9da1; }
input:focus, select:focus, textarea:focus { border-color: #a96378; box-shadow: 0 0 0 3px #762f4312; }
input[type=checkbox] { min-height: auto; accent-color: var(--wine); }
.check { gap: 9px; }
.form-actions { gap: 10px; }
.filters { align-items: flex-end; gap: 12px; }
.filters label { gap: 6px; }
.filters input, .filters select { background: #fff; }

.progress-track { gap: 9px; }
.progress-step { position: relative; min-height: 78px; padding: 13px 15px; color: #49393f; background: #faf6f5; border: 1px solid #eee5e6; border-radius: 10px; transition: border-color .15s ease, transform .15s ease; }
.progress-step:hover { border-color: #d7bdc5; text-decoration: none; transform: translateY(-2px); }
.progress-step b { margin-bottom: 5px; color: #6f2d42; font-size: 20px; }
.progress-step span { color: #827579; font-size: 10px; }
.note { padding: 14px 16px; color: #725e64; background: #f6efed; border: 1px solid #eee2df; border-radius: 9px; font-size: 11px; }
.alert { padding: 13px 16px; border: 1px solid transparent; border-radius: 10px; font-size: 12px; }
.alert.error, .error, .validation-summary-errors { color: #9b392f; background: #fff0ed; border-color: #f3d4ce; }
.alert.success { color: #286744; background: #eaf5ee; border-color: #d3e9db; }
.demo { align-items: center; padding: 9px 12px; background: #fff8e9; border: 1px solid #f1e2bf; border-radius: 8px; }

details summary { color: #55454b; font-size: 11px; }
.invoice { border-radius: 12px; box-shadow: var(--shadow); }
.login { max-width: 440px; margin: 8vh auto; }
.login .brand { display: flex; width: fit-content; margin-bottom: 22px; color: #3a242d; font-size: 21px; }
.login .brand img { width: 45px; height: 45px; padding: 3px; border-radius: 13px; box-shadow: 0 5px 15px #301c2617; }
.login .panel { padding: 32px; }
.login h1 { margin: 0 0 8px; color: #30242a; font-size: 25px; letter-spacing: -.04em; }
.login .muted { margin-bottom: 22px; font-size: 12px; }
.login label { margin: 15px 0; }
.login button[type=submit] { width: 100%; margin-top: 8px; }
.login .note { line-height: 1.8; }
.login .note b { color: #49343c; }

.app-modal {
    width: min(780px, calc(100vw - 32px));
    max-height: min(88vh, 920px);
    padding: 0;
    overflow: auto;
    color: var(--ink);
    background: #fffcfb;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 24px 80px #23131940;
}
.app-modal-large {
    width: min(1500px, calc(100vw - 40px));
    max-height: calc(100vh - 32px);
}
.app-modal-large .modal-content { padding: 16px 20px; }
.app-modal-large .modal-content > form > .panel {
    margin-bottom: 12px;
    padding: 15px 18px;
    border-radius: 12px;
}
.app-modal-large .modal-content > form > .panel h2 { margin-bottom: 12px; }
.app-modal-large .modal-content .table-wrap { overflow-x: auto; }
.app-modal-large .modal-content th,
.app-modal-large .modal-content td { padding: 8px 10px; }
.app-modal-large .modal-content input,
.app-modal-large .modal-content select,
.app-modal-large .modal-content textarea { padding: 8px 10px; }
.app-modal-large .modal-content .form-grid,
.app-modal-large .modal-content .grid-2,
.app-modal-large .modal-content .grid-3 { gap: 12px; }
.app-modal-large .modal-content .note { margin: 10px 0 0; padding: 10px 12px; }
.app-modal-large .modal-content .totals { margin-top: 10px; }
.app-modal::backdrop { background: #24181dcc; backdrop-filter: blur(4px); }
.modal-header { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 19px 24px; background: #fffcfb; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; }
.modal-content { padding: 24px; }
.modal-content > form { margin: 0; }
.modal-close { min-width: 38px; min-height: 38px; padding: 5px 10px; font-size: 20px; line-height: 1; }
.modal-trigger { margin: 4px 6px 4px 0; }
.modal-form .form-actions { grid-column: 1 / -1; }

.anonymous { background: radial-gradient(ellipse at 50% 0%, #f0e5e7 0%, #f7f4f2 54%); }
.anonymous main { max-width: 640px; }

.dashboard-welcome {
    display: flex;
    min-height: 184px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: -5px 0 25px;
    padding: 31px 36px;
    color: #fff;
    background:
        radial-gradient(circle at 88% 18%, #ffffff16 0 2px, transparent 3px),
        radial-gradient(ellipse at 86% 85%, #a658714d 0, transparent 42%),
        linear-gradient(115deg, #4a2635 0%, #753448 57%, #8a4759 100%);
    background-size: 24px 24px, auto, auto;
    border: 1px solid #6c3346;
    border-radius: 17px;
    box-shadow: 0 15px 34px #54223424;
}
.dashboard-welcome .eyebrow { color: #e7b6c4; }
.dashboard-welcome h1 { margin: 0 0 9px; color: #fff; font-size: clamp(26px, 3vw, 37px); font-weight: 650; letter-spacing: -.05em; }
.dashboard-welcome p { color: #eadde1; font-size: 13px; }
.dashboard-date { display: flex; min-width: 145px; flex-direction: column; gap: 5px; padding: 14px 17px; color: #f7e9ed; background: #ffffff12; border: 1px solid #ffffff20; border-radius: 12px; text-align: right; }
.dashboard-date span { color: #e6c6cf; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.dashboard-date b { color: #fff; font-size: 15px; }
.dashboard-section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-kicker { display: block; margin-bottom: 4px; color: #a17482; font-size: 9px; font-weight: 750; letter-spacing: .15em; }
.dashboard-section-heading h2, .dashboard-lower .panel-header h2 { margin: 0; }
.action-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.action-tile { display: flex; min-height: 72px; align-items: center; gap: 12px; padding: 12px 14px; color: #423238; background: #fff; border: 1px solid #eae2e3; border-radius: 11px; box-shadow: 0 4px 13px #321d2707; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.action-tile:hover { color: #542234; border-color: #d7bec6; box-shadow: 0 8px 18px #321d2710; text-decoration: none; transform: translateY(-2px); }
.action-tile > span:nth-child(2) { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 4px; }
.action-tile b { color: #382930; font-size: 11px; font-weight: 700; }
.action-tile small { overflow: hidden; color: #94878b; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.action-tile > i, .department-list > a > i { color: #a18b92; font-size: 15px; font-style: normal; }
.action-icon { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; color: #762f43; background: #f6eaed; border-radius: 10px; font-size: 17px; font-weight: 650; }
.action-primary { background: #fff9fa; border-color: #dfc5cd; }
.action-primary .action-icon { color: #fff; background: linear-gradient(140deg, #8b4055, #64273c); }
.dashboard-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 25px 0; }
.metric-card { display: flex; min-width: 0; min-height: 142px; flex-direction: column; padding: 17px 18px 15px; color: #35272d; background: #fff; border: 1px solid #e9e1e2; border-radius: 12px; box-shadow: 0 5px 17px #36202b08; transition: transform .15s ease, box-shadow .15s ease; }
.metric-card:hover { color: #35272d; box-shadow: 0 9px 22px #36202b12; text-decoration: none; transform: translateY(-2px); }
.metric-top { display: flex; align-items: center; justify-content: space-between; color: #918186; font-size: 8px; font-weight: 750; letter-spacing: .13em; }
.metric-symbol { display: grid; width: 27px; height: 27px; place-items: center; color: #7a354b; background: #f5e9ec; border-radius: 8px; font-size: 13px; }
.metric-value { margin-top: 6px; color: #36272d; font-size: 28px; font-weight: 700; letter-spacing: -.045em; }
.metric-value.metric-money { font-size: 23px; }
.metric-label { margin-top: 1px; color: #514249; font-size: 11px; font-weight: 650; }
.metric-foot { margin-top: auto; padding-top: 9px; color: #988b8f; font-size: 9px; }
.metric-foot a { font-weight: 650; }
.metric-foot i { margin: 0 4px; color: #c3aeb5; font-style: normal; }
.metric-wine { color: #fff; background: linear-gradient(145deg, #7d354a, #532437); border-color: #6a2c40; }
.metric-wine .metric-top, .metric-wine .metric-label, .metric-wine .metric-foot { color: #ead9df; }
.metric-wine .metric-symbol { color: #fff; background: #ffffff20; }
.metric-wine .metric-value { color: #fff; }
.dashboard-lower { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr); align-items: start; gap: 15px; }
.dashboard-lower .panel { min-width: 0; margin-bottom: 15px; padding: 19px; }
.dashboard-lower .panel-header { align-items: center; }
.dashboard-link { color: #7a3348; font-size: 10px; font-weight: 650; white-space: nowrap; }
.dashboard-link span { padding-left: 4px; }
.dashboard-orders .table-wrap { border: 0; border-radius: 0; }
.dashboard-orders th { padding-top: 9px; padding-bottom: 9px; }
.dashboard-orders td { padding-top: 11px; padding-bottom: 11px; }
.order-number { font-weight: 700; }
.department-list { display: flex; flex-direction: column; }
.department-list > a { display: flex; align-items: center; gap: 11px; padding: 12px 2px; color: #413238; border-bottom: 1px solid #f0e9ea; }
.department-list > a:last-child { border-bottom: 0; }
.department-list > a:hover { color: #762f43; text-decoration: none; }
.department-list > a > span:nth-child(2) { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 4px; }
.department-list b { color: #3b2b32; font-size: 11px; }
.department-list small { color: #94878b; font-size: 9px; }
.department-icon { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 10px; font-size: 15px; }
.sales-icon { color: #753147; background: #f6e8ec; }
.purchase-icon { color: #55725f; background: #eaf3ec; }
.stock-icon { color: #8d632f; background: #faf1df; }
.reports-icon { color: #4d6680; background: #ebf1f7; }
.people-icon { color: #755c83; background: #f1eefa; }
.production-launch { margin-bottom: 20px; border-top: 3px solid #81394e; }
.production-launch > .panel-header { margin-bottom: 15px; }
.production-launch > .panel-header .muted { margin-top: 6px; }
.production-recipe-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.production-recipe { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 15px; background: #fdfafa; border: 1px solid #eee5e7; border-radius: 11px; }
.production-recipe-heading { display: flex; min-width: 0; align-items: center; gap: 11px; }
.production-recipe-heading > div { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.production-recipe-heading b { overflow: hidden; color: #3c2b32; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.production-recipe-heading small { overflow: hidden; color: #8a7b80; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.production-icon { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; color: #fff; background: linear-gradient(140deg, #8b4055, #64273c); border-radius: 10px; font-size: 16px; }
.production-recipe .modal-trigger { flex: 0 0 auto; margin: 0; }
.production-batch .full h3 { margin-top: 0; }
.production-batch .full .table-wrap { margin-top: 8px; }
.production-empty { display: flex; align-items: center; gap: 13px; padding: 14px; background: #fcf8f7; border: 1px dashed #ddcbd0; border-radius: 10px; }
.production-empty > div { flex: 1; }
.production-empty b { color: #49353c; font-size: 12px; }
.production-empty p { margin-top: 3px; color: #897a7f; font-size: 10px; }
.bill-actions { min-width: 180px; }
.bill-actions .modal-trigger { margin: 0 0 6px; }
.bill-edit-hint { display: block; max-width: 190px; margin: 0 0 6px; color: #93868a; font-size: 9px; line-height: 1.4; }
.bill-actions > a { display: inline-block; font-size: 10px; }

@media (max-width: 1050px) {
    .sidebar { width: 228px; padding-right: 13px; padding-left: 13px; }
    .shell { margin-left: 228px; }
    main { padding: 28px 26px 44px; }
    .topbar { padding: 0 26px; }
    .cards { gap: 12px; }
    .dashboard-lower { grid-template-columns: 1fr; }
    .production-recipe-grid { grid-template-columns: 1fr; }
    .dashboard-workspace .department-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
}

@media (max-width: 760px) {
    .sidebar { position: fixed; inset: 0 auto 0 0; width: 270px; padding: 21px 14px; transform: translateX(-105%); transition: transform .22s ease; }
    body.nav-open .sidebar { transform: translateX(0); }
    body.nav-open::after { position: fixed; z-index: 15; inset: 0; background: #21151bc2; content: ""; }
    .shell { margin-left: 0; }
    .sidebar-toggle { display: inline-flex; min-width: 38px; min-height: 38px; padding: 7px; }
    .topbar { height: 62px; padding: 0 16px; }
    .topbar-start { gap: 10px; }
    .user-menu { gap: 8px; }
    .today, .user-name { display: none; }
    .user-menu form { margin-left: 2px; }
    main { padding: 23px 16px 38px; }
    footer { padding: 17px 16px; }
    .page-head { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 21px; }
    .page-head h1 { font-size: 27px; }
    .dashboard-welcome { min-height: 156px; padding: 23px 20px; }
    .dashboard-date { min-width: 0; padding: 10px 12px; }
    .dashboard-date b { font-size: 12px; }
    .action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .action-tile { gap: 8px; padding: 10px; }
    .action-tile small { max-width: 160px; }
    .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 19px 0; }
    .metric-card { min-height: 132px; padding: 13px; }
    .metric-value { font-size: 24px; }
    .metric-value.metric-money { font-size: 19px; }
    .dashboard-workspace .department-list { grid-template-columns: 1fr; }
    .production-recipe { align-items: flex-start; flex-direction: column; }
    .production-recipe .modal-trigger { align-self: stretch; }
    .production-empty { align-items: flex-start; flex-wrap: wrap; }
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .card { padding: 15px; }
    .card .value { font-size: 23px; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .full { grid-column: auto; }
    .panel { padding: 17px; border-radius: 12px; }
    .panel-header { align-items: flex-start; }
    .permission-list { grid-template-columns: 1fr; }
    .login { margin: 5vh auto; }
    .login .panel { padding: 23px; }
    .modal-content { padding: 18px; }
    .modal-header { padding: 16px 18px; }
    .app-modal-large { width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
    .app-modal-large .modal-content { padding: 10px; }
    .app-modal-large .modal-content > form > .panel { padding: 12px; }
    .demo { display: block; }
    .demo span { display: block; }
    .progress-track { flex-wrap: wrap; }
    .progress-step { min-width: calc(50% - 6px); }
}

@media (max-width: 440px) {
    .dashboard-welcome { align-items: flex-start; flex-direction: column; gap: 13px; }
    .dashboard-date { align-self: stretch; flex-direction: row; justify-content: space-between; text-align: left; }
    .action-grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
    .cards { grid-template-columns: 1fr 1fr; }
    .card .value { font-size: 20px; }
    .user-avatar { width: 30px; height: 30px; }
    .breadcrumbs b { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@media print {
    .sidebar, .sidebar-toggle, .topbar, .modal-trigger { display: none !important; }
    .shell { margin: 0; }
    main { max-width: none; padding: 0; }
    body { background: #fff; }
    .card, .panel, .invoice { box-shadow: none; }
    .app-modal { display: none !important; }
    .dashboard-welcome { color: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
