html { font-size: 15px; height: 100%; overflow: hidden; }
body { background: #f5f6f8; margin: 0; height: 100%; height: 100dvh; overflow: hidden; overscroll-behavior: none; }
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 1030; }
.itops-frame { position: fixed; left: 0; right: 0; top: calc(var(--itops-nav-h, 58px) + .75rem); bottom: var(--itops-foot-h, 36px); overflow: hidden; display: flex; flex-direction: column; }
.itops-scroll { flex: 1 1 auto; min-height: 0; height: 100%; overflow: auto; overscroll-behavior: contain; }
.itops-foot { position: fixed; bottom: 0; left: 0; right: 0; z-index: 1030; padding: .35rem .75rem .6rem; background: #f5f6f8; }
.card { border: 0; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 1px 4px rgba(0,0,0,.04); }
.stat-card .stat-n { font-size: 2rem; font-weight: 600; line-height: 1.1; }
.stat-card .stat-l { color: #6c757d; font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; }
.stat-card a { text-decoration: none; color: inherit; }
.table thead th { white-space: nowrap; font-size: .82rem; text-transform: uppercase; letter-spacing: .02em; color: #555; }
.table thead th a { color: inherit; text-decoration: none; }
.table td { vertical-align: middle; }
.table-sm td, .table-sm th { padding: .35rem .5rem; }
.quick-status { width: auto; min-width: 8.5rem; display: inline-block; }
.qty-input { width: 5rem; display: inline-block; }
.note { border-left: 3px solid #0d6efd; background: #fff; padding: .5rem .75rem; margin-bottom: .5rem; border-radius: .25rem; overflow-wrap: anywhere; word-break: break-word; }
.note .meta { font-size: .8rem; color: #6c757d; }
.note-body { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.note-html, .note-html a, .note-html code, .note a, .note code { overflow-wrap: anywhere; word-break: break-word; }
.prewrap { white-space: pre-wrap; }
.overdue { color: #b02a37; font-weight: 600; }
.lowstock { background: #fff3cd !important; }
.agenda-day { font-weight: 600; margin-top: 1rem; border-bottom: 1px solid #dee2e6; padding-bottom: .2rem; }
.cal { table-layout: fixed; }
.cal td { height: 6.5rem; vertical-align: top; font-size: .78rem; background: #fff; }
.cal td.other { background: #f1f3f5; color: #adb5bd; }
.cal td.today { outline: 2px solid #0d6efd; outline-offset: -2px; }
.cal .ev { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: .2rem; padding: 0 .25rem; margin-bottom: 1px; background: #e7f1ff; color: #084298; text-decoration: none; }
.cal .ev.od { background: #f8d7da; color: #842029; }
.mono { font-family: SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: .85rem; }
.setup-log { background: #111; color: #d1e7dd; padding: .75rem; border-radius: .3rem; white-space: pre-wrap; font-family: Consolas, monospace; font-size: .82rem; max-height: 22rem; overflow: auto; }
.login-card { max-width: 420px; margin: 4rem auto; }
.filters .form-select, .filters .form-control { font-size: .88rem; }
@media print {
  html, body { height: auto !important; overflow: visible !important; }
  .navbar, .itops-foot, .itops-frame, .itops-scroll { position: static !important; top: auto !important; bottom: auto !important; height: auto !important; overflow: visible !important; display: block !important; }
  .itops-scroll > main, .itops-scroll > main > .row, .itops-scroll > main > .row > [class*="col"] { display: block !important; height: auto !important; max-height: none !important; overflow: visible !important; }
  nav, footer, .no-print { display: none !important; }
}

/* ---- Oct 2026 release: dashboard, monitoring, KB, SQL console ---- */
.navbar .nav-link { padding-left: .55rem !important; padding-right: .55rem !important; }
.dash-tile { height: 100%; }
.dash-tile .card-header { background: transparent; border-bottom: 1px solid #eef0f3; font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; color: #555; display: flex; justify-content: space-between; align-items: center; }
.dash-tile .card-header a { text-transform: none; letter-spacing: 0; font-weight: 500; }
.dash-big { font-size: 2.4rem; font-weight: 600; line-height: 1; }
.dash-big-label { color: #6c757d; font-size: .85rem; }
.dash-stats { list-style: none; padding: 0; margin: .75rem 0 0; }
.dash-stats li { display: flex; justify-content: space-between; padding: .2rem 0; border-bottom: 1px dashed #eef0f3; font-size: .9rem; }
.dash-stats li:last-child { border-bottom: 0; }
.dash-stats a { text-decoration: none; color: inherit; }
.health-bar { height: .6rem; border-radius: .3rem; overflow: hidden; display: flex; background: #e9ecef; margin: .5rem 0; }
.health-bar span { display: block; height: 100%; }
.compact-list { list-style: none; padding: 0; margin: .5rem 0 0; font-size: .88rem; }
.compact-list li { display: flex; justify-content: space-between; gap: .5rem; padding: .18rem 0; min-width: 0; }
.compact-list li a, .compact-list li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact-list li a { text-decoration: none; }
.action-list .list-group-item { border-left: 4px solid #0dcaf0; display: flex; gap: .75rem; align-items: flex-start; }
.action-list .list-group-item.sev-danger { border-left-color: #dc3545; }
.action-list .list-group-item.sev-warning { border-left-color: #ffc107; }
.action-list .ai-kind { min-width: 4.8rem; }
.action-list .ai-main { flex: 1; min-width: 0; }
.action-list .ai-detail { color: #6c757d; font-size: .85rem; }
.action-list .ai-date { color: #6c757d; font-size: .8rem; white-space: nowrap; }
.all-clear { color: #198754; font-size: .9rem; }
.status-dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .35rem; vertical-align: middle; }
.mx-table td, .svc-table td { font-size: .88rem; }
.uplink { font-size: .78rem; white-space: nowrap; }
.inline-form { display: inline; }
/* knowledgebase */
.kb-sidebar { font-size: .9rem; }
.kb-sidebar .kb-node { display: block; padding: .15rem .4rem; border-radius: .25rem; color: #333; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-sidebar .kb-node:hover { background: #e9ecef; }
.kb-sidebar .kb-node.active { background: #0d6efd; color: #fff; }
.kb-sidebar .kb-node.in-path { font-weight: 600; }
.kb-sidebar .kb-count { float: right; color: #adb5bd; font-size: .78rem; }
.kb-sidebar .kb-node.active .kb-count { color: #dbe7ff; }
.kb-body { background: #fff; padding: 1.25rem 1.5rem; border-radius: .4rem; line-height: 1.6; }
.kb-body h2 { font-size: 1.4rem; margin-top: 1.4rem; }
.kb-body h3 { font-size: 1.2rem; margin-top: 1.2rem; }
.kb-body h4, .kb-body h5, .kb-body h6 { font-size: 1.05rem; margin-top: 1rem; }
.kb-body pre.kb-code { background: #f6f8fa; border: 1px solid #e1e4e8; padding: .75rem; border-radius: .3rem; font-size: .85rem; }
.kb-body code { background: #f1f3f5; padding: .05rem .3rem; border-radius: .2rem; font-size: .88em; color: #a61e4d; }
.kb-body pre code { background: transparent; padding: 0; color: inherit; }
.kb-body blockquote.kb-quote { border-left: 4px solid #ced4da; padding: .25rem 1rem; color: #555; background: #f8f9fa; }
.kb-body .kb-task { font-size: 1.1em; }
.kb-body .kb-task.done { color: #198754; }
.kb-card a { text-decoration: none; }
.kb-card .kb-sub { font-size: .82rem; color: #6c757d; }
.kb-meta { font-size: .82rem; color: #6c757d; }
.kb-editor textarea { min-height: 24rem; }
.code-input { font-family: SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: .85rem; }
/* SQL console */
.sql-results { max-height: 32rem; overflow: auto; background: #fff; }
.sql-results table { font-size: .8rem; }
.sql-results td { white-space: pre; max-width: 40rem; overflow: hidden; text-overflow: ellipsis; }
.sql-null { color: #adb5bd; font-style: italic; }
.sql-history td { font-size: .8rem; }
.sql-history .stmt { max-width: 34rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* KB files */
.kb-body img.kb-img { max-width: 100%; height: auto; border: 1px solid #dee2e6; border-radius: .25rem; margin: .25rem 0; }
.kb-body a.kb-img-link { display: inline-block; cursor: zoom-in; }
.kb-ftype { display: inline-block; min-width: 2.6rem; text-align: center; font-size: .68rem; font-weight: 700; padding: .15rem .3rem; border-radius: .2rem; color: #fff; background: #6c757d; }
.kb-ftype-pdf { background: #c92a2a; } .kb-ftype-doc { background: #1c64d0; } .kb-ftype-xls { background: #2b8a3e; }
.kb-ftype-ppt { background: #d9480f; } .kb-ftype-vsd { background: #5f3dc4; } .kb-ftype-img { background: #0c8599; }
.kb-ftype-zip { background: #868e96; } .kb-ftype-txt { background: #495057; } .kb-ftype-mail { background: #e67700; }
.kb-ftype-vid { background: #862e9c; }
.kb-body figure.kb-video { margin: .5rem 0 1rem; max-width: 960px; }
.kb-body video.kb-video-player { display: block; width: 100%; height: auto; max-height: 75vh; background: #000; border-radius: .25rem; }
.kb-fname { min-width: 12rem; word-break: break-word; }
.kb-thumb { display: inline-block; border: 1px solid #dee2e6; border-radius: .25rem; background: #fff; padding: 2px; }
.kb-thumb img { max-height: 120px; max-width: 200px; display: block; }
.kb-thumb-sm img { max-height: 48px; max-width: 80px; }
.kb-dropzone { border: 2px dashed #adb5bd; border-radius: .4rem; padding: 1rem; text-align: center; background: #f8f9fa; }
.kb-dropzone.kb-drop-active, textarea.kb-drop-active { border-color: #0d6efd; background: #e7f1ff; }
.kb-file-edit { min-width: 14rem; }

/* Hide empty validation summaries (MVC renders the div even when there are no errors) */
.validation-summary-valid { display: none !important; }

/* Discuss with Grok Bot */
.grokbot-thread { max-height: 420px; overflow-y: auto; margin-bottom: .5rem; }
.grokbot-msg { border-radius: .375rem; padding: .4rem .6rem; margin-bottom: .5rem; border: 1px solid #dee2e6; }
.grokbot-user { background: #f8f9fa; margin-left: 2rem; }
.grokbot-assistant { background: #eef4ff; border-color: #b6ccfe; margin-right: 2rem; }
.grokbot-body { white-space: pre-wrap; word-wrap: break-word; }

.click-row { cursor: pointer; }
tr.click-row > td > a,
a.plain-link,
a.vendor-name { text-decoration: none; color: inherit; }
a.vendor-name { font-weight: 700; }
a.th-sort { color: inherit; text-decoration: none; }
a.th-sort:hover { text-decoration: underline; }
.people-field { position: relative; }
.people-box { position: absolute; top: 100%; left: 0; z-index: 30; background: #fff; border: 1px solid #dee2e6; border-radius: .25rem; min-width: 16rem; max-width: 36rem; width: max-content; box-shadow: 0 .25rem .75rem rgba(0,0,0,.08); }
.people-box.lookup-box { position: fixed; top: auto; left: auto; z-index: 1080; max-height: 16rem; overflow-y: auto; width: auto; max-width: none; }
.people-box button { display: block; width: 100%; text-align: left; border: 0; background: #fff; padding: .35rem .6rem; white-space: normal; }
.people-box button:hover { background: #f8f9fa; }
.keep-breaks { white-space: pre-line; }
.confirm-box { margin-top: .35rem; }
.rail-save.saved { color: #198754; }
.fmt-bar { display: flex; gap: .35rem; align-items: center; border: 1px solid #dee2e6; border-bottom: 0; border-radius: .25rem .25rem 0 0; padding: .25rem .4rem; background: #fff; }
.fmt-bar button { border: 0; background: transparent; padding: .15rem .4rem; font-weight: 600; }
.fmt-bar + textarea.fmt { border-top-left-radius: 0; border-top-right-radius: 0; }
.drop-files { border: 1px dashed #adb5bd; border-radius: .25rem; padding: .6rem; text-align: center; color: #6c757d; }
.ticket-rail .active { font-weight: 600; }
.bucket-rail .list-group-item:not(.active):hover { background-color: rgba(0, 0, 0, .075); }

.lookup-table th, .lookup-table td { vertical-align: middle; }
.lookup-drag { width: 2.2rem; text-align: center; color: #6c757d; cursor: grab; user-select: none; }
.lookup-flag { width: 5.5rem; text-align: center; }
.lookup-actions { width: 16rem; }
.lookup-table tr.lookup-over { outline: 1px dashed #0d6efd; }
.itops-toast { position: fixed; right: 1rem; bottom: 1rem; z-index: 1080; max-width: 32rem; box-shadow: 0 .5rem 1rem rgba(0,0,0,.15); }
.itops-editor { margin-bottom: .5rem; max-width: 100%; }
.itops-editor .toastui-editor-defaultUI { border-radius: .25rem; max-width: 100%; }
.itops-scroll > main > .row:first-of-type { margin-top: 0; }
.note-card { border-left-width: 4px; background: #fff; }
.note-user-0 { border-left-color: #0d6efd; }
.note-user-1 { border-left-color: #198754; }
.note-user-2 { border-left-color: #6f42c1; }
.note-user-3 { border-left-color: #fd7e14; }
.note-user-4 { border-left-color: #d63384; }
.note-user-5 { border-left-color: #0dcaf0; }
.note-user-6 { border-left-color: #20c997; }
.note-user-7 { border-left-color: #6c757d; }
.note-status { border-style: dashed; background: #f8f9fa; color: #495057; }
body.hide-status-notes .note-status { display: none; }
@media (min-width: 992px) {
  .itops-scroll:has(.side-rail) { overflow: hidden; display: flex; flex-direction: column; }
  .itops-scroll:has(.side-rail) > main { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
  .itops-scroll:has(.side-rail) > main > *:not(.row) { flex: 0 0 auto; }
  .itops-scroll:has(.side-rail) > main > .row:has(> .side-rail) {
    flex: 1 1 0;
    min-height: 0;
    margin-top: 0;
    overflow: hidden;
    --bs-gutter-y: 0;
  }
  .itops-scroll:has(.side-rail) > main > .row:has(> .side-rail) > [class*="col"] {
    min-height: 0;
    height: 100%;
    max-height: 100%;
    overflow: auto;
    overscroll-behavior: contain;
  }
}
.bucket-rail .bucket-section { margin-top: .85rem; }
.bucket-rail .bucket-section:first-child { margin-top: 0; }
@media (max-width: 991.98px) {
  .table { display: block; overflow-x: auto; }
  .itops-editor, .toastui-editor-defaultUI { max-width: 100%; }
}
.gantt-row { display: grid; grid-template-columns: minmax(8rem, 16rem) 1fr; gap: .5rem; align-items: center; margin-bottom: .35rem; }
.gantt-label { font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gantt-track { position: relative; height: .7rem; background: #e9ecef; border-radius: .35rem; }
.gantt-bar { position: absolute; top: 0; bottom: 0; border-radius: .35rem; background: #0d6efd; z-index: 1; }
.gantt-bar.tone-done { background: #198754; }
.gantt-bar.tone-risk { background: #ffc107; }
.gantt-bar.tone-overdue { background: #dc3545; }
.gantt-today { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #212529; z-index: 2; pointer-events: none; }
.gantt-scale .gantt-track { height: 1rem; background: transparent; overflow: visible; }
.gantt-today-label { position: absolute; left: 4px; top: -0.15rem; font-size: .7rem; line-height: 1; white-space: nowrap; color: #212529; }
.board { display: flex; gap: .75rem; align-items: flex-start; overflow-x: auto; padding-bottom: .5rem; }
.board-col { flex: 0 0 16rem; background: #eef1f4; border-radius: .4rem; padding: .5rem; min-height: 8rem; }
.board-head { font-size: .82rem; font-weight: 600; margin-bottom: .4rem; }
.board-card { background: #fff; border-radius: .3rem; padding: .4rem .5rem; margin-bottom: .4rem; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.board-card a { text-decoration: none; }
.board-col.board-over { outline: 1px dashed #0d6efd; }
@media (min-width: 992px) {
  .itops-scroll:has(.side-rail) > main > .row:has(> .side-rail) > [class*="col"]:has(> .board-fit) {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .itops-scroll:has(.side-rail) > main > .row:has(> .side-rail) > [class*="col"]:has(> .board-fit) > .nav { flex: 0 0 auto; }
  .board-fit {
    flex: 1 1 auto;
    min-height: 0;
    align-items: stretch;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .board-fit .board-col {
    display: flex;
    flex-direction: column;
    max-height: 100%;
    min-height: 0;
  }
  .board-fit .board-cards { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
}
.itops-editor-full {
  position: fixed;
  z-index: 1020;
  left: .75rem;
  right: .75rem;
  top: calc(var(--itops-nav-h, 58px) + .75rem);
  bottom: calc(var(--itops-foot-h, 36px) + .35rem);
  background: #fff;
  box-shadow: 0 8px 28px rgba(0,0,0,.18);
  display: flex;
  flex-direction: column;
}
.itops-editor-full .toastui-editor-defaultUI { height: 100% !important; flex: 1 1 auto; }
.itops-editor .itops-editor-expand {
  flex: 0 0 auto;
  width: auto;
  height: 28px;
  margin: 8px 0 0 auto;
  padding: 0 .7rem;
  border: 1px solid #c5cad3;
  border-radius: 3px;
  background: #fff;
  color: #212529;
  font-size: 12px;
  line-height: 26px;
  white-space: nowrap;
  cursor: pointer;
}
.proj-group { margin-top: 1.1rem; }
.proj-group-head { display: flex; justify-content: space-between; align-items: flex-end; gap: .75rem; }
.proj-meter { height: .35rem; background: #e9ecef; border-radius: .2rem; overflow: hidden; }
.proj-meter span { display: block; height: 100%; background: #198754; }
.proj-ticket { display: flex; gap: .65rem; align-items: flex-start; background: #fff; border: 1px solid #e6e8eb; border-left-width: 4px; border-radius: .4rem; padding: .55rem .7rem; margin-bottom: .45rem; }
.proj-ticket.overdue { border-left-color: #dc3545; }
.proj-ticket.soon { border-left-color: #ffc107; }
.proj-ticket.closed { border-left-color: #198754; opacity: .8; }
.proj-ticket .grip { color: #adb5bd; cursor: grab; user-select: none; line-height: 1.4; }
.proj-ticket-main { flex: 1; min-width: 0; }
.proj-ticket .title { font-weight: 600; text-decoration: none; }
.proj-ticket .meta { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-top: .25rem; color: #6c757d; font-size: .82rem; }
.proj-ticket .chip { background: #f1f3f5; color: #495057; border-radius: 1rem; padding: .05rem .45rem; }
.proj-ticket-act { flex: 0 0 auto; }
