/* OCT HQ: small additions on top of the original NexLink stylesheet (no colour overrides: the template palette is used as-is). */
.cursor-pointer { cursor: pointer; }
.min-w-0 { min-width: 0; }
.text-truncate-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.num { font-variant-numeric: tabular-nums; }

/* OCT mark in the icon rail (the template uses a round logo here) */
.oct-brand-mark { width: 40px; height: 40px; object-fit: contain; }
[data-bs-theme=dark] .oct-brand-mark { filter: brightness(0) invert(1); }

/* initials avatars sit on the template .avatar sizes */
.avatar { font-weight: 600; }
.avatar.avatar-xxs { font-size: .55rem; }
.avatar.avatar-xs { font-size: .65rem; }

/* DataTables: clickable rows */
table.dataTable tbody tr.cursor-pointer:hover > * { background-color: rgba(var(--bs-primary-rgb), .03); }
table.dataTable td { vertical-align: middle; }

/* bulk actions bar for selected table rows */
.bulk-bar { display: none; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .6rem 1rem; border-radius: var(--bs-border-radius-lg); background: rgba(var(--bs-primary-rgb), .06); margin: 0 1rem .75rem; }
.bulk-bar.show { display: flex; }

/* kanban boards (pipeline + task board) built from NexLink cards */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 1.25rem; overflow-x: auto; padding-bottom: .75rem; align-items: start; }
.kanban-list { display: flex; flex-direction: column; gap: .75rem; min-height: 80px; }
.kanban-list > .card { margin-bottom: 0; cursor: grab; }
.kanban-ghost { opacity: .4; }
.kanban-chosen { box-shadow: 0 12px 28px rgba(16, 12, 60, .16); }

/* offcanvas drawer */
.offcanvas.oct-drawer { width: min(560px, 100vw); }
.dl-grid { display: grid; grid-template-columns: 130px 1fr; gap: .55rem 1rem; font-size: .86rem; }
.dl-grid dt { color: var(--bs-secondary-color); font-weight: 500; }
.dl-grid dd { margin: 0; word-break: break-word; }
.pitch-box { background: var(--bs-tertiary-bg); border-radius: var(--bs-border-radius-lg); padding: .8rem .9rem; font-size: .85rem; white-space: pre-wrap; }

/* invoice editor */
.inv-items td { vertical-align: top; }
.inv-totals { max-width: 340px; margin-left: auto; }
.inv-totals .row-line { display: flex; justify-content: space-between; padding: .3rem 0; }
.inv-totals .grand { font-size: 1.15rem; font-weight: 700; border-top: 1px solid var(--bs-border-color); padding-top: .6rem; margin-top: .3rem; }

/* calendar month grid */
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--bs-border-color); border-left: 1px solid var(--bs-border-color); }
.cal-dow { padding: .6rem; font-size: .8rem; color: var(--bs-heading-color); font-weight: 600; border-right: 1px solid var(--bs-border-color); border-bottom: 1px solid var(--bs-border-color); text-align: center; }
.cal-cell { min-height: 120px; padding: .45rem; border-right: 1px solid var(--bs-border-color); border-bottom: 1px solid var(--bs-border-color); cursor: pointer; min-width: 0; }
.cal-cell:hover { background: rgba(var(--bs-primary-rgb), .03); }
.cal-cell.other { opacity: .45; }
.cal-day { font-size: .8rem; font-weight: 600; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.cal-cell.today .cal-day { background: var(--bs-primary); color: #fff; }
.cal-item { display: block; font-size: .72rem; padding: .15rem .45rem; border-radius: 6px; margin-top: .25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; cursor: pointer; }
.cal-more { font-size: .72rem; color: var(--bs-secondary-color); margin-top: .2rem; }

/* Ask OCT chat */
.chat-msg { max-width: 860px; margin: 0 auto 1.25rem; display: flex; gap: .75rem; }
.chat-msg .bubble { padding: .85rem 1.05rem; border-radius: 16px; line-height: 1.6; min-width: 0; overflow-x: auto; }
.chat-msg.user { flex-direction: row-reverse; }
.chat-msg.user .bubble { background: var(--bs-primary); color: #fff; border-top-right-radius: 4px; }
.chat-msg.bot .bubble { background: var(--bs-light); border-top-left-radius: 4px; }
.chat-msg .bubble table { font-size: .85rem; margin: .5rem 0; }
.chat-msg .bubble table td, .chat-msg .bubble table th { padding: .3rem .6rem; border-bottom: 1px solid var(--bs-border-color); }
.chat-msg .bubble p:last-child { margin-bottom: 0; }
.typing span { display: inline-block; width: 6px; height: 6px; margin: 0 2px; background: var(--bs-secondary-color); border-radius: 50%; animation: blink 1.2s infinite both; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }

/* toasts */
.oct-toasts { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 2000; display: flex; flex-direction: column; gap: .5rem; }
.oct-toast { min-width: 260px; max-width: 380px; padding: .75rem 1rem; border-radius: var(--bs-border-radius-lg); color: #fff; font-size: .875rem; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); display: flex; gap: .6rem; align-items: flex-start; animation: toastIn .25s ease; }
.oct-toast.success { background: var(--bs-success); } .oct-toast.error { background: var(--bs-danger); } .oct-toast.info { background: var(--bs-primary); }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* skeleton placeholders */
.skeleton { background: linear-gradient(90deg, var(--bs-light) 25%, var(--bs-border-color) 50%, var(--bs-light) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 6px; height: 12px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* login (uses the NexLink auth-cover look) */
.login-brand-mark { width: 44px; height: 44px; object-fit: contain; }

@media print {
  .app-header, .app-menubar-tabs, .footer-wrapper, .no-print, .oct-toasts { display: none !important; }
  .app-wrapper { margin: 0 !important; padding: 0 !important; }
}

/* long filter lists scroll inside their dropdown */
[data-filter] .dropdown-menu { max-height: 340px; overflow-y: auto; }

/* FullCalendar on the NexLink palette */
.fc .fc-daygrid-dot-event .fc-event-title, .fc .fc-daygrid-dot-event .fc-event-time { color: var(--bs-heading-color); }
.fc .fc-event { padding: 1px 4px; border-radius: 6px; }
.fc .fc-button-primary { background: var(--bs-primary); border-color: var(--bs-primary); }
.fc .fc-button-primary:not(:disabled).fc-button-active, .fc .fc-button-primary:not(:disabled):active { background: rgba(var(--bs-primary-rgb), .85); border-color: transparent; }
.fc .fc-day-today { background: rgba(var(--bs-primary-rgb), .05) !important; }
