:root {
  --brand: #751733;
  --brand-dark: #531023;
  --brand-soft: #f7edf1;
  --ink: #20252d;
  --muted: #68717d;
  --line: #e2e6eb;
  --surface: #f4f6f8;
  --surface-raised: #fff;
  --sidebar-width: 282px;
}
body { background: var(--surface); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
.app-navbar { background: linear-gradient(108deg, var(--brand-dark), var(--brand)); min-height: 68px; box-shadow: 0 2px 14px rgba(36, 14, 22, .16); }
.navbar-brand { line-height: 1.05; }
.navbar-brand small { color: rgba(255,255,255,.68); font-size: .68rem; font-weight: 500; letter-spacing: .08em; margin-top: .2rem; text-transform: uppercase; }
.brand-mark { align-items: center; background: #fff; border-radius: 10px; color: var(--brand); display: inline-flex; font-size: .78rem; height: 36px; justify-content: center; width: 36px; }
.user-menu { align-items: center; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.13); border-radius: 12px; color: #fff; display: flex; gap: .65rem; padding: .38rem .55rem; }
.user-menu:hover { background: rgba(255,255,255,.14); }
.user-menu strong,.user-menu small { display: block; font-size: .78rem; line-height: 1.25; }
.user-menu small { color: rgba(255,255,255,.68); font-size: .68rem; font-weight: 400; }
.user-avatar { align-items: center; background: rgba(255,255,255,.92); border-radius: 9px; color: var(--brand); display: inline-flex; font-size: .8rem; font-weight: 800; height: 32px; justify-content: center; width: 32px; }
.global-search { flex: 0 1 560px; margin: 0 1.25rem; max-width: 560px; position: relative; width: 100%; }
.global-search input { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 11px; color: #fff; min-height: 42px; outline: 0; padding: .55rem 1rem .55rem 2.4rem; transition: background .18s ease,border-color .18s ease; width: 100%; }
.global-search input::placeholder { color: rgba(255,255,255,.64); }
.global-search input:focus { background: #fff; border-color: #fff; color: var(--ink); box-shadow: 0 5px 20px rgba(25,13,18,.16); }
.global-search-icon { color: rgba(255,255,255,.72); font-size: 1.25rem; left: .8rem; line-height: 1; pointer-events: none; position: absolute; top: .65rem; z-index: 1; }
.global-search:focus-within .global-search-icon { color: var(--brand); }
.global-search-results { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 45px rgba(25,13,18,.2); left: 0; max-height: min(70vh,560px); overflow-y: auto; padding: .45rem; position: absolute; right: 0; top: calc(100% + .45rem); z-index: 1060; }
.global-search-results section + section { border-top: 1px solid #edf0f2; margin-top: .35rem; padding-top: .35rem; }
.global-search-results h3 { color: var(--muted); font-size: .65rem; font-weight: 800; letter-spacing: .08em; margin: .3rem .55rem; text-transform: uppercase; }
.global-search-results a { border-radius: 8px; color: var(--ink); display: block; padding: .48rem .58rem; text-decoration: none; }
.global-search-results a:hover { background: var(--brand-soft); }
.global-search-results strong,.global-search-results small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.global-search-results strong { font-size: .84rem; }
.global-search-results small { color: var(--muted); font-size: .72rem; margin-top: .08rem; }
.search-message { color: var(--muted); font-size: .84rem; padding: 1rem; text-align: center; }
.app-shell { display: flex; min-height: calc(100vh - 68px); }
.sidebar { background: #fff; border-right: 1px solid var(--line); flex: 0 0 var(--sidebar-width); min-height: calc(100vh - 68px); width: var(--sidebar-width); }
.module-nav { display: grid; gap: .35rem; }
.nav-home,.nav-group-title { align-items: center; background: transparent; border: 0; border-radius: 10px; color: #343a43; display: flex; font-weight: 650; gap: .7rem; padding: .7rem .8rem; text-align: left; text-decoration: none; width: 100%; }
.nav-home:hover,.nav-group-title:hover { background: #f6f7f9; color: var(--brand); }
.nav-home.active { background: var(--brand-soft); color: var(--brand); }
.nav-icon { align-items: center; background: #eceff2; border-radius: 8px; display: inline-flex; font-size: 1rem; height: 28px; justify-content: center; width: 28px; }
.nav-home.active .nav-icon { background: #fff; }
.nav-group { border-top: 1px solid #f0f1f3; padding-top: .35rem; }
.nav-group-title { color: #59616b; font-size: .76rem; letter-spacing: .045em; text-transform: uppercase; }
.nav-group.is-open .nav-group-title { color: var(--brand); }
.chevron { font-size: 1rem; margin-left: auto; transition: transform .18s ease; }
.nav-group-title[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.nav-item { border-left: 2px solid #e7e9ec; color: #4d5661; display: block; font-size: .9rem; margin-left: 1.65rem; padding: .5rem .85rem; text-decoration: none; }
.nav-item:hover { background: #faf6f8; border-left-color: #d6aebe; color: var(--brand); }
.nav-item.active { background: linear-gradient(90deg, var(--brand-soft), transparent); border-left-color: var(--brand); color: var(--brand); font-weight: 700; }
.sidebar-footer { align-items: center; border-top: 1px solid var(--line); color: var(--muted); display: flex; font-size: .75rem; gap: .45rem; margin-top: 1.5rem; padding: 1rem .5rem 0; }
.status-dot { background: #2aa66a; border: 3px solid #dff4e9; border-radius: 50%; height: 12px; width: 12px; }
.content { min-width: 0; width: 100%; }
.content > * { max-width: 1580px; margin-left: auto; margin-right: auto; }
.auth-container { max-width: 560px; }
.auth-card { border: 0; }
.form-card { max-width: 720px; }
.page-heading { align-items: end; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; margin-bottom: 1.5rem; }
.page-eyebrow { color: var(--brand); font-size: .72rem; font-weight: 800; letter-spacing: .11em; margin-bottom: .35rem; text-transform: uppercase; }
.page-heading h1 { font-size: clamp(1.65rem,2.5vw,2.15rem); letter-spacing: -.035em; margin: 0; }
.page-heading p { color: var(--muted); margin: .35rem 0 0; }
.card { border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 4px 16px rgba(32,37,45,.035); overflow: hidden; }
.card-header { border-bottom-color: var(--line); padding: .9rem 1.05rem; }
.card-header a { font-size: .84rem; font-weight: 650; text-decoration: none; }
.list-group-item { border-color: #edf0f2; padding: .85rem 1.05rem; }
.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table thead th { background: #f7f8fa; border-bottom-width: 1px; color: #68717d; font-size: .72rem; letter-spacing: .045em; padding: .75rem 1rem; text-transform: uppercase; }
.table td { padding: .85rem 1rem; vertical-align: middle; }
.form-control,.form-select { border-color: #d9dde2; border-radius: 9px; min-height: 42px; }
.form-control:focus,.form-select:focus { border-color: #b76d86; box-shadow: 0 0 0 .2rem rgba(117,23,51,.1); }
.btn { border-radius: 9px; font-weight: 650; }
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand-dark); --bs-btn-hover-border-color: var(--brand-dark); --bs-btn-active-bg: var(--brand-dark); }
.welcome-panel { background: linear-gradient(118deg, #5c1027, #851c3e); border: 0; border-radius: 18px; color: #fff; overflow: hidden; padding: clamp(1.25rem,3vw,2rem); position: relative; }
.welcome-panel::after { border: 42px solid rgba(255,255,255,.055); border-radius: 50%; content: ""; height: 210px; position: absolute; right: -55px; top: -70px; width: 210px; }
.welcome-panel .page-eyebrow { color: #e9b8c8; }
.welcome-panel h1 { font-size: clamp(1.7rem,3vw,2.35rem); letter-spacing: -.04em; }
.welcome-panel p { color: rgba(255,255,255,.72); }
.day-summary { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.25rem; position: relative; z-index: 1; }
.summary-chip { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.13); border-radius: 10px; min-width: 105px; padding: .55rem .75rem; }
.summary-chip strong { display: block; font-size: 1.15rem; line-height: 1; }
.summary-chip span { color: rgba(255,255,255,.7); font-size: .7rem; }
.section-heading { align-items: center; display: flex; gap: .75rem; justify-content: space-between; margin: 1.6rem 0 .8rem; }
.section-heading h2 { font-size: 1rem; font-weight: 750; margin: 0; }
.section-heading small { color: var(--muted); }
.module-grid { display: grid; gap: .75rem; grid-template-columns: repeat(6,minmax(0,1fr)); }
.module-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); min-height: 145px; padding: 1rem; position: relative; text-decoration: none; transition: border-color .18s ease,box-shadow .18s ease,transform .18s ease; }
.module-card:hover { border-color: #d7aebe; box-shadow: 0 10px 24px rgba(63,27,40,.09); color: var(--ink); transform: translateY(-2px); }
.module-card-icon { align-items: center; background: var(--brand-soft); border-radius: 10px; color: var(--brand); display: inline-flex; font-size: .7rem; font-weight: 850; height: 38px; justify-content: center; letter-spacing: .04em; margin-bottom: .8rem; width: 38px; }
.module-card strong { display: block; font-size: .9rem; }
.module-card p { color: var(--muted); font-size: .75rem; line-height: 1.35; margin: .25rem 0 0; }
.module-card .module-count { background: #f0f2f4; border-radius: 999px; color: #555f69; font-size: .68rem; padding: .2rem .45rem; position: absolute; right: .75rem; top: .75rem; }
.work-column { display: grid; gap: 1rem; }
.panel-title { align-items: center; display: flex; justify-content: space-between; }
.panel-title strong { align-items: center; display: flex; gap: .5rem; }
.panel-accent { background: var(--brand); border-radius: 999px; display: inline-block; height: 8px; width: 8px; }
.panel-accent.warning { background: #d8991d; }
.panel-accent.info { background: #377ca8; }
.calendar-actions { align-items: center; display: flex; flex-wrap: wrap; gap: .55rem; }
.calendar-actions .btn { align-items: center; display: inline-flex; gap: .4rem; justify-content: center; min-height: 42px; white-space: nowrap; }
.empty-compact { color: var(--muted); font-size: .88rem; padding: 1.4rem 1.05rem; text-align: center; }
.status-pending { background: #fff3cd; color: #664d03; }
.status-active { background: #d1e7dd; color: #0f5132; }
.status-disabled { background: #e2e3e5; color: #41464b; }
.hierarchy-block { border-left: 3px solid #e8d3db; padding: .75rem 0 .75rem 1rem; }
.space-chip { border: 1px solid var(--line); border-radius: .5rem; color: var(--ink); padding: .45rem .65rem; text-decoration: none; }
.space-chip:hover { border-color: var(--brand); color: var(--brand); }
.space-chip small { color: var(--muted); margin-left: .25rem; }
.empty-state { background: #fff; border: 1px dashed #adb5bd; border-radius: .75rem; padding: 3rem 1rem; text-align: center; }
.asset-status,.priority-low,.priority-normal,.priority-high,.priority-urgent { border-radius: 999px; display: inline-block; font-size: .75rem; font-weight: 700; padding: .28rem .58rem; }
.status-operational { background: #d1e7dd; color: #0f5132; }
.status-partial-issue { background: #fff3cd; color: #664d03; }
.status-out-of-service { background: #f8d7da; color: #842029; }
.status-maintenance { background: #cfe2ff; color: #084298; }
.status-unknown,.status-stored,.status-loaned,.status-retired { background: #e2e3e5; color: #41464b; }
.priority-low { background: #e2e3e5; color: #41464b; }
.priority-normal { background: #cfe2ff; color: #084298; }
.priority-high { background: #fff3cd; color: #664d03; }
.priority-urgent { background: #f8d7da; color: #842029; }
.detail-list dt { width: 34%; }
.detail-list dd { margin-left: 34%; width: 66%; }
.qr-image { height: auto; max-width: 220px; width: 100%; }
.preserve-lines { white-space: pre-line; }
.timeline { border-left: 2px solid var(--line); margin-left: 1.25rem; padding-left: 1.5rem; }
.timeline-event { margin-bottom: 1.25rem; position: relative; }
.timeline-event::before { background: var(--brand); border-radius: 50%; content: ""; height: .65rem; left: -1.86rem; position: absolute; top: .35rem; width: .65rem; }
.timeline-event time { color: var(--muted); display: block; font-size: .78rem; }
.check-button { background: transparent; border: 0; color: var(--brand); font-size: 1.25rem; line-height: 1; padding: 0; width: 1.5rem; }
.global-create { bottom: 1.25rem; position: fixed; right: 1.25rem; z-index: 1030; }
.global-create > button { font-size: 1.8rem; height: 3.4rem; line-height: 1; width: 3.4rem; }
.modal-content { border: 0; border-radius: 16px; box-shadow: 0 22px 65px rgba(25,18,21,.2); overflow: hidden; }
.modal-header,.modal-footer { border-color: var(--line); padding: 1rem 1.2rem; }
.modal-body { padding: 1.2rem; }
.modal-action-grid { display: grid; gap: .75rem; grid-template-columns: repeat(2,minmax(0,1fr)); }
.modal-action-grid a { border: 1px solid var(--line); border-radius: 12px; color: var(--ink); display: grid; min-height: 126px; padding: .9rem; text-decoration: none; transition: border-color .18s ease,background .18s ease; }
.modal-action-grid a:hover { background: var(--brand-soft); border-color: #d7aebe; color: var(--ink); }
.modal-action-grid span { align-items: center; background: var(--brand-soft); border-radius: 8px; color: var(--brand); display: inline-flex; font-size: .68rem; font-weight: 850; height: 32px; justify-content: center; margin-bottom: .55rem; width: 32px; }
.modal-action-grid strong { font-size: .9rem; }
.modal-action-grid small { color: var(--muted); font-size: .72rem; line-height: 1.3; }
.computer-board { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill,minmax(135px,1fr)); }
.computer-tile { align-items: center; background: #fff; border: 1px solid var(--line); border-left-width: 5px; border-radius: .65rem; color: var(--ink); display: grid; gap: .25rem; padding: .8rem; text-decoration: none; }
.computer-tile small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-border-operational { border-left-color: #198754; }.status-border-partial-issue { border-left-color: #ffc107; }.status-border-out-of-service { border-left-color: #dc3545; }.status-border-maintenance { border-left-color: #0d6efd; }.status-border-unknown,.status-border-stored,.status-border-loaned,.status-border-retired { border-left-color: #6c757d; }
.mobile-nav { display: none; }
@media (min-width: 992px) {
  .sidebar { height: calc(100vh - 68px); position: sticky; top: 68px; }
  .sidebar .offcanvas-body { height: 100%; overflow-y: auto; }
}
@media (max-width: 1399.98px) { .module-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 991.98px) {
  .sidebar { min-height: 100vh; }
  .content { padding-bottom: 6rem !important; }
  .mobile-nav { background: rgba(255,255,255,.97); border-top: 1px solid var(--line); bottom: 0; display: grid; grid-template-columns: repeat(5,1fr); left: 0; padding: .42rem .3rem max(.42rem,env(safe-area-inset-bottom)); position: fixed; right: 0; z-index: 1040; }
  .mobile-nav a,.mobile-nav button { align-items: center; background: transparent; border: 0; color: #68717d; display: flex; flex-direction: column; font-size: .66rem; gap: .08rem; text-decoration: none; }
  .mobile-nav span { font-size: 1.05rem; line-height: 1.25; }
  .mobile-nav .active { color: var(--brand); font-weight: 750; }
  .global-create { bottom: 4.85rem; right: .85rem; }
}
@media (max-width: 767.98px) {
  .app-navbar { gap: .5rem; padding-bottom: .6rem; }
  .global-search { flex-basis: 100%; margin: .15rem 0 0; max-width: none; order: 4; }
  .global-search input { min-height: 40px; }
}
@media (max-width: 575.98px) {
  .auth-container { padding: 1rem !important; }
  .auth-card .card-body { padding: 1.5rem !important; }
  .content { padding: 1rem 1rem 6rem !important; }
  .module-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .module-card { min-height: 138px; }
  .summary-chip { flex: 1 1 42%; }
  .calendar-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .calendar-actions .btn:first-child { grid-column: 1/-1; }
  .modal-dialog { align-items: end; margin: .5rem; min-height: calc(100% - 1rem); }
  .modal-content { border-radius: 16px 16px 10px 10px; }
  .modal-action-grid { grid-template-columns: 1fr 1fr; }
  .detail-list dt,.detail-list dd { margin-left: 0; width: 100%; }
  .detail-list dd { margin-bottom: .75rem; }
}
