.routine-page,.purchase-compact-page{font-family:Montserrat,Arial,sans-serif;font-weight:400;color:#17354c}
.routine-page *,.purchase-compact-page .routine-tabs *{box-sizing:border-box}
.routine-tabs{display:flex;flex-wrap:wrap;gap:4px;border-bottom:1px solid #cbdce5;margin:10px 0 18px}
.routine-tabs button{border:0;border-bottom:3px solid transparent;background:transparent;color:#496678;padding:11px 14px;cursor:pointer;font:500 .9rem Montserrat,Arial,sans-serif}
.routine-tabs button[aria-selected=true]{border-color:#174b70;color:#173f5d;background:#eff6fa}
.routine-tabs button:focus-visible,.routine-page button:focus-visible,.routine-page input:focus-visible,.routine-page summary:focus-visible,.routine-page a:focus-visible{outline:2px solid #267ba9;outline-offset:2px}
.routine-page{padding-bottom:42px}.routine-section{border:1px solid #d6e3ea;border-radius:14px;background:#fff;box-shadow:0 6px 22px #173b5910;padding:18px;margin-bottom:16px;min-width:0}
.routine-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px}
.routine-section-head>div{min-width:0}.routine-section-head h1,.routine-section-head h2{font-size:clamp(1.15rem,1.7vw,1.55rem);line-height:1.3;font-weight:500;margin:3px 0 6px}.routine-section-head p{font-size:.78rem;line-height:1.55;color:#567182;margin:0;max-width:72ch}
.routine-section-head label{font-size:.72rem;color:#526e7e;min-width:145px}.routine-section-head input{display:block;width:100%;margin-top:5px;border:1px solid #adbfcc;border-radius:8px;padding:8px;color:#17354c;font:400 .8rem Montserrat,Arial,sans-serif}
.routine-summary{display:grid;grid-template-columns:auto auto;gap:0 7px;align-items:baseline;white-space:nowrap;padding:8px 12px;border:1px solid #cadde6;border-radius:10px;background:#f4f9fc}.routine-summary b{font-size:1.05rem;font-weight:500}.routine-summary small{font-size:.66rem;color:#627b8b}
.routine-create{display:grid;grid-template-columns:minmax(190px,2fr) minmax(130px,1fr) minmax(105px,.7fr) auto;align-items:end;gap:8px;border:1px solid #c9dce7;border-radius:11px;background:#f6fafc;padding:12px;margin-bottom:16px}
.routine-create label,.routine-editor label{display:grid;gap:5px;min-width:0;color:#4a6575;font-size:.72rem}.routine-create input,.routine-editor input{width:100%;min-width:0;border:1px solid #aebfcb;border-radius:8px;background:#fff;padding:9px;color:#17354c;font:400 .82rem Montserrat,Arial,sans-serif}
.routine-create .btn{min-height:39px;white-space:nowrap}.routine-products{display:grid;gap:8px}.routine-product{display:grid;grid-template-columns:86px minmax(0,1fr) auto;gap:12px;align-items:start;border:1px solid #d7e4ea;border-radius:11px;padding:10px;min-width:0}
.routine-product-photo{width:86px;height:78px;border-radius:8px;background:#f2f6f8;overflow:hidden}.routine-product-photo img{width:100%;height:100%;object-fit:contain}.routine-no-image{display:grid;place-items:center;width:100%;height:100%;font-size:.63rem;color:#718897;text-align:center}
.routine-product-info{min-width:0}.routine-product-info h3{font-size:.89rem;font-weight:500;line-height:1.35;margin:0 0 4px;overflow-wrap:anywhere}.routine-product-info p{font-size:.76rem;margin:0 0 4px}.routine-product-info strong{font-weight:500}.routine-product-info>small{display:block;color:#5d7585;font-size:.68rem;line-height:1.5}.routine-image-credit a{color:#175a82;text-decoration:underline;text-underline-offset:2px;overflow-wrap:anywhere}.routine-image-pending{color:#946220!important}
.routine-product-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:5px;max-width:250px}.routine-product-actions .btn{font-size:.68rem;padding:6px 8px;line-height:1.3;min-height:30px}.routine-product-actions label{cursor:pointer}.routine-product-actions input[type=file]{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.routine-editor{flex:1 1 100%;border-top:1px solid #dde8ed;margin-top:4px;padding-top:5px}.routine-editor summary{cursor:pointer;color:#245b7c;font-size:.72rem;list-style:revert}.routine-editor form{display:grid;gap:7px;margin-top:7px}.routine-editor-actions{display:flex;gap:5px;flex-wrap:wrap}
.routine-stat-table-wrap{overflow-x:auto}.routine-stat-table{border-collapse:collapse;width:100%;font-size:.78rem}.routine-stat-table th,.routine-stat-table td{padding:10px;border-bottom:1px solid #e2eaee;text-align:left;vertical-align:top}.routine-stat-table thead th{background:#edf5f8;font-weight:500}.routine-stat-table tbody th{font-weight:500;max-width:300px;overflow-wrap:anywhere}.routine-stat-table tbody th small{display:block;font-size:.65rem;color:#718795;font-weight:400;margin-top:3px}.routine-stat-table td{white-space:nowrap}.routine-stat-table td small{font-size:.64rem;color:#61798a}.routine-room-count{white-space:nowrap;color:#1d5676;font-size:.83rem;font-weight:500}
.routine-blocks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.routine-block{border:1px solid #d8e4e9;border-radius:11px;background:#fbfdfe;min-width:0;padding:11px}.routine-block>header{display:flex;justify-content:space-between;gap:6px;align-items:baseline;border-bottom:1px solid #dbe7ec;padding-bottom:8px}.routine-block h3{font-size:.9rem;font-weight:500;margin:0}.routine-block header small{font-size:.66rem;color:#688394}.routine-floor{padding-top:9px}.routine-floor h4{display:flex;justify-content:space-between;gap:5px;font-size:.73rem;font-weight:500;margin:0 0 6px}.routine-floor h4 small{color:#7190a0;font-size:.63rem;font-weight:400}.routine-rooms{display:flex;flex-wrap:wrap;gap:4px}.routine-rooms span{border:1px solid #bdd2dc;border-radius:6px;background:#fff;padding:4px 6px;min-width:34px;text-align:center;font-size:.68rem}.routine-empty{margin:0;padding:17px;border:1px dashed #b9cfdc;border-radius:9px;color:#667f8e;font-size:.76rem}
@media(max-width:900px){.routine-create{grid-template-columns:repeat(2,minmax(0,1fr))}.routine-product{grid-template-columns:70px minmax(0,1fr)}.routine-product-photo{width:70px;height:70px}.routine-product-actions{grid-column:1/-1;justify-content:flex-start;max-width:none}.routine-blocks{grid-template-columns:1fr}}
@media(max-width:620px){.routine-section{padding:12px}.routine-tabs button{flex:1 1 auto;padding:10px 8px;font-size:.77rem}.routine-section-head{flex-wrap:wrap}.routine-section-head label{width:100%}.routine-create{grid-template-columns:minmax(0,1fr)}.routine-create .btn{width:100%}.routine-product{gap:9px}.routine-stat-table thead{display:none}.routine-stat-table,.routine-stat-table tbody,.routine-stat-table tr,.routine-stat-table th,.routine-stat-table td{display:block;width:100%}.routine-stat-table tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border:1px solid #d6e5eb;border-radius:9px;margin-bottom:8px;overflow:hidden}.routine-stat-table tbody th{grid-column:1/-1;max-width:none;background:#f1f7fa}.routine-stat-table td{white-space:normal;padding:8px;font-size:.78rem}.routine-stat-table td::before{content:attr(data-period);display:block;color:#6b8290;font-size:.65rem;margin-bottom:2px}.routine-stat-table td[colspan]{grid-column:1/-1}.routine-product-info h3{font-size:.83rem}}
@media print{@page{size:A4 portrait;margin:13mm}.topbar,.routine-tabs,.routine-create,.routine-product-actions,.routine-section-head label{display:none!important}.routine-page{padding:0!important}.routine-section{box-shadow:none!important;break-inside:avoid;padding:10px!important}.routine-block,.routine-product,.routine-stat-table tr{break-inside:avoid}.routine-blocks{grid-template-columns:repeat(2,minmax(0,1fr))}.routine-stat-table thead{display:table-header-group}.routine-stat-table,.routine-stat-table tbody{display:table}.routine-stat-table tr{display:table-row}.routine-stat-table th,.routine-stat-table td{display:table-cell}.routine-stat-table td::before{display:none}}
.routine-create{grid-template-columns:minmax(190px,2fr) minmax(105px,.7fr) auto}
.routine-capacity-fields{grid-column:1/-1;min-width:0;margin:0;padding:9px 10px;border:1px solid #c9dce7;border-radius:9px;background:#fff}
.routine-capacity-fields legend{padding:0 5px;color:#244f69;font-size:.75rem;font-weight:500}
.routine-capacity-fields>div{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.routine-capacity-fields small{display:block;margin-top:6px;color:#687f8d;font-size:.66rem}
.routine-rooms span{min-width:45px}.routine-rooms span small{display:block;color:#627d8c;font-size:.58rem}
@media(max-width:620px){.routine-create{grid-template-columns:1fr}.routine-capacity-fields>div{grid-template-columns:repeat(2,minmax(0,1fr))}}
.routine-need-strip{min-width:0;margin-top:9px;padding:8px;border:1px solid #cbdee7;border-radius:9px;background:#f1f7fa}
.routine-need-floor{background:#fff;border-color:#d9e7ed}
.routine-need-heading{display:flex;align-items:baseline;justify-content:space-between;gap:7px;margin-bottom:6px}
.routine-need-heading b{color:#24516b;font-size:.75rem;font-weight:500;line-height:1.35}
.routine-need-heading small{color:#648091;font-size:.66rem;white-space:nowrap}
.routine-need-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:5px}
.routine-need-card{display:flex;align-items:center;justify-content:space-between;gap:5px;min-width:0;padding:5px 7px;border:1px solid #d4e4eb;border-radius:7px;background:#fff;line-height:1.25}
.routine-need-card span{min-width:0;color:#36566a;font-size:.72rem;overflow-wrap:anywhere}
.routine-need-card b{flex:none;color:#173f5c;font-size:.82rem;font-weight:500;white-space:nowrap}
.routine-need-card b small{font-size:.65rem;font-weight:400;color:#637f8e}
.routine-no-needs{color:#637f8e;font-size:.69rem}
.routine-need-floor+.routine-rooms{margin-top:7px}
@media(max-width:620px){.routine-need-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.routine-need-card{align-items:flex-start;flex-direction:column}.routine-need-heading{flex-wrap:wrap}}
@media print{.routine-need-strip,.routine-need-card{break-inside:avoid;print-color-adjust:exact;-webkit-print-color-adjust:exact}.routine-need-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
.routine-mode-fields,.routine-package-fields{grid-column:1/-1;min-width:0;margin:0;padding:9px 10px;border:1px solid #c9dce7;border-radius:9px;background:#fff}
.routine-mode-fields legend,.routine-package-fields legend{padding:0 5px;color:#244f69;font-size:.75rem;font-weight:500}
.routine-mode-switch{display:flex;flex-wrap:wrap;gap:6px}.routine-mode-switch label{position:relative;display:block;cursor:pointer}.routine-mode-switch input{position:absolute;width:1px;height:1px;opacity:0}.routine-mode-switch span{display:block;border:1px solid #a9c2d0;border-radius:9px;padding:8px 12px;background:#f5f9fb;color:#27516a;font-size:.75rem;font-weight:500}.routine-mode-switch input:checked+span{background:#164b6d;border-color:#164b6d;color:#fff}.routine-mode-switch input:focus-visible+span{outline:2px solid #267ba9;outline-offset:2px}
.routine-package-fields{display:grid;grid-template-columns:repeat(2,minmax(0,170px)) 1fr;gap:8px;align-items:end}.routine-package-fields[hidden]{display:none}.routine-package-fields>small{color:#637d8c;font-size:.68rem;line-height:1.4;align-self:center}
.routine-need-card{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start}.routine-need-card b{font-variant-numeric:tabular-nums}.routine-need-periods{grid-column:1/-1;display:grid;gap:2px;width:100%;padding-top:4px;border-top:1px solid #e1ebef}.routine-need-periods small{color:#546f80;font-size:.65rem;line-height:1.35}
.routine-stat-table .routine-pack-total{display:block;margin-top:3px;color:#1b607c;font-weight:500}.routine-period-switch{display:flex;flex-wrap:wrap;gap:5px}.routine-period-switch button{border:1px solid #b4cad7;border-radius:8px;background:#fff;color:#28536d;padding:8px 10px;font:500 .72rem Montserrat,Arial,sans-serif;cursor:pointer}.routine-period-switch button[aria-pressed=true]{background:#164b6d;border-color:#164b6d;color:#fff}.routine-period-switch button:hover{border-color:#267ba9}
.routine-carton-field{grid-column:1/-1;max-width:280px}.routine-carton-help{grid-column:1/-1;display:block;color:#637d8c;font-size:.68rem;line-height:1.4}.routine-stat-table .routine-carton-total{display:block;margin-top:3px;color:#175b4e;font-weight:500;font-variant-numeric:tabular-nums}
.routine-carton-cell{min-width:110px}.routine-carton-cell input{width:74px;max-width:100%;padding:7px 6px;border:1px solid #9bb7c7;border-radius:7px;background:#fff;color:#17354c;font:400 .78rem Montserrat,Arial,sans-serif;font-variant-numeric:tabular-nums}.routine-carton-cell input:focus-visible{outline:2px solid #267ba9;outline-offset:2px}.routine-carton-cell>small{display:block;margin-top:3px}.routine-carton-print{display:none}
.routine-shopping-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.routine-shopping-item{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0;padding:10px 12px;border:1px solid #d2e2e9;border-radius:10px;background:#f8fbfd}.routine-shopping-item>div{min-width:0}.routine-shopping-item b{display:block;font-size:.8rem;font-weight:500;overflow-wrap:anywhere}.routine-shopping-item small{display:block;color:#617b8a;font-size:.67rem;line-height:1.5}.routine-shopping-item strong{flex:none;color:#164d6d;font-size:.83rem;font-weight:500;text-align:right;font-variant-numeric:tabular-nums}.routine-shopping-item strong small{display:inline;font-weight:400}.routine-shopping-item em{display:block;color:#1c6c59;font-size:.74rem;font-style:normal}
@media(max-width:900px){.routine-package-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.routine-package-fields>small{grid-column:1/-1}}
@media(max-width:620px){.routine-mode-switch>*{flex:1 1 140px}.routine-mode-switch span{text-align:center}.routine-shopping-list{grid-template-columns:1fr}.routine-period-switch{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.routine-period-switch button{min-height:38px}.routine-need-card{grid-template-columns:1fr}.routine-need-card b{white-space:normal}.routine-need-periods{grid-column:1}.routine-package-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media print{.routine-mode-fields,.routine-package-fields,.routine-period-switch,.routine-carton-field,.routine-carton-help{display:none!important}.routine-carton-cell input{display:none}.routine-carton-print{display:block;font-variant-numeric:tabular-nums}.routine-shopping{break-inside:auto!important}.routine-shopping-item{break-inside:avoid}.routine-shopping-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
