/* Hotel Kimininga Cloud v37 — master operational UI standard */
:root{
  --hk-bg-main:#06182b;
  --hk-bg-deep:#04111f;
  --hk-bg-panel:#0a2239;
  --hk-bg-panel-2:#0d2943;
  --hk-bg-input:#071a2d;
  --hk-teal:#22c7b5;
  --hk-teal-dark:#169b91;
  --hk-gold:#d8a72e;
  --hk-success:#29c982;
  --hk-warning:#e6b83f;
  --hk-danger:#ef4444;
  --hk-text-primary:#f4f7fb;
  --hk-text-secondary:#aab8c8;
  --hk-border:rgba(91,154,196,.35);
  --hk-shadow:0 18px 45px rgba(0,0,0,.22);
}

/* Task forms get maximum usable width: no department/sidebar navigation after task selection. */
body.hk-form-mode #hkSidebar{display:none!important;}
body.hk-form-mode #appView{grid-template-columns:1fr!important;display:block!important;}
body.hk-form-mode #appView>.workspace{margin-left:0!important;width:100%!important;max-width:none!important;min-width:0!important;display:flex!important;flex-direction:column!important;min-height:100vh!important;background:linear-gradient(180deg,var(--hk-bg-deep),var(--hk-bg-main))!important;}
body.hk-form-mode #appView>.workspace>.topbar{position:sticky!important;top:0;z-index:80;min-height:74px!important;padding:12px 22px!important;background:rgba(4,17,31,.96)!important;border-bottom:1px solid var(--hk-border)!important;backdrop-filter:blur(12px);}
body.hk-form-mode #appView>.workspace>.topbar .workspace-brand-banner{display:none!important;}
body.hk-form-mode #appView>.workspace>.topbar .topbar-left h3{font-size:24px!important;color:#fff!important;margin:0 0 4px!important;}
body.hk-form-mode #appView>.workspace>.topbar .muted{color:#91a6ba!important;font-size:12px!important;}
body.hk-form-mode #appView>.workspace>.topbar .top-actions{display:flex!important;gap:9px!important;align-items:center!important;}
body.hk-form-mode #appView>.workspace>.topbar button{min-height:42px!important;border-radius:12px!important;border:1px solid var(--hk-border)!important;background:#0d2943!important;color:#dce9f5!important;padding:0 15px!important;transition:.2s ease!important;}
body.hk-form-mode #appView>.workspace>.topbar .operations-home-btn{border-color:rgba(216,167,46,.45)!important;color:#ffdb76!important;}
body.hk-form-mode #appView>.workspace>.topbar button:hover{transform:translateY(-1px);filter:brightness(1.08);box-shadow:0 8px 20px rgba(0,0,0,.18);}
body.hk-form-mode #content{width:100%!important;max-width:1600px!important;margin:0 auto!important;padding:18px 22px 28px!important;box-sizing:border-box!important;overflow:visible!important;color:var(--hk-text-primary)!important;}
body.hk-form-mode .department-context-bar{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;margin:0 0 12px!important;padding:9px 12px!important;border-radius:12px!important;background:#092038!important;border:1px solid var(--hk-border)!important;color:#a9bfd3!important;}
body.hk-form-mode .department-context-bar button{border:0!important;background:transparent!important;color:#7fe4d8!important;font-weight:800!important;cursor:pointer!important;}

/* Shared form surfaces */
body.hk-form-mode .form-card,
body.hk-form-mode .polished-form-card,
body.hk-form-mode .hr-card,
body.hk-form-mode .myob-section,
body.hk-form-mode .table-card{
  background:linear-gradient(180deg,rgba(10,34,57,.98),rgba(7,26,45,.98))!important;
  border:1px solid var(--hk-border)!important;
  border-radius:18px!important;
  box-shadow:0 12px 30px rgba(0,0,0,.13)!important;
  color:var(--hk-text-primary)!important;
}
body.hk-form-mode .form-card,body.hk-form-mode .polished-form-card,body.hk-form-mode .hr-card{padding:18px 20px!important;}
body.hk-form-mode .form-card h2,body.hk-form-mode .form-card h3,body.hk-form-mode .form-card h4,
body.hk-form-mode .hr-card h2,body.hk-form-mode .hr-card h3,
body.hk-form-mode .module-polish-banner h2{color:#fff!important;}
body.hk-form-mode .form-card p,body.hk-form-mode .hr-card p,body.hk-form-mode .muted{color:var(--hk-text-secondary)!important;}

/* Section headings: gold sparingly */
body.hk-form-mode fieldset{border:1px solid var(--hk-border)!important;border-radius:16px!important;padding:16px!important;margin:12px 0!important;background:rgba(4,22,39,.34)!important;}
body.hk-form-mode legend,body.hk-form-mode .section-title,body.hk-form-mode .module-kicker,
body.hk-form-mode .hr-section-head h2{color:#f0c963!important;font-weight:800!important;letter-spacing:.035em!important;}

/* Inputs / labels */
body.hk-form-mode label{color:#dbe6f1!important;font-weight:700!important;font-size:13px!important;line-height:1.35!important;}
body.hk-form-mode input:not([type=checkbox]):not([type=radio]),
body.hk-form-mode select,body.hk-form-mode textarea{
  width:100%;box-sizing:border-box;min-height:46px!important;border-radius:11px!important;
  border:1px solid rgba(71,139,182,.62)!important;background:var(--hk-bg-input)!important;
  color:#eef5fb!important;padding:10px 13px!important;outline:none!important;box-shadow:none!important;
  transition:border-color .2s ease,box-shadow .2s ease,background .2s ease!important;
}
body.hk-form-mode textarea{min-height:88px!important;resize:vertical;}
body.hk-form-mode input::placeholder,body.hk-form-mode textarea::placeholder{color:#8497aa!important;opacity:1!important;}
body.hk-form-mode input:focus,body.hk-form-mode select:focus,body.hk-form-mode textarea:focus{
  border-color:var(--hk-teal)!important;box-shadow:0 0 0 3px rgba(34,199,181,.15)!important;background:#081f35!important;
}
body.hk-form-mode input:invalid:not(:placeholder-shown){border-color:rgba(239,68,68,.72)!important;}
body.hk-form-mode .form-grid,body.hk-form-mode .hr-form-grid,body.hk-form-mode .myob-form-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px 16px!important;}
body.hk-form-mode .form-grid .full,body.hk-form-mode .hr-form-grid .full,body.hk-form-mode .myob-form-grid .full{grid-column:1/-1!important;}

/* Buttons */
body.hk-form-mode button{transition:transform .2s ease,box-shadow .2s ease,filter .2s ease,border-color .2s ease!important;}
body.hk-form-mode .primary-btn:not(.danger-btn),
body.hk-form-mode .success-btn,
body.hk-form-mode button[id*="Save" i]:not(.danger-btn),
body.hk-form-mode button[id*="Process" i]:not(.danger-btn),
body.hk-form-mode button[id*="Complete" i]:not(.danger-btn),
body.hk-form-mode button[id*="Generate" i]:not(.danger-btn){
  background:linear-gradient(135deg,var(--hk-teal-dark),var(--hk-teal))!important;color:#fff!important;border:1px solid rgba(83,232,214,.45)!important;border-radius:12px!important;font-weight:800!important;box-shadow:0 10px 24px rgba(22,155,145,.17)!important;
}
body.hk-form-mode .danger-btn,body.hk-form-mode button[data-delete],body.hk-form-mode button[id*="Delete" i]{background:#3a1720!important;color:#ff9aa7!important;border-color:rgba(239,68,68,.52)!important;}
body.hk-form-mode button:hover:not(:disabled){transform:translateY(-1px)!important;filter:brightness(1.07)!important;box-shadow:0 9px 20px rgba(0,0,0,.15)!important;}
body.hk-form-mode button:disabled,body.hk-form-mode .hk-action-restricted{opacity:.38!important;cursor:not-allowed!important;filter:grayscale(.25)!important;transform:none!important;}
body.hk-form-mode .form-actions,body.hk-form-mode .actions{gap:10px!important;align-items:center!important;}

/* Tables */
body.hk-form-mode .table-card{overflow:hidden!important;padding:0!important;}
body.hk-form-mode .table-wrap,body.hk-form-mode .hr-table-wrap{overflow:auto!important;max-width:100%!important;}
body.hk-form-mode table{width:100%!important;border-collapse:separate!important;border-spacing:0!important;color:#dce8f3!important;}
body.hk-form-mode thead th{position:sticky;top:0;background:#0e2b47!important;color:#d7ebf8!important;border-bottom:1px solid rgba(83,150,193,.45)!important;font-size:12px!important;text-transform:none!important;}
body.hk-form-mode th,body.hk-form-mode td{padding:11px 12px!important;border-bottom:1px solid rgba(91,154,196,.16)!important;}
body.hk-form-mode tbody tr:hover td{background:rgba(34,199,181,.055)!important;}

/* Module banner / status badges */
body.hk-form-mode .module-polish-banner{border:1px solid rgba(216,167,46,.35)!important;border-radius:18px!important;background:linear-gradient(110deg,#0b2943,#11283c)!important;box-shadow:var(--hk-shadow)!important;}
body.hk-form-mode .tag,body.hk-form-mode .status-tag,body.hk-form-mode .hr-status{border-radius:999px!important;}

/* HR: dashboard then direct task, no submenu bar once a task opens */
.hr-dashboard-kpi-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:12px 0 16px;}
.hr-direct-task-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;}
.hr-direct-task-grid button{min-height:118px;text-align:left;padding:16px;border-radius:16px;border:1px solid rgba(91,154,196,.34);background:linear-gradient(145deg,#0c2944,#091e34);color:#fff;display:flex;flex-direction:column;align-items:flex-start;gap:7px;}
.hr-direct-task-grid button strong{font-size:16px;color:#fff;}.hr-direct-task-grid button span{color:#a8bacb;font-size:12px;line-height:1.45;}.hr-direct-task-grid button b{margin-top:auto;color:#62dccf;}
.hr-direct-task-grid button:hover{transform:translateY(-2px);border-color:rgba(34,199,181,.7);box-shadow:0 14px 28px rgba(0,0,0,.18);}
.hr-task-return{display:flex;align-items:center;justify-content:space-between;margin:0 0 12px;padding:9px 12px;border:1px solid rgba(91,154,196,.32);border-radius:12px;background:#081d32;color:#9cb3c8;}
.hr-task-return button{background:transparent;border:0;color:#6fe2d5;font-weight:800;cursor:pointer;}

/* Action access editor */
.action-access-editor{margin-top:14px!important;padding:14px!important;border:1px solid var(--hk-border)!important;border-radius:16px!important;background:#081e33!important;}
.action-access-grid{display:grid;grid-template-columns:repeat(7,minmax(100px,1fr));gap:8px;margin-top:10px;}
.action-access-grid label{display:flex!important;align-items:center!important;gap:7px!important;padding:10px!important;border:1px solid rgba(91,154,196,.25)!important;border-radius:10px!important;background:#0b2943!important;}

/* Footer must not cover forms. */
body.hk-form-mode #appView>.workspace>footer.system-footer{position:sticky!important;bottom:0!important;z-index:70!important;min-height:54px!important;margin-top:auto!important;padding:8px 18px!important;background:rgba(4,17,31,.97)!important;border-top:1px solid var(--hk-border)!important;box-shadow:0 -10px 25px rgba(0,0,0,.16)!important;}
body.hk-form-mode #content{padding-bottom:28px!important;}

/* Modals / work windows stay clean and centered */
body.hk-form-mode .modal,body.hk-form-mode .work-window,body.hk-form-mode .reservation-window,body.hk-form-mode .checkinout-window{max-width:min(1500px,calc(100vw - 28px))!important;border-radius:20px!important;}

@media(max-width:1100px){.hr-dashboard-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr));}.hr-direct-task-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.action-access-grid{grid-template-columns:repeat(4,minmax(100px,1fr));}}
@media(max-width:760px){body.hk-form-mode #content{padding:12px!important;}body.hk-form-mode .form-grid,body.hk-form-mode .hr-form-grid,body.hk-form-mode .myob-form-grid{grid-template-columns:1fr!important;}.hr-dashboard-kpi-grid,.hr-direct-task-grid{grid-template-columns:1fr;}.action-access-grid{grid-template-columns:repeat(2,minmax(0,1fr));}body.hk-form-mode #appView>.workspace>.topbar{padding:10px 12px!important;flex-wrap:wrap!important;}body.hk-form-mode #appView>.workspace>footer.system-footer{position:relative!important;flex-wrap:wrap!important;}}
