*{box-sizing:border-box}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Inter,sans-serif;background:#f1f5f9;color:#0f172a;-webkit-font-smoothing:antialiased}
.login-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:20px;background:linear-gradient(135deg,#f8fafc 0%,#e2e8f0 100%)}
.login-card{width:100%;max-width:380px;background:#fff;padding:32px 28px;border-radius:16px;border:1px solid #e2e8f0;box-shadow:0 10px 25px -5px rgba(15,23,42,.08)}
.layout{display:flex;min-height:100vh}
.sidebar{width:248px;background:#fff;border-right:1px solid #e2e8f0;padding:18px 12px;display:flex;flex-direction:column;flex-shrink:0;position:sticky;top:0;height:100vh;overflow-y:auto}
.main{flex:1;padding:22px 28px;min-width:0;max-width:1440px}
.topbar{display:flex;align-items:center;gap:12px;margin-bottom:18px}
.burger{display:none!important}
.nav-item{width:100%;display:flex;align-items:center;gap:10px;padding:9px 12px;border:none;background:transparent;border-radius:10px;font-size:14px;font-weight:500;color:#475569;cursor:pointer;text-align:left;transition:.15s}
.nav-item:hover{background:#f8fafc;color:#0f172a}
.nav-item.active{background:#e6f4ea;color:#0d9488;font-weight:600}
@media(max-width:900px){
  .sidebar{position:fixed;left:-270px;z-index:50;transition:.2s;box-shadow:0 10px 30px rgba(0,0,0,.15)}
  .sidebar.open{left:0}
  .burger{display:inline-flex!important}
  .main{padding:16px}
}
.card,.sec-card{background:#fff;border:1px solid #e2e8f0;border-radius:14px;padding:18px 20px;margin-bottom:16px;box-shadow:0 1px 2px rgba(15,23,42,.03)}
.sec-title{font-size:15px;font-weight:700;color:#0f172a;margin-bottom:12px;display:flex;align-items:center;gap:8px}
.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.grid5{display:grid;grid-template-columns:repeat(5,minmax(220px,1fr));gap:12px;overflow-x:auto}
.fgrid,.kv-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}
.kpi-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:14px;margin-bottom:16px}
.kpi-box{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:14px 16px;display:flex;align-items:center;gap:12px}
.hub-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:16px;max-width:1100px}
.hub-card{background:#fff;border:1px solid #e2e8f0;border-radius:14px;padding:18px;display:flex;justify-content:space-between;align-items:flex-start;gap:12px;cursor:pointer;transition:.15s}
.hub-card:hover{border-color:#0d9488;box-shadow:0 4px 12px rgba(13,148,136,.08)}
.btn{height:36px;padding:0 14px;border-radius:9px;border:1px solid #cbd5e1;background:#fff;color:#1e293b;font-size:13px;font-weight:500;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:6px;white-space:nowrap;transition:.15s}
.btn:hover{background:#f8fafc;border-color:#94a3b8}
.btn-green{background:#0d9488;border-color:#0d9488;color:#fff}.btn-green:hover{background:#0f766e}
.btn-dark{background:#0f172a;border-color:#0f172a;color:#fff}.btn-dark:hover{background:#1e293b}
.btn-blue{background:#0284c7;border-color:#0284c7;color:#fff}
.btn-pink{background:#e11d48;border-color:#e11d48;color:#fff}
.inp{width:100%;height:36px;padding:0 12px;border-radius:9px;border:1px solid #cbd5e1;background:#fff;font-size:13px;color:#0f172a;outline:none}
.inp:focus{border-color:#0d9488;box-shadow:0 0 0 3px rgba(13,148,136,.12)}
.fld-lbl{display:block;font-size:12px;font-weight:500;color:#475569;margin-bottom:4px}
.badge{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border-radius:6px;font-size:11px;font-weight:600;white-space:nowrap}
.b-g{background:#dcfce7;color:#166534}.b-y{background:#fef3c7;color:#92400e}.b-p{background:#f3e8ff;color:#6b21a8}.b-m{background:#e0f2fe;color:#075985}.b-f{background:#ffe4e6;color:#9f1239}
.bed-top{display:flex;justify-content:space-between;align-items:center;gap:6px;margin-bottom:4px;font-size:12px}
.bed-lbl{display:inline-flex;align-items:center;gap:5px;color:#475569}
.list-row{display:flex;justify-content:space-between;align-items:center;padding:9px 0;border-bottom:1px solid #f1f5f9;font-size:13px}
.list-row:last-child{border-bottom:none}
table{width:100%;border-collapse:collapse;font-size:13px}
th{text-align:left;padding:10px 12px;background:#f8fafc;color:#475569;font-weight:600;border-bottom:1px solid #e2e8f0;white-space:nowrap}
td{padding:10px 12px;border-bottom:1px solid #f1f5f9;vertical-align:middle}
tr:hover td{background:#f8fafc}
.modal{position:fixed;inset:0;background:rgba(15,23,42,.45);display:flex;align-items:center;justify-content:center;padding:16px;z-index:100}
.modal-box{width:100%;max-width:640px;max-height:90vh;overflow-y:auto;background:#fff;border-radius:16px;padding:22px 24px;box-shadow:0 20px 35px rgba(15,23,42,.2)}
.step-pill{flex:1;text-align:center;padding:7px;border-radius:8px;background:#f1f5f9;color:#64748b;font-size:12px;font-weight:600}
.step-pill.act{background:#0f172a;color:#fff}
.toast{position:fixed;right:20px;bottom:20px;padding:11px 16px;border-radius:10px;background:#0f172a;color:#fff;font-size:13px;font-weight:500;z-index:200;box-shadow:0 8px 20px rgba(0,0,0,.18)}
.toast.err{background:#dc2626}
@media(max-width:900px){.grid2,.grid3,.fgrid,.kv-grid{grid-template-columns:1fr}}
.main{max-width:none!important;padding:24px 30px}
.rooms-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.hub-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;max-width:none!important}
.grid5{grid-template-columns:repeat(5,minmax(0,1fr))!important}
.sec-card,.card{width:100%}
.bed-card{transition:transform .12s,box-shadow .12s}
.bed-card:hover{transform:translateY(-1px);box-shadow:0 4px 10px rgba(15,23,42,.06)}
@media(max-width:1360px){.rooms-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1024px){.rooms-grid,.hub-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:680px){.rooms-grid,.hub-grid,.grid5{grid-template-columns:1fr!important}}
.kb-board{display:grid;grid-template-columns:repeat(5,minmax(230px,1fr));gap:12px;align-items:start;overflow-x:auto;padding-bottom:12px}
.kb-col{background:#e9eef5;border-radius:12px;padding:10px;min-height:520px;border:2px solid transparent;transition:border-color .15s,background .15s}
.kb-col.drag-over{border-color:#0d9488;background:#e0f2fe}
.kb-hdr{color:#fff;font-size:13px;font-weight:700;padding:9px 12px;border-radius:8px;margin-bottom:10px;display:flex;justify-content:space-between;align-items:center;box-shadow:0 2px 4px rgba(15,23,42,.08)}
.kb-cnt{background:rgba(255,255,255,.25);padding:1px 7px;border-radius:10px;font-size:11px}
.kb-card{background:#fff;border-radius:10px;padding:12px;margin-bottom:9px;border:1px solid #dbe2ea;box-shadow:0 1px 2px rgba(15,23,42,.04);cursor:grab;transition:transform .12s,box-shadow .12s}
.kb-card:hover{border-color:#94a3b8;box-shadow:0 4px 10px rgba(15,23,42,.08)}
.kb-card.dragging{opacity:.55;transform:rotate(1.5deg)}
.sidebar{width:262px;background:#fff;border-right:1px solid #e2e8f0;padding:16px 14px;display:flex;flex-direction:column;flex-shrink:0;position:sticky;top:0;height:100vh;overflow-y:auto}
.sb-brand{display:flex;align-items:center;gap:12px;padding:6px 8px 16px;margin-bottom:8px;border-bottom:1px solid #f1f5f9}
.sb-logo{width:38px;height:38px;border-radius:10px;background:linear-gradient(135deg,#0d9488 0%,#0f766e 100%);color:#fff;display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;box-shadow:0 2px 6px rgba(13,148,136,.25)}
.sb-logo img{width:100%;height:100%;object-fit:cover;background:#fff}
.sb-title{font-size:15px;font-weight:700;color:#0f172a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sb-sub{font-size:11px;color:#64748b}
.sb-nav{display:flex;flex-direction:column;gap:2px}
.sb-grp{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:#94a3b8;padding:12px 10px 4px}
.nav-item{width:100%;display:flex;align-items:center;gap:10px;padding:9px 11px;border:none;background:transparent;border-radius:10px;font-size:13.5px;font-weight:500;color:#475569;cursor:pointer;text-align:left;transition:.15s;position:relative}
.nav-item:hover{background:#f8fafc;color:#0f172a}
.nav-item.active{background:#f0fdf4;color:#0f766e;font-weight:600}
.nav-item.active::before{content:"";position:absolute;left:0;top:7px;bottom:7px;width:3px;border-radius:0 3px 3px 0;background:#0d9488}
.sb-badge{margin-left:auto;font-size:11px;font-weight:600;padding:1px 7px;border-radius:8px;background:#f1f5f9;color:#475569}
.nav-item.active .sb-badge{background:#dcfce7;color:#166534}
.sb-arr{margin-left:auto;font-size:11px;color:#94a3b8}
.sb-sublist{margin-left:18px;padding-left:10px;border-left:1.5px solid #e2e8f0;display:flex;flex-direction:column;gap:2px;margin-top:2px;margin-bottom:4px}
.nav-item.sub{font-size:13px;padding:7px 10px}
.sb-foot{margin-top:auto;padding-top:12px;border-top:1px solid #f1f5f9;display:flex;align-items:center;justify-content:space-between;gap:8px}
.sb-user{display:flex;align-items:center;gap:9px;min-width:0}
.sb-ava{width:34px;height:34px;border-radius:9px;background:#e2e8f0;color:#0f172a;font-size:12px;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.sb-logout{width:34px;height:34px;border-radius:9px;border:1px solid #e2e8f0;background:#fff;color:#64748b;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0}
.sb-logout:hover{background:#fff1f2;color:#e11d48;border-color:#fecdd3}
.act-group{display:inline-flex;align-items:center;justify-content:flex-end;gap:6px}
.icon-btn{width:30px;height:30px;padding:0;border-radius:8px;border:1px solid #cbd5e1;background:#fff;color:#334155;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:.15s;flex-shrink:0}
.icon-btn:hover{background:#f8fafc;border-color:#94a3b8;color:#0f172a}
.icon-btn-del{width:30px;height:30px;padding:0;border-radius:8px;border:1px solid #fecdd3;background:#fff1f2;color:#e11d48;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:.15s;flex-shrink:0}
.icon-btn-del:hover{background:#ffe4e6;border-color:#fda4af;color:#be123c}
.modal-x{width:32px;height:32px;border-radius:8px;border:1px solid transparent;background:#f8fafc;color:#64748b;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;font-size:18px;line-height:1;transition:.15s}
.modal-x:hover{background:#f1f5f9;color:#0f172a}

.donut-segment{cursor:help;transition:stroke-width .15s,opacity .15s}
.donut-segment:hover,.donut-segment:focus{stroke-width:7;opacity:.82;outline:none}
.donut-legend-row{transition:background .15s}
.donut-legend-row:hover{background:#f8fafc}
.daily-chart-scroll{width:100%;overflow-x:auto;overscroll-behavior-x:contain;padding:4px 0 8px}
.daily-chart-svg{display:block;max-width:none}
.daily-chart-group{cursor:help}
.daily-chart-group:focus{outline:none}
.daily-chart-group:hover .daily-chart-bar,.daily-chart-group:focus .daily-chart-bar{opacity:.75}
.daily-chart-bar{transition:opacity .15s}
.daily-chart-bar.income,.daily-chart-key.income{fill:#0d9488;background:#0d9488}
.daily-chart-bar.expense,.daily-chart-key.expense{fill:#e11d48;background:#e11d48}
.daily-chart-legend{display:flex;gap:16px;align-items:center;flex-wrap:wrap;margin-top:8px;color:#475569;font-size:12px}
.daily-chart-legend span{display:inline-flex;align-items:center;gap:6px}
.daily-chart-key{display:inline-block;width:10px;height:10px;border-radius:3px}
