:root {
  --app-primary: #1f5eff;
  --app-ink: #1c2434;
  --app-muted: #6b7486;
  --app-bg: #f4f6fa;
  --app-card: #ffffff;
  --app-line: #e3e7ef;
  --bs-primary: #1f5eff;
  --bs-primary-rgb: 31, 94, 255;
  --bs-body-font-family: "Segoe UI", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-color: var(--app-ink);
}
body { background: var(--app-bg); font-size: .925rem; }
body.guest { background: linear-gradient(135deg, #e9efff 0%, #f6f8fc 60%); min-height: 100vh; }
a { text-decoration: none; }
.app-nav { background: #0f1f45; }
.app-nav .navbar-brand { color: #fff; font-weight: 700; font-size: 1.05rem; }
.app-nav .nav-link { color: rgba(255,255,255,.75); font-weight: 500; border-radius: .5rem; padding: .45rem .6rem !important; white-space: nowrap; }
.app-nav .nav-link:hover, .app-nav .nav-link.active { color: #fff; background: rgba(255,255,255,.1); }
.app-nav .navbar-toggler { border-color: rgba(255,255,255,.3); }
.app-nav .navbar-toggler-icon { filter: invert(1); }
.search-box { min-width: 200px; background: rgba(255,255,255,.12); border: 0; color: #fff; }
.search-box::placeholder { color: rgba(255,255,255,.6); }
.search-box:focus { background: #fff; color: var(--app-ink); }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--app-primary); color: #fff; font-weight: 600; font-size: .8rem; }
.notif-count { position: absolute; top: 2px; right: -2px; font-size: .62rem; }
.page-head { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.page-head h1 { font-size: 1.35rem; font-weight: 700; margin: 0; }
.page-head .sub { color: var(--app-muted); font-size: .85rem; }
.card { border: 1px solid var(--app-line); border-radius: .85rem; box-shadow: none; }
.card-header { background: transparent; border-bottom: 1px solid var(--app-line); font-weight: 600; padding: .75rem 1rem; }
.stat-card { padding: 1rem 1.1rem; }
.stat-card .num { font-size: 1.8rem; font-weight: 700; line-height: 1.1; }
.stat-card .lbl { color: var(--app-muted); font-size: .82rem; }
.stat-card.warn .num { color: #c2410c; }
.stat-card.danger .num { color: #b91c1c; }
.stat-card.ok .num { color: #15803d; }
.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .55rem .7rem; vertical-align: middle; }
.table thead th { color: var(--app-muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .02em; border-bottom-color: var(--app-line); white-space: nowrap; }
.table-hover tbody tr:hover { background: #f7f9ff; }
.form-label { font-weight: 500; font-size: .85rem; margin-bottom: .25rem; }
.form-text { font-size: .78rem; }
.req::after { content: " *"; color: #dc2626; }
.nav-tabs .nav-link { font-weight: 500; color: var(--app-muted); }
.nav-tabs .nav-link.active { color: var(--app-ink); }
.tab-count { font-size: .7rem; vertical-align: top; }
.timeline { position: relative; padding-left: 1.4rem; }
.timeline::before { content: ""; position: absolute; left: .45rem; top: .3rem; bottom: .3rem; width: 2px; background: var(--app-line); }
.timeline .tl-item { position: relative; margin-bottom: 1rem; }
.timeline .tl-item::before { content: ""; position: absolute; left: -1.15rem; top: .35rem; width: .7rem; height: .7rem; border-radius: 50%; background: #fff; border: 2px solid var(--app-primary); }
.timeline .tl-item.done::before { background: #16a34a; border-color: #16a34a; }
.timeline .tl-item.late::before { border-color: #dc2626; }
.msg { max-width: 760px; padding: .6rem .85rem; border-radius: .8rem; background: #fff; border: 1px solid var(--app-line); margin-bottom: .6rem; }
.msg.mine { margin-left: auto; background: #eaf0ff; border-color: #cddcff; }
.msg .meta { font-size: .75rem; color: var(--app-muted); margin-bottom: .2rem; }
.fb-item { border-left: 4px solid var(--app-line); padding: .6rem .85rem; background: #fff; border-radius: .5rem; margin-bottom: .6rem; border-top: 1px solid var(--app-line); border-right: 1px solid var(--app-line); border-bottom: 1px solid var(--app-line); }
.fb-item.open { border-left-color: #dc2626; }
.fb-item.fixed { border-left-color: #f59e0b; }
.fb-item.confirmed { border-left-color: #16a34a; }
.fb-item.wontfix { border-left-color: #94a3b8; }
.ver-badge { display: inline-block; min-width: 2.4rem; text-align: center; font-weight: 700; background: #0f1f45; color: #fff; border-radius: .4rem; padding: .1rem .4rem; font-size: .8rem; }
.empty { text-align: center; color: var(--app-muted); padding: 2rem 1rem; }
.empty i { font-size: 2rem; display: block; margin-bottom: .4rem; opacity: .5; }
.login-card { max-width: 420px; margin: 8vh auto; }
.login-card .brand { font-size: 1.3rem; font-weight: 700; color: #0f1f45; }
.progress { height: .5rem; }
.kanban-col { min-width: 260px; }
.kanban-card { border: 1px solid var(--app-line); border-radius: .6rem; background: #fff; padding: .6rem .7rem; margin-bottom: .5rem; display: block; color: inherit; }
.kanban-card:hover { border-color: var(--app-primary); }
.chip { display: inline-block; padding: .1rem .5rem; border-radius: 1rem; background: #eef2f8; color: #334155; font-size: .75rem; margin: 0 .2rem .2rem 0; }
.text-pre { white-space: pre-wrap; }
.small-muted { font-size: .8rem; color: var(--app-muted); }
.sticky-actions { position: sticky; bottom: 0; background: var(--app-bg); padding: .75rem 0; border-top: 1px solid var(--app-line); z-index: 5; }
.bar { height: 10px; background: var(--app-primary); border-radius: 5px; }
.app-footer { border-top: 1px solid var(--app-line); }
.cal-day { border-bottom: 1px dashed var(--app-line); padding: .5rem 0; }
.cal-day .date { width: 5.5rem; flex-shrink: 0; font-weight: 600; }
@media (max-width: 576px) {
  .page-head h1 { font-size: 1.15rem; }
  .table-responsive-stack td { display: block; }
}
@media print {
  .app-nav, .app-footer, .no-print, .btn { display: none !important; }
  body { background: #fff; }
}
