
:root{--titan-dark:#101820;--titan-dark-2:#172331;--titan-ink:#26313f;--titan-gold:#f0b429;--titan-gold-2:#ffcf4d;--titan-bg:#f4f6f9;--titan-surface:#fff;--titan-text:#202832;--titan-muted:#7d8997;--titan-border:#dce2ea;--weekend:#fff5d8;--fc-bg:#fff;--scrollbar-track:#eef2f6;--scrollbar-thumb:#b8c3cf;--scrollbar-thumb-hover:#96a5b5}html{overflow-y:scroll}*{box-sizing:border-box;scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb) var(--scrollbar-track)}body{margin:0;font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;background:var(--titan-bg);color:var(--titan-text);transition:background .18s ease,color .18s ease;overflow-x:hidden}.theme-dark{--titan-bg:#0d131b;--titan-surface:#151e2a;--titan-text:#e8eef7;--titan-muted:#a8b4c3;--titan-border:#2d3a49;--fc-bg:#151e2a;--weekend:#1d2a38;--scrollbar-track:#121a24;--scrollbar-thumb:#425264;--scrollbar-thumb-hover:#5c6f85}.fw-black{font-weight:900}.auth-page{min-height:100vh;width:100%;padding-inline:16px;background:radial-gradient(circle at 20% 10%,rgba(240,180,41,.2),transparent 30%),linear-gradient(135deg,var(--titan-dark),#0a1017 65%,#1c2633)}.auth-page--request{padding-block:32px}.auth-shell{width:100%;max-width:430px}.auth-shell--wide{max-width:760px}.auth-card{max-width:430px;border:0;border-radius:26px;box-shadow:0 22px 80px rgba(0,0,0,.34);overflow:hidden;background:var(--titan-surface);color:var(--titan-text)}.auth-card--wide{max-width:none}.logo-gif{width:50px;height:50px;border-radius:14px;background:linear-gradient(135deg,var(--titan-gold),#d88a00);display:grid;place-items:center;overflow:hidden;flex:0 0 auto}.logo-gif img{width:150px;height:74px;object-fit:cover;object-position:34% 50%;transform:scale(1.18)}.logo-gif.logo-fallback:before{content:'PC';font-weight:900;color:#111820}.auth-logo{width:56px;height:56px}.app-shell{min-height:100vh;display:flex}.sidebar{width:282px;background:linear-gradient(180deg,var(--titan-dark),#0b121a);color:#fff;position:fixed;top:0;bottom:0;left:0;z-index:30;padding:20px 16px;box-shadow:12px 0 35px rgba(7,13,20,.18);transition:width .22s ease,transform .22s ease}.sidebar .brand{display:flex;align-items:center;gap:12px;padding:8px 8px 22px;border-bottom:1px solid rgba(255,255,255,.08);margin-bottom:16px;color:#fff;text-decoration:none}.sidebar .nav-link{color:rgba(255,255,255,.78);border-radius:16px;padding:13px 14px;margin:6px 0;display:flex;gap:10px;align-items:center;font-weight:600;white-space:nowrap}.sidebar .nav-link:hover,.sidebar .nav-link.active{background:rgba(240,180,41,.13);color:#fff}.sidebar .nav-link.active{box-shadow:inset 4px 0 0 var(--titan-gold)}.sidebar-footer{position:absolute;bottom:18px;left:16px;right:16px}.sidebar-footer .nav-link{background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.08)}.sidebar-collapsed .sidebar{width:86px}.sidebar-collapsed .content{margin-left:86px;width:calc(100% - 86px)}.sidebar-collapsed .brand-text,.sidebar-collapsed .nav-link span{display:none}.sidebar-collapsed .sidebar .nav-link{justify-content:center;padding:14px}.sidebar-collapsed .sidebar .brand{justify-content:center}.sidebar-collapsed .logo-gif{width:44px;height:44px}.sidebar-collapse-btn{position:absolute;top:72px;right:-17px;width:36px;height:36px;border-radius:50%;border:1px solid rgba(240,180,41,.55);background:var(--titan-gold);color:#111820;display:flex;align-items:center;justify-content:center;padding:0;line-height:1;box-shadow:0 10px 24px rgba(0,0,0,.22);z-index:35}.sidebar-collapse-btn i{display:block;font-size:1rem;line-height:1;pointer-events:none}.content{margin-left:282px;width:calc(100% - 282px);padding:24px;transition:margin-left .22s ease,width .22s ease}.topbar,.card-soft,.stat-card,.org-card,.task-card,.file-row{background:var(--titan-surface)!important;border:1px solid var(--titan-border);box-shadow:0 12px 32px rgba(28,39,51,.06)}.topbar{border-radius:24px;padding:16px 18px;display:flex;align-items:center;justify-content:space-between;gap:16px}.topbar-right{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}.theme-toggle span{margin-left:6px}.card-soft{border-radius:24px}.btn-gold{background:var(--titan-gold);border-color:var(--titan-gold);color:#121920;font-weight:800}.btn-gold:hover{background:var(--titan-gold-2);border-color:var(--titan-gold-2);color:#121920}.stat-card{min-height:112px;border-radius:24px;padding:18px}.stat-filter{cursor:pointer}.stat-filter:hover{transform:translateY(-1px);box-shadow:0 16px 38px rgba(28,39,51,.12)}.stat-filter small{color:var(--titan-muted);font-weight:700}.stat-value{font-size:2rem;font-weight:900;line-height:1}.stat-label{color:var(--titan-muted);font-weight:600}.chart-box{min-height:270px}.projects-status-wide{min-height:320px}#calendar{background:var(--fc-bg);border-radius:24px;padding:14px;border:1px solid var(--titan-border);box-shadow:0 12px 32px rgba(28,39,51,.06);min-height:720px}.fc .fc-toolbar-title{font-size:1.2rem;font-weight:900}.fc .fc-button-primary{background:var(--titan-dark-2);border-color:var(--titan-dark-2);border-radius:12px}.fc .fc-button-primary:hover{background:var(--titan-ink);border-color:var(--titan-ink)}.fc .fc-button-primary:not(:disabled).fc-button-active{background:var(--titan-gold);border-color:var(--titan-gold);color:#111820}.fc .fc-day-sat,.fc .fc-day-sun{background:var(--weekend)}.fc .fc-col-header-cell.fc-day-sat,.fc .fc-col-header-cell.fc-day-sun{background:rgba(240,180,41,.25)}.fc .fc-day-today{background:rgba(240,180,41,.18)!important}.fc .fc-daygrid-day-number{font-weight:800;color:inherit;text-decoration:none}.fc .fc-daygrid-more-link{font-weight:800;color:var(--titan-ink);background:#eef2f7;border-radius:999px;padding:2px 8px;margin-left:5px}.theme-dark .fc .fc-daygrid-more-link{background:#26313f;color:#fff}.fc .fc-daygrid-event,.fc .fc-timegrid-event{border-radius:12px!important;overflow:hidden;box-shadow:0 8px 18px rgba(16,24,32,.14);border:0!important}.fc .fc-daygrid-event{margin:3px 5px;padding:0!important}.fc .fc-timegrid-event{padding:0!important}.fc .fc-event-main{padding:0!important}.fc-task-card{display:flex;flex-direction:column;gap:3px;padding:7px 9px;min-height:50px;line-height:1.12}.fc-task-top{display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:.68rem;font-weight:800;opacity:.95}.fc-task-time{white-space:nowrap}.fc-task-status{border-radius:999px;background:rgba(255,255,255,.22);padding:1px 6px;font-size:.6rem;white-space:nowrap}.fc-task-title{font-weight:900;font-size:.82rem;letter-spacing:-.01em;white-space:normal;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.fc-task-meta,.fc-task-created{display:flex;align-items:center;gap:5px;font-size:.68rem;font-weight:700;opacity:.9;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.fc .fc-timegrid-event .fc-task-status{display:none}.fc .fc-timegrid-event .fc-task-created{display:none}.fc .fc-timegrid-event .fc-task-title{-webkit-line-clamp:1}.task-work{background:#0d6efd!important}.task-done{background:#198754!important}.task-pause{background:#f0b429!important}.task-approve{background:#6c757d!important}.dialog-box{border:1px solid var(--titan-border);border-radius:20px;background:rgba(127,137,151,.06);padding:14px}.dialog-threads{display:grid;gap:12px}.dialog-thread{border:1px solid var(--titan-border);border-radius:16px;background:var(--titan-surface);padding:12px}.dialog-head{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}.dialog-head span{color:var(--titan-muted);font-size:.85rem}.task-filter-list{display:grid;gap:14px}.filter-project{border:1px solid var(--titan-border);border-radius:18px;padding:14px;background:var(--titan-surface)}.filter-project h6{font-weight:900}.filter-project li{margin:.35rem 0}.task-filter-actions{display:grid;gap:10px}.task-filter-item{width:100%;border:1px solid var(--titan-border);border-radius:14px;background:rgba(127,137,151,.06);padding:12px 14px;text-align:left;color:var(--titan-text);display:grid;gap:4px;transition:background .15s ease,border-color .15s ease,transform .15s ease}.task-filter-item:hover{background:rgba(240,180,41,.12);border-color:#f0b429;transform:translateY(-1px)}.task-filter-item__title{font-weight:800}.task-filter-item__meta{font-size:.88rem;color:var(--titan-muted)}.task-filter-actions{display:grid;gap:10px}.task-filter-item{width:100%;border:1px solid var(--titan-border);border-radius:14px;background:rgba(127,137,151,.06);padding:12px 14px;text-align:left;color:var(--titan-text);display:grid;gap:4px;transition:background .15s ease,border-color .15s ease,transform .15s ease}.task-filter-item:hover{background:rgba(240,180,41,.12);border-color:#f0b429;transform:translateY(-1px)}.task-filter-item__title{font-weight:800}.task-filter-item__meta{font-size:.88rem;color:var(--titan-muted)}.table{color:var(--titan-text)}.table>:not(caption)>*>*{padding:1rem .9rem;background:transparent;color:var(--titan-text);border-color:var(--titan-border)}.project-row{cursor:pointer}.project-row:hover{background:rgba(240,180,41,.12)}.project-link{display:block;color:inherit;text-decoration:none}.project-link:hover{color:inherit}.org-tree{max-width:980px;margin:auto}.org-main{max-width:520px;margin:auto}.org-card{border-radius:22px;padding:16px}.org-card .avatar,.profile-avatar{width:52px;height:52px;border-radius:16px;background:#eff3f7;display:grid;place-items:center;font-weight:900;color:var(--titan-dark);float:left;margin-right:12px}.profile-avatar{float:none;font-size:1.3rem}.org-line{width:2px;background:var(--titan-border);margin:0 auto;min-height:24px}.drop-zone{min-height:220px;border:2px dashed #c9d2de;background:rgba(127,137,151,.06);border-radius:24px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:8px;padding:24px;color:var(--titan-muted)}.drop-zone-wide{min-height:260px}.file-list{display:grid;gap:10px}.file-list-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.file-row{border-radius:18px;padding:14px;display:flex;gap:12px;align-items:center}.file-row i{font-size:1.7rem;color:var(--titan-gold)}.file-row div{display:flex;flex-direction:column}.file-row span{color:var(--titan-muted);font-size:.9rem}.file-row.active{background:rgba(240,180,41,.12)!important;border-color:#f4cd66}.pdf-preview{height:720px;border:1px solid var(--titan-border);border-radius:22px;background:var(--titan-surface);overflow:hidden}.pdf-preview iframe,.pdf-preview object{width:100%;height:100%;border:0}.pdf-preview-wide{height:760px}.project-tasks-wide{margin-bottom:24px}.task-card{height:100%;border-radius:22px;padding:18px}.task-card h3{font-size:1.1rem;font-weight:900;margin:.75rem 0 .35rem}.task-card p{color:var(--titan-muted);margin:0}.mobile-toggle{display:none}.form-control,.form-select{border-radius:14px;border-color:#d5dde7;padding:.72rem .9rem}.theme-dark .form-control,.theme-dark .form-select{background:#101820;color:#e8eef7;border-color:#2d3a49}.modal-content{border:0;border-radius:24px;box-shadow:0 20px 80px rgba(0,0,0,.24);background:var(--titan-surface);color:var(--titan-text)}.btn-close{filter:none}.theme-dark .btn-close{filter:invert(1)}.min-w-0{min-width:0}.c3-legend-item,.c3-axis{font-family:inherit}.c3 text{fill:var(--titan-text)!important}.c3 path,.c3 line{stroke:var(--titan-border)!important}@media(max-width:1199px){.file-list-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:991px){.sidebar{transform:translateX(-102%);width:282px}.sidebar.open{transform:translateX(0)}.sidebar-collapsed .sidebar{width:282px}.sidebar-collapsed .brand-text,.sidebar-collapsed .nav-link span{display:block}.sidebar-collapsed .content,.content{margin-left:0;width:100%;padding:14px}.mobile-toggle{display:inline-flex}.topbar{border-radius:18px;align-items:flex-start;flex-direction:column}.topbar-right{width:100%;justify-content:stretch}.topbar-right .btn{flex:1}.stat-card{min-height:auto}#calendar{min-height:640px;padding:8px}.fc .fc-toolbar{display:block}.fc .fc-toolbar-chunk{margin-bottom:8px}.pdf-preview{height:520px}.chart-box{min-height:230px}.sidebar-collapse-btn{display:none}.file-list-grid{grid-template-columns:1fr}.pdf-preview-wide{height:560px}}

/* v11 theme and layout fixes */
.logo-gif{width:45px!important;height:55px!important;border-radius:10px!important;background:transparent!important;overflow:visible!important;box-shadow:none!important;}
.logo-gif img{width:100%!important;height:100%!important;object-fit:contain!important;object-position:center!important;transform:none!important;display:block;}
.auth-logo{width:72px!important;height:88px!important;}
.sidebar-collapsed .logo-gif{width:38px!important;height:46px!important;}
.stat-card{color:var(--titan-text)!important;}
.stat-value{color:var(--titan-text)!important;}
.stat-label,.text-secondary{color:var(--titan-muted)!important;}
.btn-outline-dark{color:var(--titan-text);border-color:var(--titan-border);background:transparent;}
.btn-outline-dark:hover{color:#111820;background:var(--titan-gold);border-color:var(--titan-gold);}
.theme-dark .btn-outline-dark,.theme-dark .btn-outline-secondary{color:#e8eef7;border-color:#536273;background:rgba(255,255,255,.02);}
.theme-dark .btn-outline-dark:hover,.theme-dark .btn-outline-secondary:hover{color:#111820;background:var(--titan-gold);border-color:var(--titan-gold);}
.theme-dark .btn-light{background:#26313f;border-color:#2d3a49;color:#e8eef7;}
.theme-dark .badge.text-bg-warning{color:#111820!important;}
.theme-dark #calendar{background:#111a26;color:#e8eef7;}
.theme-dark .fc .fc-scrollgrid,.theme-dark .fc .fc-scrollgrid table,.theme-dark .fc-theme-standard td,.theme-dark .fc-theme-standard th{border-color:#2d3a49!important;}
.theme-dark .fc .fc-col-header-cell{background:#172331!important;color:#e8eef7!important;}
.theme-dark .fc .fc-col-header-cell-cushion{color:#e8eef7!important;text-decoration:none;}
.theme-dark .fc .fc-daygrid-day,.theme-dark .fc .fc-timegrid-slot,.theme-dark .fc .fc-timegrid-col{background:#111a26!important;}
.theme-dark .fc .fc-day-sat,.theme-dark .fc .fc-day-sun{background:#1b2938!important;}
.theme-dark .fc .fc-day-today{background:rgba(240,180,41,.18)!important;}
.theme-dark .fc .fc-daygrid-day-number,.theme-dark .fc .fc-list-day-text,.theme-dark .fc .fc-list-day-side-text{color:#e8eef7!important;text-decoration:none;}
.theme-dark .fc .fc-list,.theme-dark .fc .fc-list-table td,.theme-dark .fc .fc-list-day-cushion{background:#111a26!important;color:#e8eef7!important;border-color:#2d3a49!important;}
.theme-dark .fc .fc-toolbar-title{color:#e8eef7!important;}
.theme-dark .fc .fc-button-primary{background:#26313f;border-color:#536273;color:#e8eef7;}
.theme-dark .fc .fc-button-primary:hover{background:#344255;border-color:#64758a;}
.project-reset-btn{min-height:48px;white-space:nowrap;}
@media(max-width:991px){.project-reset-btn{min-height:auto}.topbar-right .btn{flex:0 0 auto}.logo-gif{width:42px!important;height:51px!important}}

/* v12 fixes */
:root{--weekend:#e9f8ef;--fc-today:#fff1bf;--fc-weekend-head:#cfefd9;--fc-today-head:#ffd96a;}
.theme-dark{--weekend:#122820;--fc-today:#4a3a12;--fc-weekend-head:#1f4a36;--fc-today-head:#6a5418;}
.fc .fc-day-sat,.fc .fc-day-sun{background:var(--weekend)!important;}
.fc .fc-col-header-cell.fc-day-sat,.fc .fc-col-header-cell.fc-day-sun{background:var(--fc-weekend-head)!important;}
.fc .fc-day-today{background:var(--fc-today)!important;box-shadow:inset 0 0 0 2px rgba(240,180,41,.65)!important;}
.fc .fc-col-header-cell.fc-day-today{background:var(--fc-today-head)!important;}
.fc .fc-timegrid-axis,
.fc .fc-timegrid-axis-frame,
.fc .fc-col-header,
.fc .fc-col-header table,
.fc .fc-scrollgrid-section-header,
.fc .fc-scrollgrid-section-header th{background:var(--titan-surface)!important;color:var(--titan-text)!important;}
.fc .fc-col-header-cell-cushion{color:var(--titan-text)!important;text-decoration:none!important;font-weight:800;}
.theme-dark .fc .fc-timegrid-axis,
.theme-dark .fc .fc-timegrid-axis-frame,
.theme-dark .fc .fc-col-header,
.theme-dark .fc .fc-col-header table,
.theme-dark .fc .fc-scrollgrid-section-header,
.theme-dark .fc .fc-scrollgrid-section-header th,
.theme-dark .fc .fc-col-header-cell{background:#172331!important;color:#e8eef7!important;}
.theme-dark .fc .fc-col-header-cell.fc-day-today{background:var(--fc-today)!important;color:#e8eef7!important;}
.theme-dark .fc .fc-timegrid-axis-frame,
.theme-dark .fc .fc-col-header-cell-cushion,
.theme-dark .fc .fc-timegrid-slot-label-cushion{color:#e8eef7!important;text-decoration:none!important;}
.theme-dark .fc .fc-timegrid-slot-label,
.theme-dark .fc .fc-timegrid-axis-cushion{color:#a8b4c3!important;}
.theme-dark .fc .fc-daygrid-day,.theme-dark .fc .fc-timegrid-slot,.theme-dark .fc .fc-timegrid-col{background:#111a26!important;color:#e8eef7!important;}
.theme-dark .fc .fc-day-sat,.theme-dark .fc .fc-day-sun{background:var(--weekend)!important;}
.theme-dark .fc .fc-day-today{background:var(--fc-today)!important;}

/* Mobile: use adaptive bottom navigation instead of slide-out sidebar */
@media(max-width:991px){
  .app-shell{display:block;padding-bottom:96px;}
  .sidebar,.sidebar.open,.sidebar-collapsed .sidebar{position:fixed!important;left:10px!important;right:10px!important;bottom:10px!important;top:auto!important;width:auto!important;height:auto!important;transform:none!important;padding:8px!important;border-radius:24px;background:rgba(16,24,32,.96)!important;box-shadow:0 14px 45px rgba(0,0,0,.32);z-index:50;}
  .sidebar .brand,.sidebar-footer,.sidebar-collapse-btn{display:none!important;}
  .sidebar nav.nav{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;}
  .sidebar .nav-link{margin:0!important;padding:9px 4px!important;border-radius:16px!important;justify-content:center!important;flex-direction:column!important;gap:3px!important;font-size:.68rem!important;line-height:1.05;text-align:center;white-space:normal!important;}
  .sidebar .nav-link i{font-size:1.1rem;}
  .sidebar-collapsed .brand-text,.sidebar-collapsed .nav-link span{display:inline!important;}
  .sidebar .nav-link.active{box-shadow:none!important;background:rgba(240,180,41,.22)!important;}
  .content,.sidebar-collapsed .content{margin-left:0!important;width:100%!important;padding:14px 12px 106px!important;}
  .mobile-toggle{display:none!important;}
  .topbar{margin-bottom:12px!important;}
}

/* v13: requests, service calendar and mobile bottom navigation fixes */
.approval-panel{border:1px solid var(--titan-border);border-radius:18px;background:rgba(127,137,151,.06);padding:16px;}
.calendar-wide{background:var(--fc-bg);border-radius:24px;padding:14px;border:1px solid var(--titan-border);box-shadow:0 12px 32px rgba(28,39,51,.06);min-height:620px;}
.task-filter-row{margin-left:0!important;margin-right:0!important;}
.badge.text-bg-info{color:#062b33!important;}
.theme-dark .badge.text-bg-info{color:#051f25!important;}
.theme-dark .fc .fc-timegrid-axis,
.theme-dark .fc .fc-timegrid-axis-frame,
.theme-dark .fc .fc-timegrid-axis-cushion,
.theme-dark .fc .fc-col-header,
.theme-dark .fc .fc-col-header-cell,
.theme-dark .fc .fc-col-header-cell-cushion,
.theme-dark .fc .fc-scrollgrid-section-header th{background:#172331!important;color:#e8eef7!important;}
.theme-dark .fc .fc-col-header-cell.fc-day-today,
.theme-dark .fc .fc-day-today{background:var(--fc-today)!important;}
.theme-dark .fc .fc-col-header-cell.fc-day-today{background:var(--fc-today-head)!important;}
@media(max-width:991px){
  .app-shell{display:block;padding-bottom:92px!important;}
  .sidebar,.sidebar.open,.sidebar-collapsed .sidebar{position:fixed!important;left:8px!important;right:8px!important;bottom:8px!important;top:auto!important;width:auto!important;height:auto!important;min-height:74px!important;transform:none!important;padding:7px!important;border-radius:22px!important;background:rgba(16,24,32,.98)!important;box-shadow:0 12px 38px rgba(0,0,0,.36)!important;overflow:visible!important;z-index:1050!important;}
  .sidebar .brand,.sidebar-footer,.sidebar-collapse-btn{display:none!important;}
  .sidebar nav.nav{display:flex!important;flex-direction:row!important;gap:6px!important;overflow-x:auto!important;overflow-y:hidden!important;-webkit-overflow-scrolling:touch!important;scrollbar-width:none!important;padding:0 2px 2px!important;white-space:nowrap!important;touch-action:pan-x!important;}
  .sidebar nav.nav::-webkit-scrollbar{display:none!important;}
  .sidebar .nav-link{flex:0 0 72px!important;min-width:72px!important;height:58px!important;margin:0!important;padding:7px 4px!important;border-radius:16px!important;justify-content:center!important;align-items:center!important;flex-direction:column!important;gap:3px!important;font-size:.62rem!important;line-height:1.05!important;text-align:center!important;white-space:normal!important;color:rgba(255,255,255,.78)!important;}
  .sidebar .nav-link i{font-size:1.08rem!important;line-height:1!important;}
  .sidebar .nav-link span{display:block!important;max-width:68px!important;overflow:hidden!important;text-overflow:ellipsis!important;}
  .sidebar .nav-link.active{box-shadow:none!important;background:rgba(240,180,41,.24)!important;color:#fff!important;}
  .content,.sidebar-collapsed .content{margin-left:0!important;width:100%!important;padding:12px 10px 98px!important;}
  .topbar{border-radius:18px!important;padding:12px!important;align-items:flex-start!important;}
  .topbar-right{width:100%!important;justify-content:flex-start!important;}
  .topbar-right .btn{width:auto!important;}
  .mobile-toggle{display:none!important;}
  #calendar,.calendar-wide{padding:8px!important;min-height:580px!important;border-radius:18px!important;}
  .fc .fc-toolbar{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;}
  .fc .fc-toolbar-chunk{display:flex!important;justify-content:center!important;flex-wrap:wrap!important;}
  .fc .fc-toolbar-title{font-size:1rem!important;text-align:center!important;}
  .fc .fc-button{padding:.35rem .5rem!important;font-size:.78rem!important;}
  .file-row{align-items:flex-start!important;flex-wrap:wrap!important;padding:12px!important;}
  .file-row .ms-auto{width:100%!important;margin-left:0!important;justify-content:flex-start!important;flex-wrap:wrap!important;}
  .file-row .btn{min-width:0!important;}
  .pdf-preview,.pdf-preview-wide{height:420px!important;}
  .table>:not(caption)>*>*{padding:.75rem .65rem!important;}
  .approval-panel .d-flex{flex-direction:column!important;align-items:stretch!important;}
  .approval-panel .btn{width:100%!important;}
}

.action-group{display:flex;flex-wrap:wrap;gap:.5rem;justify-content:flex-end;align-items:center}
.action-group .btn{display:inline-flex;align-items:center;justify-content:center;gap:.35rem;min-height:38px}
.action-group--table{width:100%}
.action-group--table .btn{flex:0 0 auto}
.access-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
.access-matrix-table,
.access-users-table{min-width:980px}
.access-matrix-table th,
.access-users-table th{white-space:nowrap}
.access-matrix-table td,
.access-users-table td{vertical-align:top}
.access-matrix-table td:first-child,
.access-users-table td:first-child{min-width:180px}
.access-permission-select,
.access-user-role-select{
  min-width:170px;
  width:100%;
  padding-right:2.75rem;
  background-position:right .8rem center;
  background-size:16px 12px;
  text-overflow:ellipsis;
}
.access-matrix-table .action-group--table{min-width:124px}
@media(min-width:992px){
  .file-list-grid{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}
  .file-row{
    display:grid!important;
    grid-template-columns:auto minmax(0,1fr) auto;
    align-items:center!important;
    gap:12px;
    padding:12px 14px;
    cursor:pointer;
  }
  .file-row>i{
    font-size:1.5rem;
  }
  .file-row>.min-w-0{
    min-width:0;
  }
  .file-row>.min-w-0 b{
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    line-height:1.2;
  }
  .file-action-group{
    display:flex!important;
    flex-direction:row!important;
    margin-left:0;
    width:auto;
    justify-content:flex-end;
    align-items:center;
    flex-wrap:nowrap;
    gap:.4rem;
  }
  .file-action-group .btn{
    flex:0 0 auto;
    min-width:2.25rem;
    width:2.25rem;
    height:2.25rem;
    padding:0;
    white-space:nowrap;
  }
  .file-action-group .btn i{font-size:.95rem;line-height:1}
}
.modal-footer .action-group{width:100%;justify-content:flex-end}
[data-save-role],
[data-save-user-role]{min-width:38px}
[data-save-role]:not(:has(i)),
[data-save-user-role]:not(:has(i)){font-size:0}
[data-save-role]:not(:has(i))::before,
[data-save-user-role]:not(:has(i))::before{content:"💾";font-size:1rem;line-height:1}
.auth-hero{padding:18px 20px;border:1px solid var(--titan-border);border-radius:24px;background:linear-gradient(135deg,rgba(240,180,41,.14),rgba(16,24,32,.02))}
.auth-brand-button{padding:0;border:0;background:transparent}
.auth-hero--center{display:flex;justify-content:center}
.auth-brand-button--hero{display:inline-flex;align-items:center;justify-content:center}
.auth-brand-button--hero:focus-visible{outline:2px solid var(--titan-gold);outline-offset:10px;border-radius:24px}
.auth-logo--hero{width:144px!important;height:176px!important}
@media(max-width:991px){.auth-logo--hero{width:112px!important;height:138px!important}}
.auth-entry-btn{min-height:46px;padding-inline:18px}
.auth-heading{color:#101820}
.auth-subtitle{color:#435160;max-width:540px}
.theme-dark .auth-hero{background:linear-gradient(135deg,rgba(240,180,41,.16),rgba(255,255,255,.03));border-color:#39485a}
.theme-dark .auth-heading{color:#f5f7fb}
.theme-dark .auth-subtitle{color:#c7d2df}
@media(max-width:991px){
  .action-group,
  .action-group--table,
  .file-action-group,
  .modal-footer .action-group{width:100%;justify-content:stretch;align-items:stretch}
  .action-group .btn,
  .file-action-group .btn,
  .modal-footer .action-group .btn{width:100%}
  .auth-hero{padding:16px}
  .auth-entry-btn{width:100%;justify-content:center}
  .access-matrix-table,
  .access-users-table{min-width:860px}
  .access-permission-select,
  .access-user-role-select{min-width:156px;font-size:.95rem}
}

.nav-link-mobile-only{display:none!important}
@media(max-width:991px){
  .sidebar .nav-link.nav-link-mobile-only{display:flex!important}
}
.drop-zone{cursor:pointer;transition:border-color .18s ease,background .18s ease,transform .18s ease,box-shadow .18s ease}
.drop-zone__hint{max-width:44rem}
.drop-zone__meta{font-size:.92rem}
.drop-zone.is-dragover{border-color:var(--titan-gold);background:rgba(240,180,41,.14);color:var(--titan-text);transform:translateY(-1px);box-shadow:0 16px 38px rgba(28,39,51,.12)}
.drop-zone.is-uploading{opacity:.72;pointer-events:none}
.profile-preferences-divider{height:1px;background:var(--titan-border);margin:1.25rem 0}
.profile-language-form{display:grid;gap:1rem}
.profile-language-controls{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.75rem 1rem;align-items:end}
.profile-language-controls label{grid-column:1 / -1}
.profile-language-controls .btn{min-width:190px}
.profile-language-help{margin-top:-.25rem}
@media(max-width:991px){
  .profile-language-controls{grid-template-columns:1fr}
  .profile-language-controls .btn{width:100%;min-width:0}
}

.error-shell{
  min-height:min(100dvh, 860px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:28px 16px;
}
.error-card{
  width:100%;
  max-width:640px;
  padding:28px 24px;
  border:1px solid var(--titan-border);
  border-radius:28px;
  background:var(--titan-surface);
  box-shadow:0 20px 60px rgba(28,39,51,.10);
  text-align:center;
}
.error-code{
  font-size:clamp(3rem,2rem + 4vw,5rem);
  font-weight:900;
  line-height:1;
  letter-spacing:-.04em;
  color:var(--titan-gold);
}
.error-title{
  margin:.9rem 0 .6rem;
  font-size:clamp(1.45rem,1.1rem + 1vw,2rem);
  font-weight:900;
  line-height:1.1;
}
.error-message{
  margin:0 auto;
  max-width:42rem;
  font-size:1rem;
  color:var(--titan-text);
}
.error-hint{
  margin:.85rem auto 0;
  max-width:42rem;
  color:var(--titan-muted);
}
.error-actions{
  margin-top:1.35rem;
  display:flex;
  gap:.75rem;
  justify-content:center;
  flex-wrap:wrap;
}
@media(max-width:991px){
  .error-shell{
    min-height:auto;
    padding:18px 10px 24px;
  }
  .error-card{
    padding:22px 16px;
    border-radius:22px;
  }
  .error-actions{
    flex-direction:column;
  }
.error-actions .btn{
    width:100%;
  }
}

/* v15: higher-contrast scrollbars for active UI containers */
.table-responsive,
.access-table-wrap,
.modal-body,
.pdf-preview,
.pdf-preview-wide,
.file-list,
.file-list-grid,
.sidebar nav.nav{
  scrollbar-width:thin;
  scrollbar-color:var(--scrollbar-thumb) var(--scrollbar-track);
}
.table-responsive::-webkit-scrollbar,
.access-table-wrap::-webkit-scrollbar,
.modal-body::-webkit-scrollbar,
.pdf-preview::-webkit-scrollbar,
.pdf-preview-wide::-webkit-scrollbar,
.file-list::-webkit-scrollbar,
.file-list-grid::-webkit-scrollbar,
.sidebar nav.nav::-webkit-scrollbar{
  width:10px;
  height:10px;
}
.table-responsive::-webkit-scrollbar-track,
.access-table-wrap::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track,
.pdf-preview::-webkit-scrollbar-track,
.pdf-preview-wide::-webkit-scrollbar-track,
.file-list::-webkit-scrollbar-track,
.file-list-grid::-webkit-scrollbar-track,
.sidebar nav.nav::-webkit-scrollbar-track{
  background:color-mix(in srgb, var(--scrollbar-track) 86%, transparent);
  border-radius:999px;
}
.table-responsive::-webkit-scrollbar-thumb,
.access-table-wrap::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb,
.pdf-preview::-webkit-scrollbar-thumb,
.pdf-preview-wide::-webkit-scrollbar-thumb,
.file-list::-webkit-scrollbar-thumb,
.file-list-grid::-webkit-scrollbar-thumb,
.sidebar nav.nav::-webkit-scrollbar-thumb{
  background:linear-gradient(180deg,var(--scrollbar-thumb),color-mix(in srgb, var(--scrollbar-thumb) 76%, #ffffff 24%));
  border-radius:999px;
  border:2px solid color-mix(in srgb, var(--scrollbar-track) 82%, transparent);
}
.table-responsive::-webkit-scrollbar-thumb:hover,
.access-table-wrap::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover,
.pdf-preview::-webkit-scrollbar-thumb:hover,
.pdf-preview-wide::-webkit-scrollbar-thumb:hover,
.file-list::-webkit-scrollbar-thumb:hover,
.file-list-grid::-webkit-scrollbar-thumb:hover,
.sidebar nav.nav::-webkit-scrollbar-thumb:hover{
  background:linear-gradient(180deg,var(--scrollbar-thumb-hover),color-mix(in srgb, var(--scrollbar-thumb-hover) 80%, #ffffff 20%));
}
.theme-dark .table-responsive::-webkit-scrollbar-track,
.theme-dark .access-table-wrap::-webkit-scrollbar-track,
.theme-dark .modal-body::-webkit-scrollbar-track,
.theme-dark .pdf-preview::-webkit-scrollbar-track,
.theme-dark .pdf-preview-wide::-webkit-scrollbar-track,
.theme-dark .file-list::-webkit-scrollbar-track,
.theme-dark .file-list-grid::-webkit-scrollbar-track,
.theme-dark .sidebar nav.nav::-webkit-scrollbar-track{
  background:color-mix(in srgb, var(--scrollbar-track) 94%, #0a1017 6%);
}
.theme-dark .table-responsive::-webkit-scrollbar-thumb,
.theme-dark .access-table-wrap::-webkit-scrollbar-thumb,
.theme-dark .modal-body::-webkit-scrollbar-thumb,
.theme-dark .pdf-preview::-webkit-scrollbar-thumb,
.theme-dark .pdf-preview-wide::-webkit-scrollbar-thumb,
.theme-dark .file-list::-webkit-scrollbar-thumb,
.theme-dark .file-list-grid::-webkit-scrollbar-thumb,
.theme-dark .sidebar nav.nav::-webkit-scrollbar-thumb{
  background:linear-gradient(180deg,#5d7188,#3f4f61);
  border-color:rgba(18,26,36,.9);
}
.theme-dark .table-responsive::-webkit-scrollbar-thumb:hover,
.theme-dark .access-table-wrap::-webkit-scrollbar-thumb:hover,
.theme-dark .modal-body::-webkit-scrollbar-thumb:hover,
.theme-dark .pdf-preview::-webkit-scrollbar-thumb:hover,
.theme-dark .pdf-preview-wide::-webkit-scrollbar-thumb:hover,
.theme-dark .file-list::-webkit-scrollbar-thumb:hover,
.theme-dark .file-list-grid::-webkit-scrollbar-thumb:hover,
.theme-dark .sidebar nav.nav::-webkit-scrollbar-thumb:hover{
  background:linear-gradient(180deg,#7890aa,#55697f);
}

/* v14: normalize desktop scale and suppress layout overflow */
html{
  font-size:15px;
  overflow-y:auto;
  overflow-x:hidden;
}
body{
  min-width:320px;
  line-height:1.45;
}
.app-shell{
  min-height:100dvh;
  width:100%;
  overflow-x:clip;
}
.content,
.topbar,
.card-soft,
.stat-card,
.auth-shell,
.auth-card{
  min-width:0;
}
.content{
  padding:20px 20px 28px;
  overflow-x:hidden;
}
.topbar h1.h3,
.content h1.h3{
  font-size:clamp(1.45rem,1.05rem + .9vw,1.85rem);
  line-height:1.15;
}
.text-secondary,
.stat-label,
.auth-subtitle{
  font-size:.95rem;
}
.stat-card{
  min-height:96px;
  padding:16px;
}
.stat-value{
  font-size:clamp(1.55rem,1.2rem + .8vw,1.9rem);
}
.card-soft{
  border-radius:22px;
}
.table-responsive,
.access-table-wrap{
  overflow-y:hidden;
}
.auth-page{
  min-height:100dvh;
  padding:20px 16px;
}
.auth-page--request{
  padding-block:20px;
}
.auth-shell--wide{
  max-width:680px;
}
.auth-card{
  border-radius:22px;
}
.auth-card .card-body{
  padding:1.5rem!important;
}
.auth-hero{
  padding:14px 16px;
  border-radius:20px;
}
.auth-logo{
  width:56px!important;
  height:68px!important;
}
.auth-logo--hero{
  width:96px!important;
  height:118px!important;
}
.auth-heading{
  font-size:clamp(1.45rem,1.1rem + .8vw,1.85rem);
  line-height:1.15;
}
.form-label{
  margin-bottom:.35rem;
  font-size:.92rem;
  font-weight:600;
}
.form-control,
.form-select{
  min-height:42px;
  padding:.62rem .8rem;
  font-size:.95rem;
  line-height:1.35;
}
textarea.form-control{
  min-height:120px;
  resize:vertical;
}
.modal-dialog{
  padding-inline:10px;
}
@media(min-width:992px){
  .content{
    padding:22px 22px 30px;
  }
}
@media(max-width:991px){
  html{
    font-size:14px;
  }
  .auth-page{
    padding:14px 10px 18px;
  }
  .auth-card .card-body{
    padding:1.1rem!important;
  }
  .auth-hero{
    padding:12px;
  }
  .auth-logo--hero{
    width:82px!important;
    height:100px!important;
  }
  .content,
  .sidebar-collapsed .content{
    padding:12px 10px 98px!important;
  }
}

.titan-toast-stack{
  z-index:1200;
  gap:.8rem;
  max-width:min(100vw - 1.25rem, 420px);
}
.titan-toast{
  width:min(100%, 392px);
  border:1px solid rgba(255,255,255,.08)!important;
  border-radius:20px!important;
  background:color-mix(in srgb, var(--titan-surface) 92%, #fff 8%)!important;
  color:var(--titan-text)!important;
  box-shadow:0 20px 48px rgba(16,24,32,.18);
  backdrop-filter:blur(18px);
  overflow:hidden;
}
.titan-toast::before{
  content:"";
  display:block;
  height:4px;
  background:var(--toast-accent, var(--titan-dark));
}
.titan-toast .toast-body{
  padding:0;
}
.titan-toast__inner{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:.85rem;
  align-items:start;
  padding:1rem 1rem .95rem;
}
.titan-toast__icon{
  width:2.25rem;
  height:2.25rem;
  border-radius:14px;
  display:grid;
  place-items:center;
  font-size:1rem;
  color:#fff;
  background:var(--toast-accent, var(--titan-dark));
  box-shadow:0 10px 22px color-mix(in srgb, var(--toast-accent, var(--titan-dark)) 34%, transparent);
}
.titan-toast__title{
  margin:0 0 .2rem;
  font-size:.95rem;
  font-weight:800;
  line-height:1.2;
}
.titan-toast__message{
  margin:0;
  color:var(--titan-muted);
  line-height:1.45;
  word-break:break-word;
}
.titan-toast .btn-close{
  margin:.15rem 0 0;
  opacity:.75;
}
.titan-toast .btn-close:hover{
  opacity:1;
}
.titan-toast--success{--toast-accent:#198754;}
.titan-toast--info{--toast-accent:#0d6efd;}
.titan-toast--warning{--toast-accent:#f0b429;}
.titan-toast--warning .titan-toast__icon{color:#111820;}
.titan-toast--danger{--toast-accent:#dc3545;}
.theme-dark .titan-toast{
  background:color-mix(in srgb, var(--titan-surface) 92%, #101820 8%)!important;
  border-color:rgba(255,255,255,.06)!important;
  box-shadow:0 22px 54px rgba(0,0,0,.34);
}
.theme-dark .titan-toast__message{
  color:#c7d2df;
}
.field-error{
  display:block;
  margin-top:.38rem;
  font-size:.84rem;
  font-weight:600;
  color:#c53030;
}
.form-control.is-invalid,
.form-select.is-invalid{
  border-color:#dc3545;
  box-shadow:0 0 0 .2rem rgba(220,53,69,.12);
}
.form-control.is-invalid:focus,
.form-select.is-invalid:focus{
  border-color:#dc3545;
  box-shadow:0 0 0 .25rem rgba(220,53,69,.16);
}
.theme-dark .field-error{
  color:#ff8f8f;
}
.theme-dark .form-control.is-invalid,
.theme-dark .form-select.is-invalid{
  border-color:#ff7c7c;
  box-shadow:0 0 0 .2rem rgba(255,124,124,.14);
}
@media(max-width:991px){
  .titan-toast-stack{
    left:.7rem!important;
    right:.7rem!important;
    max-width:none;
    padding:.8rem!important;
  }
  .titan-toast{
    width:100%;
  }
  .titan-toast__inner{
    grid-template-columns:auto minmax(0,1fr);
  }
  .titan-toast .btn-close{
    grid-column:2;
    justify-self:end;
    margin-top:-2.1rem;
  }
}

.task-priority-normal{background:#0d6efd!important;border-color:#0d6efd!important;color:#fff!important}
.task-priority-high{background:#f0b429!important;border-color:#f0b429!important;color:#111820!important}
.task-priority-urgent{background:#dc3545!important;border-color:#dc3545!important;color:#fff!important}

.matrix-bot-form .modal-body{
  padding-left:1.5rem;
  padding-right:1.5rem;
}

.matrix-bot-form .modal-body>.container-fluid{
  padding-left:0;
  padding-right:0;
}

.matrix-bot-form .modal-body .row{
  margin-left:0;
  margin-right:0;
}

.activity-panel{
  overflow:hidden;
}
.activity-filters{
  display:grid;
  grid-template-columns:minmax(180px, 240px) minmax(180px, 260px) minmax(220px, 1fr) auto;
  gap:.75rem;
  align-items:end;
}
.activity-filters .form-label{
  margin-bottom:.25rem;
  font-size:.78rem;
  font-weight:800;
  color:var(--titan-muted);
}
.activity-table{
  font-size:.86rem;
}
.activity-table th{
  white-space:nowrap;
  font-size:.76rem;
  text-transform:uppercase;
  color:var(--titan-muted);
  letter-spacing:0;
}
.activity-table td{
  padding:.42rem .5rem;
  vertical-align:top;
}
.activity-action{
  display:inline-block;
  max-width:150px;
  padding:.12rem .42rem;
  border-radius:6px;
  background:rgba(13,110,253,.08);
  color:#0b5ed7;
  font-family:var(--bs-font-monospace);
  font-size:.78rem;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.activity-user-agent,
.activity-details{
  max-width:260px;
  max-height:2.8em;
  overflow:hidden;
}
.theme-dark .activity-action{
  background:rgba(91,157,255,.16);
  color:#9fc4ff;
}
@media(max-width:991px){
  .activity-filters{
    grid-template-columns:1fr;
  }
  .activity-filters__actions .btn{
    width:100%;
  }
}
