:root{
  --navy:#0c2c4d;--navy-2:#153f66;--blue:#2569a8;--orange:#ff7a00;--orange-2:#ff9d3f;
  --bg:#f4f7fb;--card:#fff;--text:#102a43;--muted:#6b7c93;--line:#dbe5ef;--soft:#eef4fa;
  --green:#159f75;--red:#d84a4a;--purple:#7358c7;--yellow:#d88b00;--shadow:0 12px 34px rgba(12,44,77,.08);
  --radius:20px;--radius-sm:12px;
}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,"Noto Sans Arabic",sans-serif;background:var(--bg);color:var(--text)}button,input,select,textarea{font:inherit}button{cursor:pointer}a{color:inherit;text-decoration:none}.hidden{display:none!important}.muted{color:var(--muted)}
.app-shell{min-height:100vh}.loading-screen{min-height:100vh;display:flex;align-items:center;justify-content:center;gap:18px;background:linear-gradient(135deg,#f7faff,#edf4fb)}.loading-screen strong{font-size:28px;display:block}.loading-screen span{color:var(--muted)}
.brand-mark{width:42px;height:42px;border-radius:12px;background:var(--navy);color:#fff;border:2px solid var(--orange);display:grid;place-items:center;font-weight:900;position:relative;box-shadow:inset 0 0 0 4px rgba(255,255,255,.05)}.brand-mark:before,.brand-mark:after{content:"";position:absolute;width:2px;background:#fff;border-radius:3px}.brand-mark:before{height:20px;left:15px}.brand-mark:after{height:14px;right:15px}.brand-mark.large{width:62px;height:62px;border-radius:18px;font-size:0}
.auth-view{min-height:100vh;display:grid;grid-template-columns:minmax(360px,520px) 1fr}.auth-panel{padding:56px 64px;background:#fff;display:flex;flex-direction:column;justify-content:center}.auth-brand{display:flex;align-items:center;gap:18px;margin-bottom:50px}.auth-brand h1{margin:0;font-size:34px;letter-spacing:-1px}.auth-brand h1 span,.brand-copy span,.hero h1 span{color:var(--orange)}.auth-brand p{margin:5px 0 0;color:var(--muted)}.auth-panel h2{font-size:30px;margin:0 0 8px}.auth-art{background:linear-gradient(135deg,var(--navy),#174e7a);position:relative;overflow:hidden;display:flex;align-items:center;padding:8vw}.auth-art:before,.auth-art:after{content:"";position:absolute;border:52px solid rgba(255,255,255,.06);border-radius:50%;width:400px;height:400px}.auth-art:before{right:-120px;top:-100px}.auth-art:after{left:-180px;bottom:-180px}.art-copy{position:relative;z-index:1;color:#fff;max-width:720px}.art-copy h2{font-size:clamp(38px,5vw,72px);line-height:1.05;margin:14px 0}.art-copy p{font-size:20px;line-height:1.7;color:#d5e4f2}.trust-row{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:40px}.trust-row>div{padding:18px;border:1px solid rgba(255,255,255,.18);border-radius:16px;background:rgba(255,255,255,.06)}.trust-row b{display:block;color:#ffb45f;font-size:12px}.trust-row span{font-weight:700}
.stack-form{display:grid;gap:16px;margin:26px 0}.stack-form label,.case-form label{display:grid;gap:8px;font-weight:700;font-size:14px}.stack-form input,.case-form input,.case-form select,.case-form textarea,.row-actions select,.panel-head select{width:100%;border:1px solid var(--line);background:#fff;border-radius:12px;padding:13px 14px;outline:none;color:var(--text);transition:.2s}.stack-form input:focus,.case-form input:focus,.case-form select:focus,.case-form textarea:focus,.row-actions select:focus,.panel-head select:focus{border-color:#78a9d3;box-shadow:0 0 0 3px rgba(37,105,168,.1)}textarea{resize:vertical}
.btn{border:1px solid var(--line);background:#fff;color:var(--text);border-radius:12px;padding:11px 16px;font-weight:800;display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:.2s}.btn:hover{transform:translateY(-1px)}.btn.primary{background:linear-gradient(135deg,var(--orange),#ff8f20);border-color:var(--orange);color:#fff}.btn.ghost{background:#fff}.btn.compact{padding:9px 13px}.btn.full{width:100%}.btn.large{min-height:50px}.btn.danger-soft{background:#fff2f2;border-color:#f7cccc;color:#b73333}.form-message{min-height:20px;font-size:13px}.form-message.error{color:var(--red)}.form-message.success{color:var(--green)}
.topbar{height:82px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 34px;gap:30px;position:sticky;top:0;z-index:20}.brand{display:flex;align-items:center;gap:12px;min-width:max-content}.brand-copy strong{font-size:19px}.brand-copy small{display:block;color:var(--muted);font-size:11px;margin-top:2px}.main-nav{display:flex;align-items:stretch;height:100%;gap:4px}.nav-link{border:0;background:transparent;color:#486078;font-weight:800;padding:0 16px;position:relative}.nav-link.active{color:var(--navy)}.nav-link.active:after{content:"";position:absolute;bottom:0;left:14px;right:14px;height:3px;background:var(--orange);border-radius:4px 4px 0 0}.header-actions{margin-inline-start:auto;display:flex;align-items:center;gap:10px}.icon-btn{width:42px;height:42px;border-radius:12px;border:1px solid var(--line);background:#fff;position:relative}.badge{position:absolute;right:-4px;top:-4px;background:var(--orange);color:#fff;font-size:10px;min-width:18px;height:18px;border-radius:999px;display:grid;place-items:center;font-weight:900}.user-chip{display:flex;align-items:center;gap:9px;padding:6px 10px;border:1px solid var(--line);border-radius:14px;background:#f9fbfd}.avatar{width:34px;height:34px;border-radius:50%;background:#e6f0f9;color:var(--navy);display:grid;place-items:center;font-weight:900}.user-chip strong{display:block;font-size:13px}.user-chip small{display:block;font-size:10px;color:var(--muted);max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
main{max-width:1500px;margin:0 auto;padding:28px 34px 60px}.page{display:none}.active-page{display:block}.hero{min-height:255px;border-radius:28px;padding:42px 50px;background:linear-gradient(105deg,#0d3255 0%,#13476f 72%,#1f5d8a 100%);color:#fff;display:flex;align-items:center;justify-content:space-between;gap:30px;position:relative;overflow:hidden;box-shadow:var(--shadow)}.hero:before{content:"";position:absolute;right:-80px;top:-150px;width:420px;height:420px;border-radius:50%;border:60px solid rgba(255,255,255,.055)}.hero-copy,.hero-side{position:relative;z-index:1}.hero h1{font-size:52px;letter-spacing:-2px;margin:8px 0 0}.hero h2{font-size:34px;margin:0 0 12px}.hero p{font-size:18px;color:#d9e7f3}.hero-side{min-width:320px;display:grid;gap:16px}.hero-status{background:rgba(255,255,255,.09);border:1px solid rgba(255,255,255,.14);padding:16px;border-radius:16px;display:grid;grid-template-columns:auto 1fr;column-gap:9px}.hero-status b{font-size:14px}.hero-status small{grid-column:2;color:#d6e4f0;margin-top:3px}.pulse{width:10px;height:10px;border-radius:50%;background:#48d99a;margin-top:4px;box-shadow:0 0 0 5px rgba(72,217,154,.12)}.eyebrow{font-size:11px;font-weight:900;letter-spacing:2px;color:var(--orange);text-transform:uppercase}.section-head,.page-title-row{display:flex;justify-content:space-between;align-items:end;gap:20px;margin:32px 0 20px}.section-head h2,.page-title-row h1{margin:6px 0 0;font-size:30px;letter-spacing:-.6px}.page-title-row p{margin:6px 0 0;color:var(--muted)}.text-link{border:0;background:transparent;color:var(--orange);padding:0;font-weight:800;margin-bottom:8px}
.category-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:16px}.category-card{background:#fff;border:1px solid var(--line);border-radius:20px;padding:25px 22px;min-height:240px;box-shadow:0 8px 26px rgba(16,42,67,.04);display:flex;flex-direction:column;transition:.2s}.category-card:hover{transform:translateY(-4px);box-shadow:var(--shadow);border-color:#c9d8e7}.category-icon{width:64px;height:64px;border-radius:50%;display:grid;place-items:center;font-size:28px;margin-bottom:18px}.category-card h3{margin:0 0 10px;font-size:20px}.category-card p{color:var(--muted);line-height:1.6;font-size:14px;flex:1}.category-card button{border:0;background:transparent;padding:0;color:var(--blue);font-weight:900;text-align:start}.category-card[data-code="WORKPLACE_SERVICES"] .category-icon{background:#e8f3ff}.category-card[data-code="WORK_ENVIRONMENT"] .category-icon{background:#e8f8f2}.category-card[data-code="EMPLOYEE_RELATIONS"] .category-icon{background:#fff0e4}.category-card[data-code="CONFIDENTIAL"] .category-icon{background:#f0ebff}.category-card[data-code="SUGGESTIONS"] .category-icon{background:#fff5d8}.trust-strip{display:grid;grid-template-columns:repeat(4,1fr);background:#fff;border:1px solid var(--line);border-radius:18px;margin-top:20px;padding:18px}.trust-strip>div{display:flex;gap:12px;align-items:center;padding:0 16px;border-inline-end:1px solid var(--line)}.trust-strip>div:last-child{border-inline-end:0}.trust-icon{font-size:22px}.trust-strip b{display:block;font-size:13px}.trust-strip small{display:block;color:var(--muted);margin-top:2px}
.panel{background:#fff;border:1px solid var(--line);border-radius:20px;box-shadow:0 8px 26px rgba(16,42,67,.04)}.submit-layout{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:22px;align-items:start}.case-form{padding:28px;display:grid;gap:18px}.form-grid.two{display:grid;grid-template-columns:1fr 1fr;gap:18px}.priority-field{border:0;padding:0;margin:0}.priority-field legend{font-weight:700;font-size:14px;margin-bottom:8px}.segmented{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}.segment{border:1px solid var(--line);border-radius:10px;background:#fff;padding:11px 7px;font-weight:800;font-size:12px}.segment.active{background:#e9f3fb;border-color:#78a9d3;color:#145c98}.segment[data-value="high"].active{background:#fff3e6;border-color:#ffc57f;color:#b95c00}.segment[data-value="critical"].active{background:#fff0f0;border-color:#f3abab;color:#b72f2f}.counter{justify-self:end;color:var(--muted);font-weight:500}.file-drop{border:1.5px dashed #b9cadb;border-radius:16px;padding:20px;text-align:center;place-items:center;background:#f9fbfd;cursor:pointer}.file-drop input{display:none}.file-drop span{color:var(--muted);font-weight:500}.clip{font-size:23px}.file-list{display:flex;flex-wrap:wrap;gap:8px}.file-chip{padding:7px 10px;background:#eff5fa;border:1px solid var(--line);border-radius:10px;font-size:12px}.privacy-panel{padding:24px;position:sticky;top:104px}.privacy-panel h3{margin-top:0}.privacy-option{display:flex;gap:11px;padding:14px 0;border-bottom:1px solid #edf1f5;cursor:pointer}.privacy-option input{margin-top:4px}.privacy-option b{display:block;font-size:14px}.privacy-option span{display:block;color:var(--muted);font-size:12px;line-height:1.5;margin-top:3px}.privacy-option.disabled{opacity:.45;pointer-events:none}.info-box{margin-top:18px;padding:14px;background:#edf6ff;border-radius:14px;color:#245d8b;font-size:13px;line-height:1.6}.case-number-preview{margin-top:16px;padding:16px;border:1px solid var(--line);border-radius:14px;display:grid;gap:4px}.case-number-preview small,.case-number-preview span{color:var(--muted);font-size:11px}.case-number-preview strong{font-size:17px}
.row-actions{display:flex;align-items:center;gap:10px}.row-actions select,.panel-head select{width:auto;min-width:160px}.kpi-row{display:grid;gap:14px;margin-bottom:18px}.employee-kpis{grid-template-columns:repeat(4,1fr)}.admin-kpis{grid-template-columns:repeat(5,1fr)}.kpi{background:#fff;border:1px solid var(--line);border-radius:16px;padding:18px 20px}.kpi small{color:var(--muted);display:block;font-weight:700}.kpi strong{font-size:30px;display:block;margin-top:6px;color:var(--navy)}.table-panel{overflow:hidden}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;min-width:900px}th,td{text-align:start;padding:15px 16px;border-bottom:1px solid #edf1f5;font-size:13px}th{color:#60758a;background:#fbfcfe;font-size:11px;text-transform:uppercase;letter-spacing:.6px}tbody tr:hover{background:#fbfdff}.status-pill,.priority-pill{display:inline-flex;align-items:center;border-radius:999px;padding:6px 9px;font-size:11px;font-weight:900;background:#edf3f8;color:#4d657b}.status-submitted{background:#eef4ff;color:#376aa8}.status-under_review{background:#fff5df;color:#a86400}.status-assigned{background:#f1ecff;color:#684db6}.status-in_progress{background:#eaf3ff;color:#2368a4}.status-waiting_employee{background:#fff1d8;color:#9d6200}.status-resolved{background:#e7f8f1;color:#167e5f}.status-closed{background:#edf1f4;color:#596a78}.status-reopened{background:#fff0e8;color:#b85e12}.status-rejected{background:#fff0f0;color:#b83a3a}.priority-low{background:#e9f8f1;color:#187757}.priority-normal{background:#edf4ff;color:#326fae}.priority-high{background:#fff1e3;color:#b56010}.priority-critical{background:#ffeaea;color:#b63838}.open-case-btn{border:0;background:#edf4fa;color:#174f7d;border-radius:9px;padding:7px 10px;font-weight:900}.empty-state{text-align:center;padding:50px;color:var(--muted)}.empty-state b{display:block;color:var(--text);font-size:18px;margin-bottom:6px}
.admin-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:16px}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:18px 20px;border-bottom:1px solid #edf1f5}.panel-head h3{margin:0}.bar-list{padding:20px;display:grid;gap:14px}.bar-row{display:grid;grid-template-columns:minmax(120px,180px) 1fr 42px;gap:12px;align-items:center;font-size:13px}.bar-track{height:10px;background:#edf2f7;border-radius:999px;overflow:hidden}.bar-fill{height:100%;background:linear-gradient(90deg,#246aa8,#4f91c9);border-radius:999px}.bar-row:nth-child(2n) .bar-fill{background:linear-gradient(90deg,#7358c7,#9b86dc)}.bar-row:nth-child(3n) .bar-fill{background:linear-gradient(90deg,#e7a12d,#ffc160)}
footer{max-width:1500px;margin:0 auto;padding:20px 34px 28px;color:var(--muted);display:flex;justify-content:space-between;font-size:12px}.modal{position:fixed;inset:0;background:rgba(5,24,42,.55);z-index:50;display:grid;place-items:center;padding:24px}.modal-card{width:min(920px,100%);max-height:88vh;overflow:auto;background:#fff;border-radius:22px;padding:26px;position:relative;box-shadow:0 28px 80px rgba(0,0,0,.28)}.modal-close{position:absolute;right:18px;top:15px;width:38px;height:38px;border:1px solid var(--line);background:#fff;border-radius:11px;font-size:23px}.modal-head{display:flex;justify-content:space-between;align-items:start;padding-right:45px}.modal-head h2{margin:5px 0 0}.detail-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:20px 0}.detail-chip{background:#f5f8fb;padding:12px;border-radius:12px}.detail-chip small{display:block;color:var(--muted);font-size:10px;text-transform:uppercase}.detail-chip b{display:block;margin-top:4px;font-size:13px}.detail-section{border-top:1px solid var(--line);padding-top:18px;margin-top:18px}.detail-section h3{margin:0 0 12px}.detail-section p{white-space:pre-wrap;line-height:1.7}.timeline{display:grid;gap:10px}.timeline-item{display:grid;grid-template-columns:12px 1fr;gap:10px}.timeline-dot{width:10px;height:10px;background:var(--blue);border-radius:50%;margin-top:5px}.timeline-item small{color:var(--muted)}.comments{display:grid;gap:10px}.comment{padding:12px 14px;background:#f7f9fc;border-radius:12px}.comment.mine{background:#edf6ff}.comment b{font-size:12px}.comment p{margin:6px 0 0}.comment small{color:var(--muted)}.comment-form{display:grid;gap:10px;margin-top:12px}.comment-form textarea{border:1px solid var(--line);border-radius:12px;padding:12px;resize:vertical}.case-actions{display:flex;gap:10px;margin-top:18px;border-top:1px solid var(--line);padding-top:18px}.case-actions select{min-width:220px;border:1px solid var(--line);border-radius:12px;padding:11px}.toast{position:fixed;right:24px;bottom:24px;z-index:80;max-width:380px;background:var(--navy);color:#fff;padding:14px 18px;border-radius:14px;box-shadow:var(--shadow);font-weight:700;font-size:13px}
html[dir="rtl"] .modal-close{right:auto;left:18px}html[dir="rtl"] .modal-head{padding-right:0;padding-left:45px}html[dir="rtl"] .toast{right:auto;left:24px}
@media(max-width:1150px){.category-grid{grid-template-columns:repeat(3,1fr)}.header-actions .user-chip{display:none}.admin-kpis{grid-template-columns:repeat(3,1fr)}.trust-strip{grid-template-columns:repeat(2,1fr);gap:14px}.trust-strip>div{border:0}.auth-view{grid-template-columns:440px 1fr}.auth-panel{padding:44px}.submit-layout{grid-template-columns:1fr}.privacy-panel{position:static}.privacy-panel{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.privacy-panel h3,.privacy-panel .info-box,.privacy-panel .case-number-preview{grid-column:1/-1}.privacy-option{border:1px solid var(--line);border-radius:14px;padding:14px}}
@media(max-width:820px){.topbar{height:auto;min-height:76px;padding:12px 18px;flex-wrap:wrap}.main-nav{order:3;width:100%;height:44px;overflow:auto}.nav-link{min-width:max-content}.header-actions{gap:6px}.header-actions .icon-btn{display:none}main{padding:20px 16px 50px}.hero{padding:30px 24px;display:grid}.hero h1{font-size:40px}.hero h2{font-size:26px}.hero-side{min-width:0}.category-grid{grid-template-columns:1fr 1fr}.employee-kpis,.admin-kpis{grid-template-columns:1fr 1fr}.admin-grid{grid-template-columns:1fr}.form-grid.two{grid-template-columns:1fr}.detail-grid{grid-template-columns:1fr 1fr}.auth-view{grid-template-columns:1fr}.auth-art{display:none}.auth-panel{min-height:100vh}.trust-strip{grid-template-columns:1fr}.section-head,.page-title-row{align-items:start;flex-direction:column}.row-actions{width:100%;flex-wrap:wrap}.row-actions select{flex:1}.privacy-panel{grid-template-columns:1fr}.privacy-option{border-bottom:1px solid var(--line)}footer{padding:18px;flex-direction:column;gap:6px}}
@media(max-width:520px){.brand-copy small,.header-actions #logout-btn{display:none}.category-grid{grid-template-columns:1fr}.employee-kpis,.admin-kpis{grid-template-columns:1fr 1fr}.hero h1{font-size:34px}.auth-panel{padding:34px 22px}.trust-row{grid-template-columns:1fr}.segmented{grid-template-columns:1fr 1fr}.detail-grid{grid-template-columns:1fr}.case-actions{flex-direction:column}.case-actions select{width:100%}}

/* V1.0.1 — Create account */
.auth-switch-row{display:flex;align-items:center;justify-content:center;gap:7px;flex-wrap:wrap;margin:-4px 0 18px;color:var(--muted);font-size:14px}
.text-link.strong{font-weight:900;color:#075b96;text-decoration:underline;text-underline-offset:3px}
.auth-hint{display:block;color:var(--muted);font-weight:600;line-height:1.45;margin-top:-4px}
.auth-lang-btn{align-self:flex-start}
#signup-box h2{margin-top:0}
#signup-box .stack-form{margin-bottom:14px}
html[dir="rtl"] .auth-switch-row{direction:rtl}

/* V1.0.2 — Compact Corporate UI
   هدف النسخة: تقليل حجم الهيدر والـHero والكروت والمسافات على شاشات الديسكتوب
   بدون تغيير أي منطق أو صلاحيات أو تكامل Supabase. */
@media (min-width: 821px){
  .topbar{
    height:62px;
    padding:0 26px;
    gap:20px;
  }
  .brand{gap:9px}
  .brand-mark{
    width:34px;
    height:34px;
    border-radius:10px;
  }
  .brand-mark:before{height:16px;left:12px}
  .brand-mark:after{height:11px;right:12px}
  .brand-copy strong{font-size:16px}
  .brand-copy small{font-size:9px;margin-top:1px}
  .main-nav{gap:2px}
  .nav-link{padding:0 12px;font-size:13px}
  .nav-link.active:after{left:10px;right:10px;height:2px}
  .header-actions{gap:7px}
  .header-actions .btn.compact{padding:7px 11px;font-size:12px;border-radius:10px}
  .icon-btn{width:36px;height:36px;border-radius:10px;font-size:13px}
  .user-chip{padding:4px 8px;gap:7px;border-radius:11px}
  .avatar{width:28px;height:28px;font-size:12px}
  .user-chip strong{font-size:11px}
  .user-chip small{font-size:9px;max-width:125px}

  main{
    max-width:1580px;
    padding:18px 28px 40px;
  }
  .hero{
    min-height:178px;
    border-radius:22px;
    padding:24px 34px;
    gap:24px;
  }
  .hero:before{
    right:-70px;
    top:-155px;
    width:360px;
    height:360px;
    border-width:48px;
  }
  .hero h1{
    font-size:36px;
    letter-spacing:-1.2px;
    margin:4px 0 0;
    line-height:1.05;
  }
  .hero h2{font-size:23px;margin:3px 0 7px;line-height:1.2}
  .hero p{font-size:14px;margin:0;line-height:1.45}
  .eyebrow{font-size:9px;letter-spacing:1.6px}
  .hero-side{min-width:270px;gap:10px}
  .hero-status{padding:11px 13px;border-radius:13px;column-gap:7px}
  .hero-status b{font-size:12px}
  .hero-status small{font-size:10px;margin-top:2px}
  .pulse{width:8px;height:8px;box-shadow:0 0 0 4px rgba(72,217,154,.12)}
  .hero-side .btn{padding:9px 14px;font-size:13px;border-radius:10px}

  .section-head,.page-title-row{
    gap:16px;
    margin:20px 0 13px;
  }
  .section-head h2,.page-title-row h1{
    margin:4px 0 0;
    font-size:23px;
    letter-spacing:-.35px;
  }
  .page-title-row p{font-size:13px;margin-top:4px}
  .section-head .btn,.page-title-row .btn{padding:8px 12px;font-size:12px}

  .category-grid{gap:12px}
  .category-card{
    border-radius:16px;
    padding:16px 15px;
    min-height:170px;
  }
  .category-icon{
    width:46px;
    height:46px;
    font-size:21px;
    margin-bottom:11px;
  }
  .category-card h3{margin:0 0 6px;font-size:16px;line-height:1.2}
  .category-card p{font-size:12px;line-height:1.45;margin:0 0 10px}
  .category-card button{font-size:12px}
  .trust-strip{
    border-radius:14px;
    margin-top:13px;
    padding:11px 8px;
  }
  .trust-strip>div{gap:8px;padding:0 12px}
  .trust-icon{font-size:18px}
  .trust-strip b{font-size:11px}
  .trust-strip small{font-size:9.5px}

  .panel{border-radius:16px}
  .submit-layout{grid-template-columns:minmax(0,1fr) 290px;gap:16px}
  .case-form{padding:20px;gap:13px}
  .form-grid.two{gap:13px}
  .stack-form label,.case-form label{gap:6px;font-size:12px}
  .stack-form input,.case-form input,.case-form select,.case-form textarea,.row-actions select,.panel-head select{
    border-radius:10px;
    padding:10px 12px;
    font-size:13px;
  }
  .priority-field legend{font-size:12px;margin-bottom:6px}
  .segment{padding:8px 6px;font-size:10px}
  .file-drop{border-radius:12px;padding:14px}
  .privacy-panel{padding:18px;top:78px}
  .privacy-panel h3{font-size:16px}
  .privacy-option{gap:8px;padding:10px 0}
  .privacy-option b{font-size:12px}
  .privacy-option span{font-size:10px}
  .info-box{margin-top:12px;padding:11px;border-radius:11px;font-size:11px}
  .case-number-preview{margin-top:12px;padding:12px;border-radius:11px}
  .case-number-preview strong{font-size:14px}
  .btn.large{min-height:42px}

  .kpi-row{gap:10px;margin-bottom:13px}
  .kpi{border-radius:13px;padding:13px 15px}
  .kpi small{font-size:11px}
  .kpi strong{font-size:24px;margin-top:4px}
  .panel-head{padding:13px 15px}
  .panel-head h3{font-size:15px}
  th,td{padding:11px 13px;font-size:12px}
  th{font-size:9.5px}
  .status-pill,.priority-pill{padding:5px 8px;font-size:9.5px}
  .bar-list{padding:15px;gap:10px}

  footer{max-width:1580px;padding:13px 28px 20px;font-size:10px}
  .modal-card{border-radius:18px;padding:20px}

  /* Compact login / create account as well */
  .auth-view{grid-template-columns:minmax(330px,460px) 1fr}
  .auth-panel{padding:34px 48px}
  .auth-brand{gap:13px;margin-bottom:28px}
  .brand-mark.large{width:50px;height:50px;border-radius:14px}
  .auth-brand h1{font-size:27px}
  .auth-brand p{font-size:13px}
  .auth-panel h2{font-size:24px}
  .stack-form{gap:12px;margin:18px 0}
  .auth-art{padding:6vw}
  .art-copy h2{font-size:clamp(34px,4.2vw,60px);margin:10px 0}
  .art-copy p{font-size:16px;line-height:1.55}
  .trust-row{gap:10px;margin-top:26px}
  .trust-row>div{padding:13px;border-radius:13px}
  .auth-switch-row{font-size:12px;margin:-2px 0 12px}
}

@media (min-width: 1500px){
  main,footer{max-width:1660px}
}


/* V1.0.3 — Ultra Compact Corporate UI + System Governance */
.system-chip{height:30px;border:1px solid var(--line);background:#f9fbfd;border-radius:9px;padding:4px 8px;display:inline-flex;align-items:center;gap:5px;color:var(--text);white-space:nowrap;font-size:10px}.system-chip b{font-size:10px}.system-chip small{font-size:8px;color:var(--muted);font-weight:800}.system-dot{width:6px;height:6px;border-radius:50%;background:#24b982}.system-chip.offline .system-dot{background:#d88b00}.system-chip.offline #online-status-label{color:#a86400}.access-chip{display:grid;grid-template-columns:auto auto;column-gap:5px;text-align:start}.access-chip b{color:#0e5f98}
.user-chip{appearance:none;color:inherit;font:inherit;text-align:start;cursor:pointer}.cell-sub{display:block;color:var(--muted);font-size:9px;margin-top:2px}.mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.table-select{min-width:120px;border:1px solid var(--line);border-radius:8px;padding:6px 8px;background:#fff;font-size:10px;color:var(--text)}
.admin-tabs{display:flex;gap:5px;flex-wrap:wrap;margin:0 0 10px}.admin-tabs button{border:1px solid var(--line);background:#fff;border-radius:9px;padding:6px 10px;font-size:10px;font-weight:900;color:#526a80}.admin-tabs button.active{background:#eaf3fb;border-color:#a8c7e2;color:#0e5f98}.compact-title{margin-top:6px!important}.system-summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:10px}.mini-stat{background:#fff;border:1px solid var(--line);border-radius:11px;padding:9px 12px}.mini-stat small{color:var(--muted);font-size:9px;font-weight:800}.mini-stat b{display:block;font-size:18px;margin-top:2px}.compact-search{width:min(330px,45vw);border:1px solid var(--line);border-radius:9px;padding:7px 10px;font-size:11px;outline:none}.audit-action{font-weight:900;color:#1d628f}.audit-details{display:block;max-width:390px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:#f5f8fb;border-radius:6px;padding:4px 6px;font-size:9px}.backup-grid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(260px,.5fr);gap:12px}.backup-card{padding:18px;display:grid;grid-template-columns:auto 1fr auto;gap:14px;align-items:center}.backup-icon{width:42px;height:42px;border-radius:12px;background:#eaf3fb;display:grid;place-items:center;font-size:22px;color:#0e5f98}.backup-card h3,.backup-policy h3{margin:0 0 5px;font-size:16px}.backup-card p,.backup-policy p,.backup-card li{font-size:10px;color:var(--muted);line-height:1.45}.backup-card ul{margin:7px 0 0;padding-inline-start:18px}.backup-policy{padding:18px}.backup-meta{display:flex;justify-content:space-between;gap:12px;border-top:1px solid var(--line);padding-top:9px;margin-top:9px}.backup-meta small{color:var(--muted);font-size:9px}.backup-meta b{font-size:11px}.account-card{max-width:640px}.account-head{display:flex;align-items:center;gap:12px;margin-bottom:14px}.account-head h2{margin:2px 0 0}.account-avatar{width:42px;height:42px}.account-info-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.account-info-grid>div{border:1px solid var(--line);border-radius:10px;padding:9px 11px}.account-info-grid small{display:block;color:var(--muted);font-size:9px;margin-bottom:2px}.account-info-grid b{font-size:11px;word-break:break-word}.account-system-strip{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:9px;background:#f5f8fb;border-radius:10px;padding:8px 10px}.account-system-strip span{display:flex;justify-content:space-between;gap:8px}.account-system-strip small{color:var(--muted);font-size:9px}.account-system-strip b{font-size:10px}

@media (min-width:821px){
  .topbar{height:48px;padding:0 18px;gap:13px}
  .brand{gap:7px}.brand-mark{width:28px;height:28px;border-radius:8px}.brand-mark:before{height:13px;left:9px}.brand-mark:after{height:9px;right:9px}.brand-copy strong{font-size:13px}.brand-copy small{display:none}
  .main-nav{gap:1px}.nav-link{padding:0 9px;font-size:10.5px}.nav-link.active:after{left:8px;right:8px;height:2px}
  .header-actions{gap:5px}.header-actions .btn.compact{height:30px;padding:4px 8px;font-size:10px;border-radius:8px}.icon-btn{width:30px;height:30px;border-radius:8px;font-size:11px}.badge{min-width:15px;height:15px;font-size:8px}.user-chip{height:30px;padding:3px 6px;gap:5px;border-radius:9px}.avatar{width:23px;height:23px;font-size:10px}.user-chip strong{font-size:9.5px;max-width:105px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-chip small{font-size:7.5px;max-width:105px}
  main{max-width:1660px;padding:11px 20px 28px}.hero{min-height:108px;border-radius:17px;padding:13px 22px;gap:18px}.hero:before{right:-55px;top:-165px;width:300px;height:300px;border-width:40px}.hero h1{font-size:27px;letter-spacing:-.7px;margin:1px 0 0}.hero h2{font-size:17px;margin:1px 0 4px}.hero p{font-size:11px;line-height:1.3;margin:0}.eyebrow{font-size:7.5px;letter-spacing:1.2px}.hero-side{min-width:0;display:flex;align-items:center;gap:8px}.hero-status{padding:8px 10px;border-radius:10px;min-width:230px}.hero-status b{font-size:10px}.hero-status small{font-size:8.5px}.hero-side .btn{padding:7px 12px;font-size:10.5px;border-radius:9px;min-height:34px}
  .section-head,.page-title-row{margin:12px 0 8px;gap:10px}.section-head h2,.page-title-row h1{margin:2px 0 0;font-size:18px}.page-title-row p{font-size:10px;margin-top:2px}.section-head .btn,.page-title-row .btn{padding:6px 9px;font-size:9.5px}
  .category-grid{gap:8px}.category-card{border-radius:13px;padding:10px 11px;min-height:116px}.category-icon{width:32px;height:32px;font-size:15px;margin-bottom:6px}.category-card h3{margin:0 0 3px;font-size:12.5px}.category-card p{font-size:9.5px;line-height:1.3;margin:0 0 5px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.category-card button{font-size:9.5px}.trust-strip{border-radius:11px;margin-top:8px;padding:7px 5px}.trust-strip>div{gap:6px;padding:0 8px}.trust-icon{font-size:14px}.trust-strip b{font-size:9.5px}.trust-strip small{font-size:8px}
  .panel{border-radius:13px}.kpi{padding:9px 11px;border-radius:10px}.kpi small{font-size:9px}.kpi strong{font-size:19px}.kpi-row{gap:7px;margin-bottom:9px}.panel-head{padding:9px 11px}.panel-head h3{font-size:12px}.bar-list{padding:10px;gap:7px}th,td{padding:8px 10px;font-size:10px}th{font-size:8px}.status-pill,.priority-pill{padding:4px 6px;font-size:8px}
  footer{max-width:1660px;padding:8px 20px 13px;font-size:8px}.modal-card{padding:16px}
  .case-form{padding:14px;gap:10px}.submit-layout{grid-template-columns:minmax(0,1fr) 260px;gap:11px}.form-grid.two{gap:10px}.stack-form label,.case-form label{gap:4px;font-size:10px}.case-form input,.case-form select,.case-form textarea,.row-actions select,.panel-head select{padding:8px 10px;font-size:11px}.privacy-panel{padding:13px;top:58px}.privacy-option{padding:7px 0}.file-drop{padding:10px}.btn.large{min-height:36px}
  .auth-view{grid-template-columns:minmax(310px,410px) 1fr}.auth-panel{padding:26px 38px}.auth-brand{gap:10px;margin-bottom:20px}.brand-mark.large{width:42px;height:42px}.auth-brand h1{font-size:23px}.auth-brand p{font-size:11px}.auth-panel h2{font-size:20px}.stack-form{gap:9px;margin:13px 0}.stack-form input{padding:9px 10px;font-size:11px}.auth-art{padding:5vw}.art-copy h2{font-size:clamp(30px,3.7vw,50px)}.art-copy p{font-size:13px}.trust-row{margin-top:18px}.trust-row>div{padding:10px}.auth-switch-row{font-size:10px}
}
@media(max-width:1150px){.system-chip small{display:none}.system-chip{padding:4px 6px}.backup-grid{grid-template-columns:1fr}.backup-card{grid-template-columns:auto 1fr}.backup-card>.btn,.backup-card>.form-message{grid-column:1/-1}.system-summary-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:820px){.system-chip{display:none}.admin-tabs{overflow:auto;flex-wrap:nowrap}.admin-tabs button{white-space:nowrap}.system-summary-grid{grid-template-columns:1fr 1fr}.backup-grid{grid-template-columns:1fr}.account-info-grid{grid-template-columns:1fr}.compact-search{width:100%}}


/* V1.0.4 — Interaction Reliability Fix */
.auth-art:before,.auth-art:after,.hero:before{pointer-events:none!important}
#main-view,.topbar,main,.page,.category-grid,.category-card,.header-actions,.main-nav{pointer-events:auto}
button,a,input,select,textarea,label{pointer-events:auto}
.topbar{z-index:100}


/* V1.0.5 — Native Navigation + Hard Click Fallback */
#main-view{position:relative;z-index:1}
.topbar{position:sticky;isolation:isolate}
.topbar a,.topbar button,main a,main button,main input,main select,main textarea,main label{position:relative;z-index:2}
.modal.hidden,.loading-screen.hidden,.auth-view.hidden{display:none!important;pointer-events:none!important;visibility:hidden!important}
.category-action-link{display:inline-flex;align-items:center;color:#075b97;font-weight:900;font-size:inherit;text-decoration:none}
.nav-link{display:flex;align-items:center;text-decoration:none;cursor:pointer}
.admin-tabs a{border:1px solid var(--line);background:#fff;border-radius:9px;padding:6px 10px;font-size:10px;font-weight:900;color:#526a80;text-decoration:none;white-space:nowrap}
.admin-tabs a.active{background:#eaf3fb;border-color:#a8c7e2;color:#0e5f98}
/* Native hash routing still changes pages even if an application click handler fails. */
.page:target{display:block}
body:has(.page:target) .page.active-page:not(:target){display:none}
body:has(.page:target) #home:not(:target){display:none}

/* V1.0.6 — Reliable whole-card navigation + HRIS-style Speak Up splash */
.category-card-link{display:flex;flex-direction:column;color:inherit;text-decoration:none;cursor:pointer;position:relative;z-index:3}
.category-card-link .category-action-link{margin-top:auto}
.category-card-link:focus-visible{outline:3px solid rgba(255,126,0,.32);outline-offset:2px}
@media (hover:hover) and (pointer:fine){.category-card-link:hover{transform:translateY(-2px);border-color:#b8cee1;box-shadow:0 10px 26px rgba(15,48,80,.08)}}

.loading-screen{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;overflow:auto;padding:24px;background:linear-gradient(135deg,#0f3152 0 43%,#173f64 43% 46%,#eef4fa 46% 100%);transition:opacity .22s ease,visibility .22s ease}
.loading-screen.hidden{display:none!important;pointer-events:none!important;visibility:hidden!important}
.speakup-splash-shell{width:min(930px,94vw);display:grid;gap:12px;justify-items:center}
.speakup-splash-kicker{font-size:10px;letter-spacing:.20em;font-weight:950;color:#ff8a19;text-align:center}
.speakup-splash-card{width:100%;padding:22px 24px 20px;border-radius:22px;background:rgba(255,255,255,.985);border:1px solid rgba(216,229,240,.96);box-shadow:0 28px 70px rgba(8,34,61,.24);position:relative;overflow:hidden}
.speakup-splash-card:before{content:"";position:absolute;right:-90px;top:-135px;width:290px;height:290px;border-radius:50%;border:42px solid rgba(20,77,119,.055);pointer-events:none}
.speakup-splash-topline{display:flex;flex-wrap:wrap;justify-content:center;gap:7px;margin-bottom:12px}.speakup-splash-topline span,.speakup-splash-status-row span{padding:5px 9px;border-radius:999px;background:#f4f8fb;border:1px solid #dbe7f0;color:#44637d;font-size:9px;font-weight:900}
.speakup-splash-main{display:grid;grid-template-columns:minmax(260px,.9fr) minmax(340px,1.1fr);gap:18px;align-items:stretch;position:relative;z-index:1}
.speakup-splash-brand-panel{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;text-align:left;padding:8px 4px}
.speakup-splash-brand{display:flex;align-items:center;gap:12px}.speakup-splash-brand h1{margin:0;color:#0b3154;font-size:31px;line-height:1.05;letter-spacing:-.6px}.speakup-splash-brand h1 span{color:#ff7a00}.speakup-splash-brand p{margin:5px 0 0;color:#6c8094;font-size:13px}.speakup-splash-status{margin:14px 0 0;color:#3f607d;font-size:12px;font-weight:750}
.speakup-splash-points{width:100%;display:grid;gap:7px;margin-top:14px}.speakup-splash-points>span{display:grid;gap:1px;padding:8px 10px;border:1px solid #e0eaf2;border-radius:10px;background:linear-gradient(180deg,#fbfdff,#f5f8fb)}.speakup-splash-points b{color:#123b5f;font-size:10px}.speakup-splash-points small{color:#75879a;font-size:8.5px;line-height:1.35}
.speakup-splash-visual{position:relative;min-height:255px;margin:0;overflow:hidden;border-radius:16px;border:1px solid #d9e5ef;background:#f7fafc;box-shadow:0 10px 26px rgba(15,49,78,.09)}.speakup-splash-visual img{width:100%;height:100%;min-height:255px;display:block;object-fit:cover;object-position:center}.speakup-splash-visual figcaption{position:absolute;left:12px;bottom:10px;padding:6px 9px;border-radius:999px;color:#fff;background:rgba(10,49,82,.86);border:1px solid rgba(255,255,255,.2);font-size:8.5px;font-weight:900;letter-spacing:.05em;text-transform:uppercase}
.speakup-splash-status-row{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin:13px 0 10px}.speakup-splash-progress{width:100%;height:5px;border-radius:999px;background:#e6edf3;overflow:hidden;position:relative}.speakup-splash-progress i{position:absolute;inset:0 auto 0 0;width:38%;border-radius:inherit;background:linear-gradient(90deg,#ff7a00,#ffad54,#1c6ca2);animation:speakupProgress 1.15s cubic-bezier(.4,0,.2,1) infinite}.speakup-splash-card>small{display:block;margin-top:10px;text-align:center;color:#718397;font-size:8.5px;font-weight:800}
@keyframes speakupProgress{0%{transform:translateX(-115%)}100%{transform:translateX(300%)}}
html[dir="rtl"] .speakup-splash-brand-panel{align-items:flex-end;text-align:right}html[dir="rtl"] .speakup-splash-visual figcaption{left:auto;right:12px}
@media(max-width:760px){.loading-screen{padding:14px;background:linear-gradient(160deg,#103452 0 50%,#eef4fa 50% 100%)}.speakup-splash-main{grid-template-columns:1fr}.speakup-splash-brand-panel{align-items:center;text-align:center}.speakup-splash-points{display:none}.speakup-splash-visual{min-height:210px}.speakup-splash-visual img{min-height:210px}.speakup-splash-topline span:nth-child(3),.speakup-splash-status-row span:nth-child(n+4){display:none}.speakup-splash-card{padding:18px 15px 16px}.speakup-splash-brand h1{font-size:25px}.speakup-splash-kicker{font-size:8px}}
@media(prefers-reduced-motion:reduce){.speakup-splash-progress i{animation:none;width:100%}}
