:root{--bg:#f5f5f7;--surface:rgba(255,255,255,.82);--surface-solid:#fff;--ink:#1d1d1f;--muted:#6e6e73;--line:rgba(0,0,0,.08);--blue:#0071e3;--blue2:#0a84ff;--green:#34c759;--red:#ff3b30;--gold:#b59657;--shadow:0 18px 50px rgba(0,0,0,.08);--shadow2:0 8px 24px rgba(0,0,0,.06);--r:24px;--ease:cubic-bezier(.2,.75,.25,1)}
*{box-sizing:border-box}html{background:var(--bg);scroll-behavior:smooth}body{margin:0;background:radial-gradient(circle at 80% 0,#fff 0,#f7f7f8 28%,var(--bg) 58%);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Tahoma,Arial,sans-serif;-webkit-font-smoothing:antialiased;min-height:100vh}.hidden{display:none!important}button,input,select,textarea{font:inherit}button{transition:transform .2s var(--ease),box-shadow .2s var(--ease),background .2s var(--ease),opacity .2s var(--ease)}button:active{transform:scale(.975)}input,select,textarea{outline:none;transition:border-color .2s,box-shadow .2s,background .2s}input:focus,select:focus,textarea:focus{border-color:rgba(0,113,227,.45)!important;box-shadow:0 0 0 4px rgba(0,113,227,.10)}
.glass{backdrop-filter:saturate(180%) blur(22px);-webkit-backdrop-filter:saturate(180%) blur(22px)}.app-shell{display:grid;grid-template-columns:255px minmax(0,1fr);min-height:100vh}.sidebar{position:sticky;top:0;height:100vh;background:rgba(246,246,248,.80);border-left:1px solid var(--line);padding:22px 16px;display:flex;flex-direction:column;z-index:30}.brand{display:flex;gap:11px;align-items:center;padding:4px 7px 25px}.brand-mark,.login-logo{display:grid;place-items:center;background:linear-gradient(145deg,#202124,#4b4c50);color:#fff;font-weight:800;letter-spacing:-1px;box-shadow:0 8px 25px rgba(0,0,0,.16)}.brand-mark{width:42px;height:42px;border-radius:13px}.brand strong{display:block;font-size:15px}.brand small{display:block;color:var(--muted);font-size:11px;margin-top:2px}.sidebar nav{display:grid;gap:5px}.nav-btn{display:flex;align-items:center;gap:11px;width:100%;border:0;background:transparent;border-radius:13px;padding:11px 13px;color:#444;text-align:right;cursor:pointer;font-weight:650}.nav-btn span{width:22px;text-align:center;color:#7d7d82}.nav-btn:hover{background:rgba(0,0,0,.04)}.nav-btn.active{background:#fff;color:#111;box-shadow:0 4px 16px rgba(0,0,0,.06)}.nav-btn.active span{color:var(--blue)}.sidebar-foot{margin-top:auto;padding:12px 8px;color:var(--muted);font-size:11px;display:grid;gap:4px}.sync-on{color:#238636!important}
main{min-width:0;padding:0 34px 42px}.topbar{position:sticky;top:0;z-index:20;margin:0 -34px;padding:17px 34px 14px;background:rgba(245,245,247,.72);display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid rgba(0,0,0,.045)}.topbar h1{font-size:26px;letter-spacing:-.7px;margin:0}.topbar p{margin:4px 0 0;color:var(--muted);font-size:12px}.top-actions{display:flex;align-items:center;gap:8px}.top-input{border:1px solid var(--line);background:rgba(255,255,255,.78);border-radius:11px;padding:9px 11px;max-width:145px}.pill{background:#fff;border:1px solid var(--line);padding:8px 11px;border-radius:999px;font-size:12px;color:#515154}.avatar-btn{width:38px;height:38px;border-radius:50%;border:0;background:#1d1d1f;color:#fff;font-weight:750;cursor:pointer;box-shadow:0 4px 14px rgba(0,0,0,.16)}
.view{display:none;animation:fadeUp .38s var(--ease)}.view.active{display:block}@keyframes fadeUp{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}.premium-card,.panel{background:var(--surface);border:1px solid rgba(255,255,255,.7);box-shadow:var(--shadow2);border-radius:var(--r)}.hero-card{margin:28px 0 18px;display:grid;grid-template-columns:.95fr 1.05fr;gap:28px;padding:30px;overflow:hidden;position:relative}.hero-card:after{content:"";position:absolute;width:300px;height:300px;border-radius:50%;background:radial-gradient(circle,rgba(0,113,227,.11),transparent 68%);left:-120px;top:-130px;pointer-events:none}.eyebrow{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--blue);font-weight:750}.hero-copy h2{font-size:34px;letter-spacing:-1.2px;line-height:1.15;margin:10px 0}.hero-copy p{color:var(--muted);line-height:1.7;margin:0;max-width:520px}.capture-box{position:relative;z-index:2;background:rgba(250,250,252,.82);border:1px solid var(--line);border-radius:20px;padding:13px;box-shadow:inset 0 1px 0 rgba(255,255,255,.8)}textarea{width:100%;resize:vertical;border:0;background:transparent;min-height:118px;padding:12px;color:var(--ink);font-size:15px;line-height:1.7}.capture-actions{display:flex;justify-content:flex-end;gap:8px;padding-top:7px}.primary,.secondary,.danger-btn,.file-btn{border:0;border-radius:12px;padding:10px 15px;cursor:pointer;font-weight:700}.primary{background:linear-gradient(180deg,var(--blue2),var(--blue));color:#fff;box-shadow:0 5px 15px rgba(0,113,227,.20)}.primary:hover{box-shadow:0 8px 22px rgba(0,113,227,.25)}.secondary,.file-btn{background:#fff;color:#252529;border:1px solid var(--line)}.danger-btn{background:#fff1f0;color:#c12f29}.voice-btn{border:0;border-radius:12px;padding:10px 15px;background:#1d1d1f;color:#fff;cursor:pointer}.voice-btn.listening{background:#d93025;box-shadow:0 0 0 6px rgba(217,48,37,.09)}
.stats{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin-bottom:18px}.stat{background:rgba(255,255,255,.78);border:1px solid rgba(0,0,0,.05);border-radius:18px;padding:17px;box-shadow:0 6px 20px rgba(0,0,0,.035)}.stat b{font-size:28px;display:block;letter-spacing:-1px}.stat span{color:var(--muted);font-size:12px}.panel{padding:21px;margin-bottom:18px}.panel h3{margin:0 0 7px}.panel-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px}.panel-head p,.hint{margin:3px 0;color:var(--muted);font-size:12px;line-height:1.6}.records{display:grid;gap:8px}.record{display:grid;grid-template-columns:165px 88px 1fr 175px;align-items:center;gap:12px;padding:13px 14px;border:1px solid var(--line);border-radius:16px;background:rgba(255,255,255,.72);transition:.2s var(--ease)}.record:hover{transform:translateY(-1px);box-shadow:0 8px 22px rgba(0,0,0,.05);background:#fff}.record .type{font-weight:750;font-size:13px}.record small{color:var(--muted);font-size:10px}.record .room{font-weight:750}.record .text{font-size:13px;line-height:1.55}.record-end{display:flex;align-items:center;justify-content:space-between;gap:7px}.record-actions{display:flex;gap:5px}.record-actions button{border:0;border-radius:9px;padding:6px 8px;background:#f0f0f2;cursor:pointer;font-size:11px}.record-actions .danger{color:#a22b26;background:#fff0ef}.empty{padding:30px;text-align:center;color:var(--muted);border:1px dashed rgba(0,0,0,.12);border-radius:16px;background:rgba(255,255,255,.4)}
.filters,.print-builder{display:grid;grid-template-columns:1.5fr 1fr 1fr 1fr auto;gap:9px;align-items:end;margin-bottom:18px}.filters input,.filters select,.print-builder input,.print-builder select,.settings-grid input,.settings-grid select{border:1px solid var(--line);background:#fff;border-radius:11px;padding:10px 11px;color:var(--ink)}.print-builder label{display:block;font-size:11px;color:var(--muted);margin:0 0 6px}.print-builder>div>*{width:100%}.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:28px}.switch-row{display:flex;gap:10px;align-items:center;margin:14px 0}.setting-line{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:14px 0}.setting-line input{width:78px}.row{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.file-btn{display:inline-flex;align-items:center}.file-btn input{display:none}.password-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.template-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:13px}.template-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:13px}.template-card img{width:100%;height:160px;object-fit:contain;background:#fafafa;border:1px solid var(--line);border-radius:12px;margin-bottom:10px}.template-card strong{display:block}.template-card p{margin:3px 0 10px;color:var(--muted);font-size:12px}.template-card a{color:var(--blue);font-size:12px;text-decoration:none}.audit-list{display:grid;gap:7px}.audit-row{display:grid;grid-template-columns:1fr 190px 180px;gap:10px;padding:12px;border:1px solid var(--line);background:#fff;border-radius:13px;align-items:center}.audit-row div{display:flex;gap:9px;align-items:center}.audit-row span{color:var(--muted);font-size:12px}.audit-row small{color:var(--muted)}.audit-row code{direction:ltr;text-align:left;font-size:11px;color:#777;overflow:hidden;text-overflow:ellipsis}
.modal{position:fixed;inset:0;background:rgba(18,18,20,.35);z-index:100;display:grid;place-items:center;padding:18px;backdrop-filter:blur(15px)}.modal-card{width:min(760px,100%);max-height:90vh;overflow:auto;background:rgba(255,255,255,.96);border-radius:26px;padding:23px;box-shadow:0 35px 90px rgba(0,0,0,.24);animation:modalIn .28s var(--ease)}@keyframes modalIn{from{opacity:0;transform:scale(.97) translateY(8px)}to{opacity:1;transform:none}}.modal-head{display:flex;justify-content:space-between;align-items:start}.modal-head h3{margin:5px 0 18px;font-size:24px}.icon-btn{width:38px;height:38px;border:0;border-radius:50%;font-size:25px;background:#f2f2f4;cursor:pointer}.review-grid{display:grid;grid-template-columns:1.3fr 1fr 1fr;gap:10px}.review-grid label,.review-fields label,.full-label{font-size:12px;color:var(--muted);display:block}.review-grid input,.review-grid select,.review-fields input{width:100%;margin-top:6px;border:1px solid var(--line);border-radius:11px;padding:10px;background:#fff;color:var(--ink)}.full-label{margin-top:12px}.full-label textarea{margin-top:6px;border:1px solid var(--line);border-radius:12px;padding:10px;min-height:80px;background:#fff}.review-fields{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:10px}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}.toast{position:fixed;bottom:24px;left:50%;transform:translate(-50%,18px);background:rgba(29,29,31,.94);backdrop-filter:blur(14px);color:#fff;padding:10px 18px;border-radius:999px;opacity:0;pointer-events:none;transition:.22s var(--ease);z-index:200;box-shadow:0 10px 30px rgba(0,0,0,.18)}.toast.show{opacity:1;transform:translate(-50%,0)}
.login-screen{position:fixed;inset:0;z-index:500;display:grid;place-items:center;overflow:hidden;background:linear-gradient(145deg,#f5f5f7,#fff)}.login-orb{position:absolute;border-radius:50%;filter:blur(4px);opacity:.65}.orb-a{width:480px;height:480px;right:-170px;top:-160px;background:radial-gradient(circle,#d9edff,transparent 68%)}.orb-b{width:520px;height:520px;left:-220px;bottom:-250px;background:radial-gradient(circle,#f0e6d0,transparent 68%)}.login-card{position:relative;z-index:2;width:min(420px,calc(100% - 34px));padding:34px;background:rgba(255,255,255,.74);border:1px solid rgba(255,255,255,.85);backdrop-filter:blur(28px) saturate(170%);border-radius:30px;box-shadow:0 32px 80px rgba(0,0,0,.12)}.login-logo{width:58px;height:58px;border-radius:18px;margin-bottom:20px;font-size:20px}.login-card h1{font-size:34px;letter-spacing:-1.2px;margin:8px 0 4px}.login-card>p{color:var(--muted);margin:0 0 24px;line-height:1.6}.login-card label{display:block;font-size:12px;color:var(--muted);margin:11px 0}.login-card input{width:100%;border:1px solid var(--line);border-radius:13px;padding:13px;background:rgba(255,255,255,.86);color:var(--ink);margin-top:6px}.login-submit{width:100%;margin-top:10px;padding:13px}.password-wrap{position:relative}.password-wrap input{padding-left:45px}.text-icon{position:absolute;left:7px;top:12px;border:0;background:transparent;width:35px;height:35px;color:#777;cursor:pointer}.login-status{min-height:22px;color:#c5332d;font-size:12px;text-align:center;margin-top:10px}.privacy-note{display:block;text-align:center;color:#929297;font-size:10px;line-height:1.5;margin-top:10px}
.print-preview{overflow-x:auto}.template-print-page{position:relative;background:#fff;margin:0 auto 20px;box-shadow:0 10px 35px rgba(0,0,0,.09);overflow:hidden}.template-print-page.landscape{width:min(100%,297mm);aspect-ratio:1638/1158}.template-print-page.portrait{width:min(100%,210mm);aspect-ratio:1158/1638}.template-bg{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;display:block}.template-overlay{position:absolute;inset:0}.tpl-cell{position:absolute;display:flex;align-items:center;justify-content:center;overflow:hidden;line-height:1.15;padding:1px 3px;color:#111;font-family:Arial,Tahoma,sans-serif;direction:rtl;white-space:normal}.meta-cell{font-weight:600;background:rgba(255,255,255,.35)}.footer-cell{font-weight:600}
@media(max-width:1000px){.stats{grid-template-columns:repeat(3,1fr)}.record{grid-template-columns:140px 75px 1fr}.record-end{grid-column:1/-1}.template-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:820px){body{padding-bottom:76px}.app-shell{display:block}.sidebar{position:fixed;z-index:50;bottom:0;top:auto;right:0;left:0;width:100%;height:72px;border:0;border-top:1px solid var(--line);padding:7px 8px;background:rgba(248,248,250,.88)}.brand,.sidebar-foot{display:none}.sidebar nav{display:grid;grid-template-columns:repeat(6,1fr);gap:2px}.nav-btn{justify-content:center;flex-direction:column;gap:2px;padding:5px 1px;border-radius:10px;font-size:9px;white-space:nowrap}.nav-btn span{font-size:17px;height:20px}.nav-btn.active{box-shadow:none;background:rgba(0,113,227,.08);color:var(--blue)}main{padding:0 14px 20px}.topbar{margin:0 -14px;padding:13px 14px 10px}.topbar h1{font-size:21px}.top-input,.pill,.shiftBtn{display:none}.top-actions .primary{font-size:11px;padding:8px 10px}.hero-card{grid-template-columns:1fr;padding:20px;margin-top:15px;gap:16px}.hero-copy h2{font-size:27px}.hero-copy p{font-size:13px}.capture-box textarea{min-height:95px}.voice-btn{display:inline-block}.stats{grid-template-columns:repeat(2,1fr)}.record{grid-template-columns:1fr 74px;padding:12px}.record .text{grid-column:1/-1}.filters,.print-builder{grid-template-columns:1fr}.settings-grid,.template-grid{grid-template-columns:1fr}.review-grid,.review-fields,.password-grid{grid-template-columns:1fr}.modal-card{border-radius:22px;padding:17px}.audit-row{grid-template-columns:1fr}.template-card img{height:115px}.template-print-page{min-width:760px;transform-origin:top right}.print-preview{direction:ltr}.tpl-cell{font-size:11px!important}.panel{padding:15px;border-radius:20px}.topbar p{display:none}}
@media(min-width:821px){.voice-btn{display:none!important}}
@page{size:auto;margin:0}
@media print{html,body{margin:0!important;padding:0!important;background:#fff!important}.sidebar,.topbar,.panel-head,.print-builder,.view:not(#view-print),.modal,.toast{display:none!important}.app-shell{display:block}main{padding:0}.panel{border:0;box-shadow:none;padding:0;margin:0;background:#fff}.print-preview{gap:0;overflow:visible}.template-print-page{box-shadow:none!important;margin:0!important;page-break-after:always;break-after:page;width:100vw!important;max-width:none!important}.template-print-page.landscape,.template-print-page.portrait{height:100vh!important;aspect-ratio:auto}.template-print-page:last-child{page-break-after:auto}.template-bg{-webkit-print-color-adjust:exact;print-color-adjust:exact}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}


/* v2.3 credential direction fix */
input[type="password"],
input[name="username"],
input[autocomplete="username"],
input[autocomplete="current-password"],
.credential-input {
  direction: ltr !important;
  text-align: left !important;
  unicode-bidi: plaintext !important;
}


/* v2.4 Guest Request print data polish — original approved template remains untouched */
.template-print-page .tpl-cell.guest-room{
  font-weight:800; color:#111827; letter-spacing:.2px;
}
.template-print-page .tpl-cell.guest-request-text{
  direction:rtl; unicode-bidi:plaintext; text-align:center;
  font-family:"Noto Sans Arabic","Segoe UI",Tahoma,Arial,sans-serif;
  font-weight:600; line-height:1.25; padding:3px 5px;
  overflow:hidden; display:flex; align-items:center; justify-content:center;
}
.template-print-page .tpl-cell.guest-fixed,
.template-print-page .tpl-cell.guest-time{
  direction:ltr; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  font-weight:600; display:flex; align-items:center; justify-content:center;
}
.template-print-page .tpl-cell.guest-done{
  direction:ltr; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  font-weight:800; letter-spacing:.35px; display:flex; align-items:center; justify-content:center;
}
.template-print-page .tpl-cell.guest-check{
  direction:ltr; font-family:Arial,sans-serif; font-weight:900;
  display:flex; align-items:center; justify-content:center; line-height:1;
}
@media print{
  .template-print-page .tpl-cell.guest-request-text{font-weight:600!important}
  .template-print-page .tpl-cell.guest-fixed,
  .template-print-page .tpl-cell.guest-time,
  .template-print-page .tpl-cell.guest-done{font-weight:700!important}
  .template-print-page .tpl-cell.guest-check{font-weight:900!important}
}

/* v2.5 Follow Up Sheet data alignment; approved sheet image stays unchanged */
.template-print-page .tpl-cell.fu-no,.template-print-page .tpl-cell.fu-room,.template-print-page .tpl-cell.fu-time,.template-print-page .tpl-cell.fu-dept,.template-print-page .tpl-cell.fu-related,.template-print-page .tpl-cell.fu-done,.template-print-page .tpl-cell.fu-check{direction:ltr;text-align:center;display:flex;align-items:center;justify-content:center;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;overflow:hidden;white-space:nowrap}
.template-print-page .tpl-cell.fu-no,.template-print-page .tpl-cell.fu-room{font-weight:700}
.template-print-page .tpl-cell.fu-dept,.template-print-page .tpl-cell.fu-related{font-weight:600}
.template-print-page .tpl-cell.fu-done{font-weight:800;letter-spacing:.25px}
.template-print-page .tpl-cell.fu-check{font-weight:900;line-height:1}
.template-print-page .tpl-cell.fu-problem{direction:rtl;unicode-bidi:plaintext;text-align:center;display:flex;align-items:center;justify-content:center;font-family:"Noto Sans Arabic","Segoe UI",Tahoma,Arial,sans-serif;font-weight:600;line-height:1.2;padding:2px 4px;overflow:hidden}

/* v2.6 Log Book overlay polish — approved original template preserved */
.template-print-page .tpl-cell.lb-meta{
  direction:ltr;text-align:center;display:flex;align-items:center;justify-content:center;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  font-weight:700;overflow:hidden;white-space:nowrap;
}
.template-print-page .tpl-cell.lb-case{
  direction:rtl;unicode-bidi:plaintext;text-align:center;
  display:flex;align-items:center;justify-content:center;
  font-family:"Noto Sans Arabic","Segoe UI",Tahoma,Arial,sans-serif;
  font-weight:600;line-height:1.2;padding:2px 8px;overflow:hidden;
}
.template-print-page .tpl-cell.lb-action{
  direction:rtl;unicode-bidi:plaintext;text-align:center;
  display:flex;align-items:center;justify-content:center;
  font-family:"Noto Sans Arabic","Segoe UI",Tahoma,Arial,sans-serif;
  font-weight:700;line-height:1.2;padding:2px 6px;overflow:hidden;
}

/* v2.7 Rejection Sheet overlay polish — original approved sheet preserved */
.template-print-page .tpl-cell.rej-no,.template-print-page .tpl-cell.rej-count,.template-print-page .tpl-cell.rej-date{
 direction:ltr;text-align:center;display:flex;align-items:center;justify-content:center;
 font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;font-weight:700;overflow:hidden;
}
.template-print-page .tpl-cell.rej-day,.template-print-page .tpl-cell.rej-request,.template-print-page .tpl-cell.rej-reason{
 direction:rtl;unicode-bidi:plaintext;text-align:center;display:flex;align-items:center;justify-content:center;
 font-family:"Noto Sans Arabic","Segoe UI",Tahoma,Arial,sans-serif;line-height:1.15;padding:2px 5px;overflow:hidden;
}
.template-print-page .tpl-cell.rej-request,.template-print-page .tpl-cell.rej-reason{font-weight:600}
.template-print-page .tpl-cell.rej-employee{
 direction:ltr;text-align:center;display:flex;align-items:center;justify-content:center;
 font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;font-weight:700;overflow:hidden;white-space:nowrap;
}

/* v2.8 Booking Rooms print alignment — approved original template preserved */
.template-print-page .tpl-cell.br-no,
.template-print-page .tpl-cell.br-room,
.template-print-page .tpl-cell.br-date{
  direction:ltr;text-align:center;display:flex;align-items:center;justify-content:center;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  font-weight:700;overflow:hidden;white-space:nowrap;
}
.template-print-page .tpl-cell.br-type,
.template-print-page .tpl-cell.br-statement{
  direction:rtl;unicode-bidi:plaintext;text-align:center;
  display:flex;align-items:center;justify-content:center;
  font-family:"Noto Sans Arabic","Segoe UI",Tahoma,Arial,sans-serif;
  font-weight:700;line-height:1.2;padding:3px 6px;overflow:hidden;
}

.version-badge{display:inline-flex;margin-top:4px;padding:2px 7px;border-radius:999px;background:#eef5ff;color:#06c;font:700 9px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;direction:ltr}


/* v3.2.0 FINAL PROFESSIONAL PRINT CALIBRATION */
.template-print-page .tpl-cell{
  box-sizing:border-box!important;
  background:transparent!important;
  border:0!important;
  margin:0!important;
  text-shadow:none!important;
  letter-spacing:0!important;
}
.template-print-page .tpl-cell.safe-cell{
  padding:2px 5px!important;
  line-height:1.08!important;
  overflow:hidden!important;
  align-items:center!important;
  justify-content:center!important;
}
.template-print-page .tpl-cell.meta-clean{
  background:transparent!important;
  padding:0 2px!important;
  line-height:1!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  font-weight:650!important;
}
@media print{
  .template-print-page{box-shadow:none!important;margin:0!important}
  .template-print-page .tpl-cell{print-color-adjust:exact;-webkit-print-color-adjust:exact}
}


/* v3.2.0 — STRUCTURED PRINT ENGINE (no image overlay for reports) */
.professional-sheet{
  background:#fff;
  color:#111827;
  margin:18px auto 28px;
  padding:28px 32px 34px;
  box-sizing:border-box;
  box-shadow:0 8px 28px rgba(15,23,42,.08);
  border:1px solid #e5e7eb;
  direction:ltr;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,Tahoma,sans-serif;
}
.professional-sheet.landscape{width:min(100%,1100px);min-height:700px}
.professional-sheet.portrait{width:min(100%,820px);min-height:1040px}
.sheet-head{display:grid;grid-template-columns:1fr 1.3fr 1fr;align-items:end;gap:18px;margin-bottom:14px}
.sheet-head.compact{align-items:center}
.sheet-head h1,.sheet-head h2{margin:0;text-align:center}
.sheet-head h1{font-size:24px;line-height:1.1}
.sheet-head h2{font-size:17px;text-decoration:underline;margin-bottom:8px}
.brand-mark,.small-logo{font-weight:700;text-align:right;direction:rtl}
.meta-row,.meta-bar,.log-meta,.arabic-meta{font-size:14px}
.meta-row{display:flex;gap:8px;align-items:center}
.meta-bar{margin:4px 0 10px;text-align:center}
.report-table{width:100%;border-collapse:collapse;table-layout:fixed;background:#fff}
.report-table th,.report-table td{
  border:1px solid #111827;
  padding:7px 6px;
  vertical-align:middle;
  text-align:center;
  overflow:hidden;
  overflow-wrap:anywhere;
}
.report-table th{font-size:12px;font-weight:800;background:#f8fafc;line-height:1.15}
.report-table td{font-size:12px;height:36px;line-height:1.25}
.report-table td.rtl{direction:rtl;text-align:center;font-family:"Segoe UI",Tahoma,Arial,sans-serif}
.report-table td.latin{direction:ltr;white-space:nowrap}
.report-table td.strong{font-weight:650}
.report-table td.num{font-weight:750;white-space:nowrap}
.report-table td.check{font-size:20px;font-weight:900;line-height:1}
.guest-table th:nth-child(1){width:7%}.guest-table th:nth-child(2){width:22%}.guest-table th:nth-child(3){width:9%}.guest-table th:nth-child(4){width:9%}.guest-table th:nth-child(5){width:11%}.guest-table th:nth-child(6){width:11%}.guest-table th:nth-child(7){width:9%}.guest-table th:nth-child(8){width:11%}.guest-table th:nth-child(9){width:11%}
.follow-table th,.follow-table td{font-size:11px;padding:5px 4px;height:31px}
.follow-table thead tr:first-child th{background:#eef2f7;font-size:12px}
.follow-table th:nth-child(1){width:4%}
.log-meta{display:grid;grid-template-columns:1fr 1fr 1fr;gap:16px;border:2px solid #111827;border-bottom:0;padding:12px 16px;font-size:15px}
.log-table th{font-size:17px;font-style:italic}
.log-table th:first-child{width:70%}.log-table th:last-child{width:30%}
.log-table td{height:30px;text-align:right;padding:5px 10px}
.log-footer{display:flex;justify-content:space-between;border:2px solid #111827;border-top:0;padding:10px 14px;font-size:13px;direction:rtl}
.arabic-head{text-align:center;direction:rtl;margin-bottom:16px}
.arabic-head h1{font-size:25px;text-decoration:underline;margin:10px 0 14px}
.arabic-meta{display:flex;justify-content:space-between;font-size:15px}
.rejection-table{direction:rtl}
.rejection-table th{font-size:16px;color:#b91c1c;background:#fff}
.rejection-table td{height:38px;font-size:13px;border-color:#b45353}
.rejection-table th:nth-child(1){width:5%}.rejection-table th:nth-child(2){width:14%}.rejection-table th:nth-child(3){width:22%}.rejection-table th:nth-child(4){width:38%}.rejection-table th:nth-child(5){width:21%}
.booking-head{position:relative;text-align:center;direction:rtl;margin-bottom:14px}
.booking-brand{font-size:25px;font-weight:800;margin-bottom:8px}
.booking-date{position:absolute;left:0;top:0;direction:ltr;font-size:16px;font-weight:700}
.booking-head h1{margin:0;padding:7px 12px;background:#0ea5e9;color:#111827;border:2px solid #111827;font-size:21px}
.booking-table{direction:rtl}
.booking-table th{font-size:16px;background:#fde7d5}
.booking-table td{height:58px;font-size:14px;background:#fff7ed}
.booking-table th:nth-child(1){width:8%}.booking-table th:nth-child(2){width:25%}.booking-table th:nth-child(3){width:27%}.booking-table th:nth-child(4){width:40%}

@media print{
  body{background:#fff!important}
  .professional-sheet{
    box-shadow:none!important;border:0!important;margin:0!important;
    padding:8mm 9mm!important;width:100%!important;min-height:0!important;
    break-after:page;page-break-after:always;
  }
  .report-table th,.report-table td{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}


/* ==========================================================
   v3.6.0 — APPLE-INSPIRED PRODUCT UI
   Presentation-only layer. No workflow/business logic changes.
   ========================================================== */

:root{
  --apple-bg:#f5f5f7;
  --apple-surface:rgba(255,255,255,.78);
  --apple-surface-solid:#ffffff;
  --apple-surface-soft:#fbfbfd;
  --apple-text:#1d1d1f;
  --apple-secondary:#6e6e73;
  --apple-tertiary:#86868b;
  --apple-line:rgba(0,0,0,.075);
  --apple-line-strong:rgba(0,0,0,.12);
  --apple-blue:#0071e3;
  --apple-blue-press:#0068d1;
  --apple-green:#28a745;
  --apple-red:#d70015;
  --apple-radius-xl:28px;
  --apple-radius-lg:20px;
  --apple-radius-md:14px;
  --apple-radius-sm:10px;
  --apple-shadow:0 18px 50px rgba(0,0,0,.075),0 2px 8px rgba(0,0,0,.035);
  --apple-shadow-soft:0 8px 28px rgba(0,0,0,.055);
  --apple-ease:cubic-bezier(.22,.61,.36,1);
}

html{
  background:var(--apple-bg);
  color-scheme:light;
  scroll-behavior:smooth;
}

body{
  background:
    radial-gradient(circle at 12% -8%,rgba(0,113,227,.075),transparent 24rem),
    linear-gradient(180deg,#fafafa 0%,var(--apple-bg) 42%,#f2f2f4 100%) !important;
  color:var(--apple-text)!important;
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text","Segoe UI",Tahoma,Arial,sans-serif!important;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

/* App shell */
.app-shell,
#appShell{
  background:transparent!important;
}

.sidebar{
  background:rgba(248,248,250,.82)!important;
  border-left:1px solid var(--apple-line)!important;
  backdrop-filter:saturate(180%) blur(28px);
  -webkit-backdrop-filter:saturate(180%) blur(28px);
  box-shadow:none!important;
}

.brand{
  padding:26px 22px 20px!important;
  border-bottom:0!important;
}
.brand-badge,
.logo-mark{
  width:44px!important;height:44px!important;
  border-radius:14px!important;
  background:linear-gradient(145deg,#2c2c2e,#1c1c1e)!important;
  box-shadow:0 8px 18px rgba(0,0,0,.18)!important;
}
.brand h1,.brand strong{
  font-weight:700!important;
  letter-spacing:-.025em!important;
}
.brand small{
  color:var(--apple-secondary)!important;
  font-weight:450!important;
}

.nav{
  padding:10px 12px 18px!important;
  gap:6px!important;
}
.nav-btn{
  min-height:48px!important;
  border:0!important;
  border-radius:14px!important;
  padding:0 15px!important;
  background:transparent!important;
  color:#3a3a3c!important;
  font-weight:560!important;
  transition:
    transform .18s var(--apple-ease),
    background .18s var(--apple-ease),
    color .18s var(--apple-ease),
    box-shadow .18s var(--apple-ease)!important;
}
.nav-btn:hover{
  background:rgba(0,0,0,.045)!important;
  transform:translateY(-1px);
}
.nav-btn.active{
  background:rgba(255,255,255,.96)!important;
  color:var(--apple-text)!important;
  box-shadow:0 5px 20px rgba(0,0,0,.065)!important;
}
.nav-btn.active::before{
  content:"";
  width:3px;height:20px;
  border-radius:999px;
  background:var(--apple-blue);
  position:absolute;
  inset-inline-start:6px;
}
.nav-btn{position:relative}

.connection-status,.offline-label{
  color:var(--apple-secondary)!important;
  font-size:12px!important;
}

/* Top bar */
.topbar,.app-header{
  background:rgba(250,250,252,.78)!important;
  backdrop-filter:saturate(180%) blur(24px);
  -webkit-backdrop-filter:saturate(180%) blur(24px);
  border-bottom:1px solid var(--apple-line)!important;
  box-shadow:none!important;
  min-height:82px!important;
}
.topbar h1,#pageTitle{
  font-size:28px!important;
  font-weight:720!important;
  letter-spacing:-.035em!important;
  color:var(--apple-text)!important;
}
.topbar .date,.page-subtitle{
  color:var(--apple-secondary)!important;
}

/* Shift controls / toolbar */
.shift-bar,.shift-controls,.toolbar{
  gap:10px!important;
}
.shift-bar input,
.shift-bar select,
.shift-controls input,
.shift-controls select,
.toolbar input,
.toolbar select{
  height:42px!important;
  border-radius:12px!important;
  border:1px solid var(--apple-line-strong)!important;
  background:rgba(255,255,255,.8)!important;
  color:var(--apple-text)!important;
  box-shadow:0 1px 0 rgba(255,255,255,.8) inset!important;
  transition:border-color .18s,box-shadow .18s,background .18s!important;
}
input:focus,select:focus,textarea:focus{
  border-color:rgba(0,113,227,.55)!important;
  box-shadow:0 0 0 4px rgba(0,113,227,.11)!important;
  outline:none!important;
}
.shift-status,.status-pill{
  background:#f2f2f7!important;
  border:1px solid var(--apple-line)!important;
  color:var(--apple-secondary)!important;
  border-radius:999px!important;
  font-weight:600!important;
}

/* Buttons */
button,.btn{
  border-radius:12px!important;
  font-weight:650!important;
  letter-spacing:-.01em!important;
  transition:
    transform .16s var(--apple-ease),
    box-shadow .16s var(--apple-ease),
    background .16s var(--apple-ease),
    opacity .16s!important;
}
button:hover,.btn:hover{
  transform:translateY(-1px);
}
button:active,.btn:active{
  transform:scale(.985);
}
.primary,.btn-primary,#startShiftBtn,#captureBtn,#reviewSaveBtn{
  background:linear-gradient(180deg,#1688ff 0%,var(--apple-blue) 100%)!important;
  color:white!important;
  border:0!important;
  box-shadow:0 7px 18px rgba(0,113,227,.22)!important;
}
.primary:hover,.btn-primary:hover,#startShiftBtn:hover,#captureBtn:hover{
  box-shadow:0 9px 24px rgba(0,113,227,.28)!important;
}
.secondary,.btn-secondary{
  background:rgba(255,255,255,.84)!important;
  color:var(--apple-text)!important;
  border:1px solid var(--apple-line)!important;
  box-shadow:0 2px 8px rgba(0,0,0,.035)!important;
}
.danger,.btn-danger{
  background:#fff1f2!important;
  color:var(--apple-red)!important;
  border:1px solid rgba(215,0,21,.09)!important;
}

/* Main content rhythm */
.main,.content,.page-content{
  padding:28px 34px 42px!important;
}
.view{
  animation:appleViewIn .34s var(--apple-ease);
}
@keyframes appleViewIn{
  from{opacity:0;transform:translateY(7px)}
  to{opacity:1;transform:none}
}

/* Hero / quick capture */
.hero-card,.capture-card,.quick-capture{
  border:1px solid rgba(255,255,255,.7)!important;
  background:
    linear-gradient(145deg,rgba(255,255,255,.91),rgba(255,255,255,.68))!important;
  border-radius:var(--apple-radius-xl)!important;
  box-shadow:var(--apple-shadow)!important;
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
  padding:30px!important;
}
.hero-card h2,.capture-card h2,.quick-capture h2{
  font-size:34px!important;
  font-weight:760!important;
  letter-spacing:-.045em!important;
  line-height:1.13!important;
  color:var(--apple-text)!important;
}
.eyebrow,.section-kicker{
  color:var(--apple-blue)!important;
  font-size:12px!important;
  font-weight:750!important;
  letter-spacing:.08em!important;
}
.hero-card p,.capture-card p,.quick-capture p{
  color:var(--apple-secondary)!important;
  font-size:15px!important;
  line-height:1.65!important;
}
#captureText,textarea.capture-input{
  background:rgba(248,248,250,.8)!important;
  border:1px solid var(--apple-line)!important;
  border-radius:18px!important;
  min-height:150px!important;
  padding:18px 20px!important;
  font-size:16px!important;
  line-height:1.7!important;
  resize:vertical;
}

/* Metric cards */
.metric-card,.stat-card,.kpi-card{
  background:rgba(255,255,255,.78)!important;
  border:1px solid rgba(255,255,255,.9)!important;
  border-radius:20px!important;
  box-shadow:var(--apple-shadow-soft)!important;
  padding:22px!important;
  transition:transform .2s var(--apple-ease),box-shadow .2s var(--apple-ease)!important;
}
.metric-card:hover,.stat-card:hover,.kpi-card:hover{
  transform:translateY(-3px);
  box-shadow:0 14px 32px rgba(0,0,0,.075)!important;
}
.metric-card strong,.stat-card strong,.kpi-card strong{
  font-size:30px!important;
  letter-spacing:-.04em!important;
  color:var(--apple-text)!important;
}
.metric-card span,.stat-card span,.kpi-card span{
  color:var(--apple-secondary)!important;
}

/* Sections / records */
.panel,.section-card,.records-section,.archive-card,.settings-card{
  background:rgba(255,255,255,.82)!important;
  border:1px solid rgba(255,255,255,.9)!important;
  border-radius:22px!important;
  box-shadow:var(--apple-shadow-soft)!important;
}
.panel-header,.section-header{
  border-bottom:1px solid var(--apple-line)!important;
  padding:20px 22px!important;
}
.record-card,.record-row,.audit-row{
  border:1px solid var(--apple-line)!important;
  background:#fff!important;
  border-radius:16px!important;
  transition:background .16s,transform .16s,box-shadow .16s!important;
}
.record-card:hover,.record-row:hover,.audit-row:hover{
  transform:translateY(-1px);
  box-shadow:0 8px 20px rgba(0,0,0,.05)!important;
  background:#fdfdfd!important;
}
.badge,.type-badge{
  border-radius:999px!important;
  padding:5px 9px!important;
  font-size:11px!important;
  font-weight:700!important;
  background:#f2f2f7!important;
  color:#48484a!important;
}

/* Modal */
.modal,.modal-card,.dialog{
  background:rgba(255,255,255,.92)!important;
  border:1px solid rgba(255,255,255,.95)!important;
  border-radius:24px!important;
  box-shadow:0 28px 80px rgba(0,0,0,.22)!important;
  backdrop-filter:blur(30px);
  -webkit-backdrop-filter:blur(30px);
}
.modal-backdrop,.overlay{
  background:rgba(0,0,0,.24)!important;
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
}

/* Toasts */
#toast,.toast{
  border-radius:999px!important;
  background:rgba(28,28,30,.92)!important;
  color:#fff!important;
  padding:11px 16px!important;
  box-shadow:0 10px 30px rgba(0,0,0,.2)!important;
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  font-weight:600!important;
}

/* Print preview container only — report engine untouched */
#printPreview{
  background:#ececee!important;
  border-radius:22px!important;
  padding:22px!important;
  border:1px solid var(--apple-line)!important;
}
.professional-sheet{
  border-radius:4px!important;
  box-shadow:0 12px 34px rgba(0,0,0,.11)!important;
}

/* Scrollbars */
*{
  scrollbar-width:thin;
  scrollbar-color:rgba(60,60,67,.28) transparent;
}
*::-webkit-scrollbar{width:10px;height:10px}
*::-webkit-scrollbar-track{background:transparent}
*::-webkit-scrollbar-thumb{
  background:rgba(60,60,67,.24);
  border-radius:999px;
  border:3px solid transparent;
  background-clip:padding-box;
}

/* Mobile = iOS-like bottom-safe, bigger touch targets */
@media(max-width:820px){
  body{
    background:linear-gradient(180deg,#fbfbfd 0%,#f2f2f7 100%)!important;
  }
  .main,.content,.page-content{
    padding:18px 14px calc(28px + env(safe-area-inset-bottom))!important;
  }
  .topbar,.app-header{
    min-height:70px!important;
    padding-top:env(safe-area-inset-top)!important;
  }
  .hero-card,.capture-card,.quick-capture{
    border-radius:24px!important;
    padding:22px 18px!important;
  }
  .hero-card h2,.capture-card h2,.quick-capture h2{
    font-size:28px!important;
  }
  #captureText,textarea.capture-input{
    min-height:132px!important;
    font-size:17px!important;
    border-radius:16px!important;
  }
  button,.btn,.nav-btn,input,select{
    min-height:44px!important;
  }
  #voiceBtn{
    min-height:52px!important;
    border-radius:16px!important;
    box-shadow:0 8px 22px rgba(0,113,227,.22)!important;
  }
  .metric-card,.stat-card,.kpi-card{
    border-radius:18px!important;
  }
}

/* Respect motion accessibility */
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
    scroll-behavior:auto!important;
  }
}

/* v3.6.0 mobile voice recorder */
#voiceBtn.listening{
  background:linear-gradient(180deg,#ff453a,#d70015)!important;
  color:#fff!important;
  box-shadow:0 8px 24px rgba(215,0,21,.24)!important;
}
#voiceBtn.processing{
  opacity:.82;
  cursor:wait!important;
}
