@import url("/nusuk-extension/progress.css");

:root{font:15px/1.85 "Droid Arabic Kufi",Tahoma,"Segoe UI",sans-serif;color:#272038;background:#f8f6f3;--ink:#292043;--muted:#655f72;--line:#e3dce7;--paper:#fffdfc;--accent:#97533f;--soft:#f7e8e3}
*{box-sizing:border-box}
body{margin:0;min-height:100vh}
a{color:inherit}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible{outline:3px solid #ab6652;outline-offset:3px}
h1,h2,h3,p{margin:0}
h1{font-size:clamp(1.85rem,5vw,3.4rem);line-height:1.2}
h2{font-size:1.45rem;line-height:1.35}
h3{font-size:1.05rem}
small,.muted{color:var(--muted)}
.container{width:min(1180px,calc(100% - 36px));margin:0 auto;padding:32px 0 64px}
.topbar{background:#fffdfb;border-bottom:1px solid var(--line)}
.top-inner{min-height:72px;width:min(1180px,calc(100% - 36px));margin:auto;display:flex;justify-content:space-between;align-items:center;gap:12px}
.brand{display:flex;align-items:center;gap:12px;font-weight:bold;text-decoration:none}
.brand img{width:41px;height:41px}
.brand small{display:block;font-weight:normal;font-size:.76rem}
.nav{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.button{border:1px solid transparent;border-radius:10px;background:var(--ink);color:white;padding:.52rem .92rem;min-height:42px}
.button:hover{filter:brightness(1.15)}
.button.light{background:var(--paper);border-color:var(--line);color:var(--ink)}
.button.text{background:transparent;color:var(--ink)}
.button[disabled]{opacity:.6;cursor:wait}
.hero{overflow:hidden;position:relative;display:flex;justify-content:space-between;align-items:center;gap:24px;border-radius:24px;padding:30px 36px;background:#292043;color:#fff9f5;margin-bottom:26px;isolation:isolate}
.hero::after{content:"";position:absolute;left:-90px;top:-150px;width:365px;height:365px;border:1px solid #5c506e;border-radius:50%;box-shadow:0 0 0 28px #342a4b,0 0 0 29px #5c506e,0 0 0 55px #342a4b,0 0 0 56px #5c506e;z-index:-1}
.hero p{color:#e9deef;margin-top:10px;max-width:36rem}
.hero .eyebrow{color:#fac0ac}
.eyebrow{font-size:.79rem;letter-spacing:.035em;font-weight:bold;color:var(--accent);margin-bottom:8px}
.hero .button{background:#f5d1c4;color:#382537;white-space:nowrap}
.panel,.tile{background:var(--paper);border:1px solid var(--line);border-radius:18px;padding:20px}
.housing-hourly{background:var(--paper);border:1px solid var(--line);border-radius:18px;padding:20px;margin:18px 0;display:grid;gap:12px}
.housing-hourly select{width:100%;max-width:430px}.housing-hourly ol{padding-inline-start:22px}.housing-hourly li{padding:7px 0;border-bottom:1px solid var(--line)}
.tile{min-height:108px}
.tiles,.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,235px),1fr));gap:12px;margin:14px 0 24px}
.tile strong{font-size:1.8rem;font-variant-numeric:tabular-nums;display:block}
.section-head,.row{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.section-head{margin:24px 0 12px}
.stack{display:grid;gap:10px}
.work-row{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;background:var(--paper);border:1px solid var(--line);border-radius:14px;padding:14px 16px}
.work-row .button{white-space:nowrap}
.number{color:var(--accent);background:var(--soft);border-radius:10px;font-size:.8rem;font-weight:bold;min-width:35px;min-height:35px;display:grid;place-content:center}
.tag{display:inline-block;font-size:.76rem;border-radius:999px;padding:.12rem .55rem;background:#eee9f3;color:#473a59;white-space:nowrap}
.tag.warn{background:#f9e1da;color:#743623}
.empty{padding:30px;text-align:center;color:var(--muted);border:1px dashed #d9cfde;border-radius:14px}
.login-grid{min-height:68vh;display:grid;grid-template-columns:1.08fr 1fr;gap:18px;align-items:stretch;max-width:900px;margin:24px auto}
.login-grid .hero{margin:0;display:flex;align-items:end;min-height:360px}
.login-grid .panel{display:grid;align-content:center;padding:28px}
form{display:grid;gap:13px}
label{display:grid;gap:4px;font-size:.91rem;font-weight:bold}
input:not([type=checkbox]),select,textarea{color:var(--ink);width:100%;border:1px solid #d9d0df;border-radius:9px;background:#fff;padding:.48rem .62rem;min-height:42px}
textarea{min-height:80px;resize:vertical}
fieldset{border:0;margin:0;padding:0;min-width:0}
legend{font-weight:bold;margin-bottom:8px}
.check-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr));gap:8px}
.check{display:grid;grid-template-columns:auto 1fr;gap:8px;align-items:center;border:1px solid var(--line);border-radius:10px;padding:8px}
.check input{accent-color:#5e477b;width:17px;height:17px}
.check small{display:block;font-weight:normal}
dialog{width:min(660px,calc(100% - 24px));max-height:90vh;border:1px solid var(--line);border-radius:18px;padding:22px;background:var(--paper);color:var(--ink)}
dialog::backdrop{background:#1e1428a0}
dialog h2{margin-bottom:12px}
.actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
#message{display:none;position:fixed;inset:auto 16px 16px auto;max-width:min(480px,calc(100% - 32px));background:var(--ink);color:#fff;padding:10px 14px;border-radius:10px;z-index:4}
#message.visible{display:block}
.error{color:#842e1f;min-height:1.2em}
hr{border:0;border-top:1px solid var(--line);margin:14px 0}
@media(max-width:680px){
  .container{width:calc(100% - 24px);padding-top:18px}
  .top-inner{width:calc(100% - 24px);min-height:64px}
  .hero{padding:24px;align-items:flex-start;flex-direction:column}
  .login-grid{grid-template-columns:1fr;margin:0;min-height:auto}
  .login-grid .hero{min-height:185px}
  .login-grid .panel{padding:20px}
  .work-row{grid-template-columns:auto 1fr}
  .work-row>.actions,.work-row>.button{grid-column:2;justify-self:start}
  .brand small{font-size:.69rem}
}

.housing-panel{margin-top:20px}
.housing-panel .section-head{margin-top:0}
.housing-panel .empty{margin-top:12px}
.housing-table{margin:12px 0;max-width:100%;overflow:auto}
.housing-table table{border-collapse:collapse;width:100%;min-width:640px;text-align:start}
.housing-table th,.housing-table td{padding:8px 10px;text-align:start;border-bottom:1px solid var(--line);vertical-align:top}
.housing-table th{background:#eee9f3}

.housing-automation{padding-block:1rem;margin-block:1rem;border-block:1px solid #ddd4e3}
.housing-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px;margin-bottom:12px}
.housing-automation .housing-table{margin-block:.75rem;max-height:340px}
.housing-automation input[type=checkbox]{width:auto;margin-inline-end:.5rem}
.housing-automation .housing-consent{display:flex;align-items:center;gap:.4rem;margin-block:1rem}
#housing-date-option[hidden]{display:none}

body {
  background: linear-gradient(155deg, #f1eaf7, #faf8f5 30rem) fixed;
}
.topbar { box-shadow: 0 2px 12px #2920430a; }
.top-inner { min-height: 66px; }
.hero {
  background: linear-gradient(135deg, #292043, #4c3761);
  border-radius: 20px;
  box-shadow: 0 10px 22px #30214622;
}
.hero h1 { font-size: clamp(1.65rem, 4.5vw, 2.75rem); line-height: 1.5; }
.hero p { font-size: .93rem; }
.panel, .tile, .work-row, dialog { box-shadow: 0 2px 11px #2f224a0a; }
.panel { border-radius: 15px; }
.tile { border-inline-start: 3px solid #a68abf; }
.service-nav {
  background: #fffdfc;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
  gap: 6px;
  box-shadow: 0 2px 10px #2f224a0a;
}
.service-nav .button { font-size: .85rem; min-height: 38px; }
.service-nav .button[aria-pressed="true"] { background: #4c3569; }
.service-nav .button[aria-pressed="false"] { border-color: #e9e1ef; }
.service-nav .button[aria-pressed="false"]:hover { background: #f3edf8; filter: none; }
#service-view > .panel:first-child { margin-top: 16px; }
.work-row > div { min-width: 0; overflow-wrap: anywhere; }
.housing-table { border: 1px solid var(--line); border-radius: 11px; }
.housing-table tbody tr:nth-child(even) { background: #f9f5fc; }
.housing-table tbody tr:last-child td { border-bottom: 0; }
.housing-table th { white-space: nowrap; }
.progress-slot {
  position: sticky;
  top: 0;
  z-index: 3;
  width: min(1180px, calc(100% - 36px));
  margin-inline: auto;
}
.progress-slot .edrak-progress { max-width: 36rem; box-shadow: 0 3px 12px #34224718; }
@media (max-width: 680px) {
  .progress-slot { width: calc(100% - 24px); }
  .service-nav { flex-wrap: nowrap; overflow: auto; }
  .service-nav .button { flex: 0 0 auto; }
}

.portal-dispatch { margin-top: 16px; }
.portal-dispatch .section-head { margin-top: 0; }
.portal-dispatch #dispatch-preview { max-width: 34rem; }
.dispatch-history, .dispatch-groups details {
  background: #faf7fd;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .65rem .85rem;
  margin-block: .6rem;
}
.dispatch-history summary, .dispatch-groups summary { cursor: pointer; }
.dispatch-summary, .dispatch-groups dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: .35rem .9rem;
  padding: .8rem 1rem;
  background: #faf7fd;
  border-radius: 12px;
}
.dispatch-summary dd, .dispatch-groups dd { margin: 0; overflow-wrap: anywhere; }
.portal-dispatch #dispatch-workbook { margin-block: .8rem; }
.portal-dispatch #workbook-status, .portal-dispatch #dispatch-download-controls .edrak-progress { flex-basis: 100%; }
.case-alerts { background: #faf5fd; border: 1px solid var(--line); border-radius: 12px; padding: .75rem 1rem; }
.case-alerts ul { max-height: 9rem; overflow: auto; margin: .5rem 0 0; }
.case-alerts ul:empty { display: none; }

.company-profile-badges{display:inline-flex;align-items:center;gap:.5rem;flex-wrap:wrap;font-size:12px;line-height:1.9;padding:5px 11px;border:1px solid #b8aa7840;border-radius:12px;background:#b8aa7812;color:inherit;font-weight:500}.company-profile-badges[hidden]{display:none}

.company-band-badge{display:inline-flex;align-items:center;padding:3px 10px;border-radius:8px;font-weight:700;line-height:1.8;background:#ebe8f2;color:inherit}.company-profile-period,.company-profile-stale{font-size:11px;opacity:.85}
