/* Drawn Konstrukt shared styles: base type, third-party widget theming, and a small
   compatibility layer for pages still written with Bootstrap class names. */

:root {
    --dk-blue: #1d6db3;
    --dk-blue-dark: #195792;
    --dk-green: #279536;
    --dk-lime: #e3ea24;
    --dk-ink: #111827;
    --dk-border: #e5e7eb;
    --dk-muted: #6b7280;
}

html { scroll-behavior: smooth; }
body { font-family: 'Inter', ui-sans-serif, system-ui, sans-serif; color: #1f2937; -webkit-font-smoothing: antialiased; }
h1, h2, h3, .font-display { font-family: 'Montserrat', 'Inter', sans-serif; letter-spacing: -0.01em; }
[x-cloak] { display: none !important; }
::selection { background: rgba(29, 109, 179, .18); }

/* ---------- Bootstrap compatibility ---------- */
.container { width: 100%; max-width: 1280px; margin-inline: auto; }
.row { display: flex; flex-wrap: wrap; margin-inline: -.75rem; row-gap: 1rem; }
.row > * { padding-inline: .75rem; width: 100%; }
.col { flex: 1 0 0%; }
@media (min-width: 576px) { .col-sm-6 { width: 50%; } .col-sm-12 { width: 100%; } }
@media (min-width: 768px) {
    .col-md-3 { width: 25%; } .col-md-4 { width: 33.333%; } .col-md-6 { width: 50%; } .col-md-8 { width: 66.666%; }
    .col-md-10 { width: 83.333%; } .col-md-12 { width: 100%; }
}
@media (min-width: 992px) { .col-lg-6 { width: 50%; } .col-lg-12 { width: 100%; } }
@media (min-width: 1200px) { .col-xl-5 { width: 41.666%; } .col-xl-11 { width: 91.666%; } }
.d-flex { display: flex; } .align-items-center { align-items: center; }
.justify-content-center { justify-content: center; } .justify-content-end { justify-content: flex-end; } .justify-content-between { justify-content: space-between; }
.float-end, .float-right { float: right; } .text-end { text-align: right; } .w-100 { width: 100%; }
.text-muted { color: var(--dk-muted); } .text-danger { color: #dc2626; } .text-success { color: #16a34a; }

.card { background: #fff; border: 1px solid var(--dk-border); border-radius: .75rem; box-shadow: 0 1px 2px rgba(16,24,40,.04); overflow: hidden; }
.card-header, .card-head { padding: 1rem 1.25rem; border-bottom: 1px solid var(--dk-border); background: #f9fafb; }
.card-header h1, .card-header h2, .card-header h3, .card-header h4, .card-head h4 { font-size: 1rem; font-weight: 600; color: var(--dk-ink); margin: 0; }
.card-body { padding: 1.25rem; }
.card-title { font-weight: 600; color: var(--dk-ink); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .5rem 1rem; font-size: .875rem; font-weight: 500;
       line-height: 1.25rem; border-radius: .5rem; border: 1px solid transparent; transition: background-color .15s, border-color .15s, color .15s; cursor: pointer; white-space: nowrap; }
.btn-sm { padding: .3rem .65rem; font-size: .8rem; }
.btn-primary, .btn-info { background: var(--dk-blue); color: #fff; }
.btn-primary:hover, .btn-info:hover { background: var(--dk-blue-dark); }
.btn-success { background: var(--dk-green); color: #fff; }
.btn-danger { background: #dc2626; color: #fff; } .btn-danger:hover { background: #b91c1c; }
.btn-secondary, .btn-default, .btn-white { background: #fff; color: #374151; border-color: #d1d5db; }
.btn-secondary:hover, .btn-default:hover, .btn-white:hover { background: #f9fafb; }
.btn-outline-primary { color: var(--dk-blue); border-color: #aed4f4; background: #fff; } .btn-outline-primary:hover { background: #eef6fd; }
.btn-outline-danger { color: #dc2626; border-color: #fecaca; background: #fff; } .btn-outline-danger:hover { background: #fef2f2; }

.form-group { margin-bottom: 1rem; }
.form-label, .form-group > label { display: block; font-size: .875rem; font-weight: 500; color: #374151; margin-bottom: .375rem; }
.form-control, .form-select { display: block; width: 100%; padding: .55rem .75rem; font-size: .875rem; color: var(--dk-ink); background: #fff;
                              border: 1px solid #d1d5db; border-radius: .5rem; transition: border-color .15s, box-shadow .15s; }
.form-control:focus, .form-select:focus { outline: none; border-color: var(--dk-blue); box-shadow: 0 0 0 3px rgba(29,109,179,.15); }

.table-responsive { overflow-x: auto; }
.table { width: 100%; font-size: .875rem; border-collapse: collapse; }
.table th { text-align: left; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--dk-muted); background: #f9fafb; }
.table th, .table td { padding: .75rem 1rem; border-bottom: 1px solid var(--dk-border); vertical-align: middle; }
.table-bordered th, .table-bordered td { border: 1px solid var(--dk-border); }
.table-striped tbody tr:nth-child(odd) { background: #fcfcfd; }
.table-hover tbody tr:hover { background: #f5f9fd; }

.alert { padding: .875rem 1rem; border-radius: .5rem; border: 1px solid; font-size: .875rem; margin-bottom: 1rem; }
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert-danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.badge { display: inline-flex; padding: .125rem .5rem; font-size: .75rem; font-weight: 500; border-radius: 9999px; background: #f3f4f6; color: #374151; }

/* Bootstrap-style pagination (used by a few explicit ->links('pagination::bootstrap-*') calls) */
.pagination { display: flex; flex-wrap: wrap; gap: .25rem; list-style: none; padding: 0; margin: 1rem 0 0; }
.pagination .page-link { display: inline-flex; min-width: 2.25rem; height: 2.25rem; align-items: center; justify-content: center; padding: 0 .65rem;
                          font-size: .875rem; border: 1px solid var(--dk-border); border-radius: .5rem; color: #374151; background: #fff; }
.pagination .active .page-link { background: var(--dk-blue); border-color: var(--dk-blue); color: #fff; }
.pagination .disabled .page-link { color: #9ca3af; }

/* ---------- DataTables ---------- */
.dataTables_wrapper { font-size: .875rem; color: #374151; }
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input { border: 1px solid #d1d5db; border-radius: .5rem; padding: .4rem .65rem; margin-left: .4rem; background: #fff; }
.dataTables_wrapper .dataTables_filter input:focus { outline: none; border-color: var(--dk-blue); box-shadow: 0 0 0 3px rgba(29,109,179,.15); }
table.dataTable thead th { border-bottom: 1px solid var(--dk-border) !important; }
table.dataTable.no-footer { border-bottom: 1px solid var(--dk-border) !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button { border-radius: .5rem !important; border: 1px solid transparent !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover { background: var(--dk-blue) !important; border-color: var(--dk-blue) !important; color: #fff !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button:hover { background: #eef6fd !important; color: var(--dk-blue) !important; border-color: #d6eafa !important; }

/* ---------- Toastr ---------- */
#toast-container > div { border-radius: .6rem; box-shadow: 0 10px 25px -10px rgba(0,0,0,.35); opacity: 1; font-size: .875rem; }
#toast-container > .toast-success { background-color: #16a34a; }
#toast-container > .toast-error { background-color: #dc2626; }
#toast-container > .toast-info { background-color: var(--dk-blue); }
#toast-container > .toast-warning { background-color: #d97706; }

/* ---------- Portal shell ---------- */
.dk-sidebar::-webkit-scrollbar { width: 6px; }
.dk-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 3px; }
.dk-nav-link { position: relative; display: flex; align-items: center; gap: .75rem; padding: .55rem .75rem; border-radius: .5rem; font-size: .875rem;
               color: #cbd5e1; transition: background-color .15s, color .15s; }
.dk-nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.dk-nav-link i { width: 1.1rem; text-align: center; color: #64748b; transition: color .15s; }
.dk-nav-link:hover i { color: #cbd5e1; }
.dk-nav-link.is-active { background: rgba(255,255,255,.08); color: #fff; font-weight: 500; }
.dk-nav-link.is-active i { color: var(--dk-lime); }
.dk-nav-link.is-active::before { content: ''; position: absolute; left: -.75rem; top: .45rem; bottom: .45rem; width: 3px; border-radius: 0 3px 3px 0; background: var(--dk-lime); }
.dk-nav-count { margin-left: auto; min-width: 1.4rem; padding: 0 .4rem; font-size: .7rem; line-height: 1.25rem; text-align: center; border-radius: 9999px;
                background: rgba(255,255,255,.08); color: #cbd5e1; font-weight: 600; }
.dk-nav-count.is-alert { background: var(--dk-lime); color: var(--dk-ink); }

/* ---------- Public site ---------- */
.dk-brand-bar { background: linear-gradient(90deg, #3cc84a 0%, #4a9fe0 100%); }
.dk-hero-overlay { background: linear-gradient(100deg, rgba(11,17,32,.92) 0%, rgba(11,17,32,.72) 45%, rgba(11,17,32,.25) 100%); }
.dk-eyebrow { display: inline-flex; align-items: center; gap: .6rem; font-size: .75rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--dk-blue); }
.dk-eyebrow::before { content: ''; width: 1.75rem; height: 2px; background: var(--dk-lime); }
.dk-eyebrow.on-dark { color: var(--dk-lime); }
.dk-reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.dk-reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .dk-reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }
.prose-dk p { margin-bottom: 1rem; line-height: 1.75; color: #374151; }
.prose-dk h2, .prose-dk h3 { font-weight: 700; color: var(--dk-ink); margin: 1.75rem 0 .75rem; }
.prose-dk h2 { font-size: 1.5rem; } .prose-dk h3 { font-size: 1.2rem; }
.prose-dk ul { list-style: disc; padding-left: 1.25rem; margin-bottom: 1rem; } .prose-dk ol { list-style: decimal; padding-left: 1.25rem; margin-bottom: 1rem; }
.prose-dk li { margin-bottom: .35rem; color: #374151; }
.prose-dk a { color: var(--dk-blue); text-decoration: underline; }
.prose-dk img { border-radius: .75rem; margin: 1.25rem 0; }
.prose-dk blockquote { border-left: 3px solid var(--dk-lime); padding-left: 1rem; color: #4b5563; font-style: italic; margin: 1.25rem 0; }
.badge-primary { background: #d6eafa; color: #195792; } .badge-info { background: #e0f2fe; color: #0369a1; }
.badge-success { background: #dcfce7; color: #166534; } .badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; } .badge-dark { background: #1f2937; color: #fff; } .badge-secondary { background: #f1f5f9; color: #475569; }
