.layout-nav-badge{margin-left:auto;background:#ef233c;color:#fff;border-radius:99px;min-width:22px;height:22px;display:inline-grid;place-items:center;font-size:12px}.ly-loading{padding:40px;text-align:center}.ly-page{color:var(--txt)}.ly-head,.ly-detailhead,.ly-tools,.ly-pager{display:flex;align-items:center;justify-content:space-between;gap:16px}.ly-head{margin-bottom:18px}.ly-head h1,.ly-detailhead h1{margin:0 0 5px;font-size:28px}.ly-head p{margin:0;color:var(--muted)}.ly-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}.ly-kpi{display:flex;align-items:center;gap:15px;padding:18px;border:1px solid var(--line);border-radius:16px;background:var(--card);box-shadow:0 10px 30px rgba(0,0,0,.15)}.ly-kpi i{width:50px;height:50px;border-radius:50%;display:grid;place-items:center;font-style:normal;font-size:24px;background:#17213a}.ly-kpi span{display:block;color:var(--muted);margin-bottom:5px}.ly-kpi strong{font-size:24px}.ly-kpi.blue strong{color:#3182f6}.ly-kpi.orange strong{color:#ff8a1f}.ly-kpi.red strong{color:#ff3b4d}.ly-kpi.purple strong{color:#a855f7}.ly-alerts{border:1px solid rgba(255,146,52,.45);background:rgba(255,146,52,.05);border-radius:16px;padding:16px;margin-bottom:18px}.ly-alerts h2{margin:0 0 12px;color:#ff8a1f;font-size:18px}.ly-alert-grid{display:grid;grid-template-columns:repeat(3,minmax(240px,1fr));gap:12px}.ly-alert{position:relative;text-align:left;border:1px solid var(--line);border-left:4px solid #fbbf24;background:var(--card);color:var(--txt);border-radius:10px;padding:13px;display:grid;gap:5px}.ly-alert.red{border-left-color:#ff3347}.ly-alert.orange{border-left-color:#ff8a1f}.ly-alert b{font-size:14px}.ly-alert span,.ly-alert small{color:var(--muted)}.ly-alert em{position:absolute;right:12px;top:42px;color:#3182f6;font-weight:800;font-style:normal}.ly-alert u,.ly-bar{height:5px;background:#273047;border-radius:9px;overflow:hidden;text-decoration:none;display:block}.ly-alert u i,.ly-bar i{display:block;height:100%;background:#1677ff;border-radius:9px}.ly-panel,.ly-form section,.ly-form aside,.ly-detailgrid section,.ly-detailgrid aside{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:16px}.ly-tools{margin-bottom:12px}.ly-tools h2{margin:0;margin-right:auto}.ly-tools .input{max-width:250px}.ly-tablewrap{overflow:auto;border:1px solid var(--line);border-radius:12px}.ly-table{width:100%;min-width:1300px;border-collapse:collapse}.ly-table th,.ly-table td{padding:11px 10px;border-bottom:1px solid var(--line);vertical-align:middle;font-size:13px}.ly-table th{color:var(--muted);white-space:nowrap}.ly-table td:nth-child(2){display:grid;gap:3px}.ly-table td>a{color:#1f82ff;font-weight:800;cursor:pointer}.ly-table small{display:block;color:var(--muted);margin-top:3px}.ly-table small.danger{color:#ff4154}.ly-thumb,.ly-noimg{width:92px;height:56px;object-fit:cover;border-radius:7px}.ly-noimg{display:grid;place-items:center;background:#17213a;font-size:28px}.ly-progress{color:#1680ff}.ly-bar{width:70px;margin-top:7px}.ly-status{display:inline-block;padding:6px 9px;border-radius:10px;border:1px solid #3475de;color:#77aaff;white-space:nowrap;font-size:12px}.ly-status.building,.ly-status.designing{border-color:#e58a22;color:#ffae42}.ly-status.customer_approved,.ly-status.completed{border-color:#34a85b;color:#63d484}.ly-status.cancelled{border-color:#e33;color:#ff6675}.ly-status.delivered{border-color:#7d5ce7;color:#b19aff}.ly-pager{justify-content:flex-end;margin-top:12px}.ly-pager span{margin-right:auto;color:var(--muted)}.ly-form{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:16px;align-items:start}.ly-form main{display:grid;gap:12px}.ly-form aside{position:sticky;top:84px}.ly-form section h2,.ly-form aside h2{margin:0 0 13px;font-size:17px}.ly-form section h2 i{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#1677ff;color:#fff;font-style:normal;font-size:12px;margin-right:7px}.ly-grid{display:grid;gap:12px}.ly-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.ly-grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}.ly-form label{display:grid;gap:6px;color:#bfd0ed;font-size:13px;margin-bottom:10px}.ly-form textarea{resize:vertical}.ly-warning{padding:11px;border:1px solid #e0a62f;border-radius:9px;color:#ffbd48;background:rgba(255,190,60,.07)}.ly-form aside .btn{width:100%}.ly-previews,.ly-gallery{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:10px 0}.ly-previews div{position:relative}.ly-previews img,.ly-gallery img{width:100%;height:105px;object-fit:cover;border-radius:9px}.ly-previews button{position:absolute;right:4px;top:4px;border:0;border-radius:50%;background:#fff;color:#111;width:24px;height:24px}.ly-detailhead{margin-bottom:15px}.ly-detailhead>div{display:flex;align-items:center;gap:12px;margin-right:auto}.ly-detailgrid{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:14px;align-items:start}.ly-detailgrid main{display:grid;gap:14px}.ly-detailgrid aside{position:sticky;top:84px}.ly-detailgrid h2{margin-top:0}.ly-detailgrid li{margin:8px 0;color:var(--muted)}
@media(max-width:1100px){.ly-stats{grid-template-columns:repeat(2,1fr)}.ly-alert-grid{grid-template-columns:1fr 1fr}.ly-form,.ly-detailgrid{grid-template-columns:1fr}.ly-form aside,.ly-detailgrid aside{position:static}.ly-grid.four{grid-template-columns:repeat(2,1fr)}.ly-detailhead{flex-wrap:wrap}.ly-detailhead>.btn{flex:0 0 auto}.ly-detail-actions{width:100%;justify-content:flex-end}.ly-detail-actions .btn{min-width:220px}}
@media(max-width:680px){.ly-head,.ly-tools,.ly-detailhead{align-items:stretch;flex-direction:column}.ly-head .btn,.ly-detailhead .btn{width:100%}.ly-stats{grid-template-columns:1fr 1fr;gap:8px}.ly-kpi{padding:12px;gap:8px}.ly-kpi i{width:38px;height:38px;font-size:18px}.ly-kpi strong{font-size:18px}.ly-alert-grid{display:flex;overflow:auto}.ly-alert{min-width:270px}.ly-tools .input{max-width:none;width:100%}.ly-grid.three,.ly-grid.four{grid-template-columns:1fr}.ly-previews,.ly-gallery{grid-template-columns:repeat(2,1fr)}.ly-panel{padding:10px}.ly-formpage>.btn{width:100%;margin-bottom:10px}}

/* Layout payment and status upgrade */
.ly-detail-actions,.ly-section-head,.ly-modal-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.ly-detail-actions{margin-left:auto}.ly-status-btn{background:linear-gradient(135deg,#268cff,#8b4dff)}.ly-section-head{justify-content:space-between;margin-bottom:12px}.ly-section-head h2{margin:0}.ly-payment-wrap{overflow:hidden;border:1px solid var(--line);border-radius:12px}.ly-payment-table{width:100%;border-collapse:collapse}.ly-payment-table th,.ly-payment-table td{padding:11px 12px;border-bottom:1px solid var(--line);text-align:left;vertical-align:middle}.ly-payment-table th{background:rgba(255,255,255,.035);color:#bfd0ed}.ly-payment-table td small{display:block;color:var(--muted);margin-top:4px}.ly-payment-actions{display:flex;gap:7px;white-space:nowrap}.ly-payment-actions .danger{color:#ff6575;border-color:#e04455}.ly-payment-form{display:grid;gap:12px}.ly-payment-form h2{margin:0 0 5px}.ly-payment-form label{display:grid;gap:6px;color:#bfd0ed}.ly-modal-actions{justify-content:flex-end;margin-top:8px}.ly-finance-bar,.ly-production-bar{width:100%;height:10px;margin:7px 0 16px}.ly-finance-bar i{background:linear-gradient(90deg,#22c96f,#66e49b)}.ly-production-bar i{background:linear-gradient(90deg,#24a7ff,#8a50f5)}.ly-status-history{list-style:none;padding:0}.ly-status-history li{padding:9px 0;border-bottom:1px solid var(--line)}.ly-status-history span{color:#4ba5ff;font-weight:700}
@media(max-width:680px){.ly-detail-actions{width:100%;margin-left:0}.ly-detail-actions .btn{width:100%;min-width:0}.ly-payment-wrap{border:0;overflow:visible;width:100%}.ly-payment-table,.ly-payment-table tbody,.ly-payment-table tr,.ly-payment-table td{display:block;width:auto!important;min-width:0!important;max-width:100%;box-sizing:border-box}.ly-payment-table{width:100%!important;table-layout:fixed}.ly-payment-table thead{display:none}.ly-payment-table tr{border:1px solid var(--line);border-radius:12px;padding:10px;margin-bottom:10px;background:rgba(255,255,255,.025)}.ly-payment-table td{display:grid;grid-template-columns:105px minmax(0,1fr);gap:8px;border:0;padding:6px;overflow-wrap:anywhere}.ly-payment-table td:before{content:attr(data-label);color:var(--muted);font-weight:700}.ly-payment-actions{white-space:normal;display:flex!important;flex-wrap:wrap;padding-left:111px!important}.ly-payment-actions:before{display:none}.ly-payment-actions .btn{min-height:40px;width:auto!important;min-width:92px}.ly-section-head{align-items:stretch;flex-direction:column}.ly-section-head .btn{width:100%}.ly-modal-actions{display:grid;grid-template-columns:1fr 1fr}.ly-modal-actions .btn{width:100%}}

/* Layout order completion and soaking status */
.ly-order-completed{color:#63d484}.ly-status.soaking_treatment{border-color:#e58a22;color:#ffae42}

/* Customer keyword search in Layout order form */
.ly-customer-search{position:relative;width:100%}.ly-customer-results{position:absolute;left:0;right:0;top:calc(100% + 5px);z-index:35;max-height:300px;overflow:auto;background:#0b1629;border:1px solid #2d4770;border-radius:12px;box-shadow:0 18px 45px rgba(0,0,0,.45);padding:6px}.ly-customer-result{display:grid;width:100%;gap:3px;padding:11px 12px;border:0;border-radius:9px;background:transparent;color:var(--txt);text-align:left;cursor:pointer}.ly-customer-result:hover,.ly-customer-result:focus{background:rgba(45,132,255,.15);outline:none}.ly-customer-result b{font-size:14px}.ly-customer-result span,.ly-customer-empty{color:var(--muted);font-size:12px}.ly-customer-empty{padding:14px;text-align:center}.ly-new-customer{width:100%;margin-top:5px}
.ly-detailgrid>aside>.btn{width:100%;margin-top:9px}

/* Five summary cards, with money values allowed to wrap on narrow screens. */
.ly-stats{grid-template-columns:repeat(5,minmax(0,1fr))}
.ly-kpi{min-width:0}.ly-kpi>div{min-width:0}.ly-kpi strong{overflow-wrap:anywhere}
@media(max-width:1400px){.ly-stats{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1100px){.ly-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:420px){.ly-stats{grid-template-columns:1fr}}
html[data-theme="light"] .ly-kpi i{background:#e7f0ff;color:#075ac2}
html[data-theme="light"] .ly-kpi.purple i{background:#f3e8ff;color:#7e22ce}
html[data-theme="light"] .ly-kpi.green i{background:#dcfce7;color:#047857}

.ly-revenue>div{flex:1}.ly-revenue-controls{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px}
.ly-revenue-controls :is(select,input){min-width:0;max-width:100%;padding:5px 6px;border:1px solid var(--line);border-radius:7px;background:var(--panel2);color:var(--txt);font:inherit;font-size:13px}
.ly-revenue-controls input{width:76px}
html[data-theme="light"] .ly-revenue-controls :is(select,input){background:#fff;color:#172033;border-color:#bdcadd}

.ly-period-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 18px;padding:14px 16px;border:1px solid var(--border,#cbd5e1);border-radius:12px}.ly-period-toolbar small{opacity:.75}.ly-period-toolbar .ly-revenue-controls{display:flex;gap:8px;flex-wrap:wrap}.ly-period-toolbar select,.ly-period-toolbar input{min-height:36px;max-width:150px}
