/* WOW Дашборд: Tabler with the colours and the font of wow-yalynka.ua */
@font-face { font-family: "Formular"; src: url("/fonts/Formular-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Formular"; src: url("/fonts/Formular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Formular"; src: url("/fonts/Formular-Medium.woff2") format("woff2"); font-weight: 500 600; font-display: swap; }
@font-face { font-family: "Formular"; src: url("/fonts/Formular-Bold.woff2") format("woff2"); font-weight: 700 800; font-display: swap; }

:root, [data-bs-theme="light"] {
	--wow-green: #015046;
	--wow-green-2: #02675a;
	--wow-yellow: #F9B233;
	--wow-ink: #141414;
	--wow-grey: #646464;
	--wow-bg: #F7F8FB;
	--wow-line: #EAEDF7;
	--tblr-primary: #015046;
	--tblr-primary-rgb: 1, 80, 70;
	--tblr-primary-text: #015046;
	--tblr-primary-lt: #e6f0ee;
	--tblr-font-sans-serif: "Formular", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--tblr-body-color: #141414;
	--tblr-body-bg: #F7F8FB;
	--tblr-border-color: #EAEDF7;
	--tblr-link-color: #015046;
	--tblr-link-color-rgb: 1, 80, 70;
	--tblr-border-radius: 10px;
}
body { font-family: var(--tblr-font-sans-serif); background: var(--wow-bg); color: var(--wow-ink); }
.btn-primary { --tblr-btn-bg: var(--wow-green); --tblr-btn-border-color: var(--wow-green); --tblr-btn-hover-bg: var(--wow-green-2); --tblr-btn-hover-border-color: var(--wow-green-2); --tblr-btn-active-bg: var(--wow-green-2); }
.btn-accent { background: var(--wow-yellow); border-color: var(--wow-yellow); color: var(--wow-ink); font-weight: 500; }
.btn-accent:hover { background: #f3a512; border-color: #f3a512; color: var(--wow-ink); }

/* the menu on the left: the green of the site, the yellow of the active item */
.navbar-vertical.navbar-wow { background: var(--wow-green) !important; }
.navbar-wow .navbar-brand { color: #fff; font-weight: 700; letter-spacing: .3px; }
.navbar-wow .navbar-brand .dot { color: var(--wow-yellow); }
.navbar-wow .nav-link { color: rgba(255, 255, 255, .78) !important; border-radius: 8px; margin: 1px 8px; padding: .45rem .75rem !important; }
.navbar-wow .nav-link:hover { background: rgba(255, 255, 255, .08); color: #fff !important; }
.navbar-wow .nav-link.active { background: var(--wow-yellow); color: var(--wow-ink) !important; font-weight: 500; }
.navbar-wow .nav-link.active .nav-link-icon { color: var(--wow-ink) !important; }
.navbar-wow .nav-link-icon { color: rgba(255, 255, 255, .6) !important; }
.navbar-wow .menu-title { color: rgba(255, 255, 255, .45); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; padding: 1rem 1.25rem .35rem; }
.navbar-wow .navbar-toggler { filter: invert(1); }
.navbar-wow .count { margin-left: auto; font-size: .7rem; opacity: .6; }

.page-header .page-title { font-weight: 600; }
.card { border-color: var(--wow-line); box-shadow: 0 1px 2px rgba(20, 20, 20, .03); }
.kpi .subheader { color: var(--wow-grey); }
.kpi .h1 { font-weight: 600; }
.kpi .kpi-icon { width: 2.6rem; height: 2.6rem; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.35rem; }
.kpi-green { background: #e6f0ee; color: var(--wow-green); }
.kpi-yellow { background: #fef3dc; color: #b97a06; }

/* tables: dense, a row opens the card */
.table-wow { font-size: .86rem; }
.table-wow thead th { position: sticky; top: 0; background: #fff; z-index: 1; font-size: .68rem; cursor: pointer; white-space: nowrap; user-select: none; }
.table-wow thead th .sorted { color: var(--wow-yellow); }
.table-wow tbody tr { cursor: pointer; }
.table-wow tbody tr:hover { background: #f2f6f5; }
.table-wow td { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.table-scroll { overflow: auto; max-height: calc(100vh - 290px); }
.status-badge { border-radius: 6px; padding: .2rem .5rem; font-size: .74rem; font-weight: 500; white-space: nowrap; }
.muted { color: var(--wow-grey); }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* the card on the right */
.offcanvas.card-panel { width: min(760px, 100vw) !important; }
.card-panel .offcanvas-header { background: var(--wow-green); color: #fff; }
.card-panel .offcanvas-header .btn-close { filter: invert(1); }
.kv { display: grid; grid-template-columns: minmax(130px, 38%) 1fr; gap: .35rem 1rem; font-size: .88rem; }
.kv .k { color: var(--wow-grey); }
.kv .v { word-break: break-word; }
.section-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--wow-grey); margin: 1.4rem 0 .5rem; font-weight: 600; }
.history { font-size: .82rem; }
.history .when { color: var(--wow-grey); white-space: nowrap; }

/* the board and the calendar */
.kanban { display: flex; gap: .75rem; overflow-x: auto; padding-bottom: 1rem; }
.kanban-col { flex: 0 0 280px; background: #eef1f6; border-radius: 12px; padding: .6rem; max-height: calc(100vh - 260px); overflow-y: auto; }
.kanban-col h4 { font-size: .8rem; display: flex; justify-content: space-between; margin: .2rem .3rem .6rem; }
.kanban-card { background: #fff; border-radius: 10px; padding: .6rem .7rem; margin-bottom: .5rem; font-size: .82rem; cursor: pointer; border: 1px solid var(--wow-line); }
.kanban-card:hover { border-color: var(--wow-green); }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--wow-line); border-radius: 12px; overflow: hidden; }
.cal .dow { background: #fff; text-align: center; font-size: .72rem; color: var(--wow-grey); padding: .4rem; text-transform: uppercase; }
.cal .day { background: #fff; min-height: 118px; padding: .35rem; font-size: .76rem; }
.cal .day.other { background: #fafbfd; color: #b5b9c3; }
.cal .day.today .num { background: var(--wow-yellow); color: var(--wow-ink); border-radius: 50%; width: 1.6rem; height: 1.6rem; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }
.cal .ev { display: block; background: #e6f0ee; color: var(--wow-green); border-radius: 5px; padding: .1rem .35rem; margin-top: .2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.cal .ev.np { background: #fdecef; color: #b4233c; }
.cal .more { color: var(--wow-grey); cursor: pointer; margin-top: .2rem; display: block; }

/* the search of everything (Ctrl+K) */
.spotlight .modal-dialog { max-width: 640px; margin-top: 10vh; }
.spotlight input { font-size: 1.1rem; border: 0; box-shadow: none !important; }
.spotlight .res { max-height: 60vh; overflow-y: auto; }
.spotlight .res a { display: block; padding: .5rem 1rem; color: inherit; text-decoration: none; border-radius: 8px; }
.spotlight .res a:hover, .spotlight .res a.sel { background: #e6f0ee; }
kbd.k { background: #fff; color: var(--wow-grey); border: 1px solid var(--wow-line); font-size: .7rem; }

/* the sign-in */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #015046 0%, #02675a 60%, #037565 100%); }
.login-card { width: min(420px, 92vw); border-radius: 16px; }
.login-card .brand { font-size: 1.5rem; font-weight: 700; color: var(--wow-green); }
.login-card .brand span { color: var(--wow-yellow); }

@media (max-width: 991px) {
	.table-scroll { max-height: none; }
	.cal .day { min-height: 80px; }
	.kanban-col { flex-basis: 82vw; }
}
