/* Diewolk UI — small Bootstrap replacement for components used by this site.
   Keep this file intentionally limited to the project's actual markup. */
:root {
  --ui-border: var(--border, #ced4da);
  --ui-surface: var(--card, #fff);
  --ui-text: var(--text, #212529);
  --ui-muted: var(--text-muted, #6c757d);
  --ui-primary: var(--btn-main, #5865f2);
  --ui-danger: var(--btn-danger, #b33);
  --ui-radius: .375rem;
}
*, *::before, *::after { box-sizing: border-box; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* Layout */
.container, .container-fluid { width: 100%; margin-inline: auto; padding-inline: 12px; }
.container { max-width: 1140px; }
.row { display: flex; flex-wrap: wrap; margin-inline: -6px; }
.row > [class*="col-"], .row > .col, .row > .col-auto { padding-inline: 6px; min-width: 0; }
.col { flex: 1 0 0%; }
.col-auto { flex: 0 0 auto; width: auto; }
.col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-sm-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-sm-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-md-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-md-3 { flex: 0 0 25%; max-width: 25%; }
.col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-md-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; }
.col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-lg-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-lg-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.d-flex { display: flex !important; }
.d-inline { display: inline !important; }
.d-block { display: block !important; }
.d-grid { display: grid !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-grow-1 { flex-grow: 1 !important; }
.justify-content-between { justify-content: space-between !important; }
.align-items-center { align-items: center !important; }
.align-items-start { align-items: flex-start !important; }
.align-items-end { align-items: flex-end !important; }
.gap-2 { gap: .5rem !important; }
.gap-3 { gap: 1rem !important; }
.g-2 { gap: .5rem !important; }
.g-3 { gap: 1rem !important; }
.text-center { text-align: center !important; }
.text-lg-start, .text-md-start { text-align: left !important; }
.text-uppercase { text-transform: uppercase !important; }
.text-reset { color: inherit !important; }
.text-decoration-none { text-decoration: none !important; }
.text-muted, .text-secondary { color: var(--ui-muted) !important; }
.small { font-size: .875em !important; }
.fs-5 { font-size: 1.25rem !important; }
.h3 { font-size: 1.75rem; font-weight: 500; }
.h5 { font-size: 1.25rem; font-weight: 500; }
.fw-bold { font-weight: 700 !important; }
.fw-semibold { font-weight: 600 !important; }
.m-0 { margin: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: .25rem !important; }
.mb-2 { margin-bottom: .5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mt-1 { margin-top: .25rem !important; }
.mt-2 { margin-top: .5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.me-1 { margin-right: .25rem !important; }
.me-3 { margin-right: 1rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.py-2 { padding-block: .5rem !important; }
.py-3 { padding-block: 1rem !important; }
.pt-3 { padding-top: 1rem !important; }
.border { border: 1px solid var(--ui-border) !important; }
.rounded { border-radius: var(--ui-radius) !important; }
.rounded-pill { border-radius: 50rem !important; }
.text-lg-start { text-align: left; }

/* Navigation */
.navbar { display: flex; align-items: center; flex-wrap: wrap; padding: .5rem 0; }
.navbar > .container-fluid { display: flex; align-items: center; flex-wrap: inherit; }
.navbar-brand { display: inline-flex; align-items: center; padding-block: .3125rem; margin-right: 1rem; text-decoration: none; white-space: nowrap; }
.navbar-nav { display: flex; flex-direction: row; align-items: center; list-style: none; padding: 0; margin: 0; }
.nav-item { position: relative; }
.nav-link { display: block; padding: .5rem .65rem; color: inherit; text-decoration: none; background: transparent; border: 0; }
.nav-link:hover, .dropdown-item:hover { background: var(--hover--link--color, #e9ecef); }
.navbar-toggler { display: none; padding: .25rem .75rem; border: 1px solid var(--ui-border); border-radius: .375rem; background: transparent; color: inherit; }
.navbar-toggler-icon { display: inline-block; width: 1.5em; height: 1.5em; background-image: var(--navbar-toggle-icon); background-repeat: no-repeat; background-position: center; background-size: 100%; }
.navbar-collapse { flex-basis: 100%; flex-grow: 1; align-items: center; }
.collapse:not(.show) { display: none !important; }
.dropdown { position: relative; }
.dropdown-toggle::after { display: inline-block; margin-left: .35em; vertical-align: .15em; content: ""; border-top: .3em solid currentColor; border-right: .3em solid transparent; border-left: .3em solid transparent; }
.dropdown-menu { position: absolute; z-index: 1050; top: 100%; left: 0; display: none; min-width: 10rem; padding: .5rem 0; margin: .125rem 0 0; list-style: none; color: var(--ui-text); text-align: left; background: var(--ui-surface); border: 1px solid var(--ui-border); border-radius: .375rem; box-shadow: 0 .5rem 1rem rgba(0,0,0,.12); }
.dropdown-menu.show { display: block; }
.dropdown-menu-end { right: 0; left: auto; }
.dropdown-item { display: block; width: 100%; padding: .35rem 1rem; color: inherit; text-decoration: none; white-space: nowrap; background: transparent; border: 0; text-align: inherit; }
.dropdown-menu-dark { color: #dee2e6; background: #343a40; border-color: rgba(255,255,255,.15); }
.dropdown-menu-dark .dropdown-item:hover { color: #fff; background: #495057; }
.navbar .dropdown-menu { margin-top: .25rem; }
.badge { display: inline-block; padding: .35em .65em; font-size: .75em; font-weight: 700; line-height: 1; color: #fff; text-align: center; white-space: nowrap; vertical-align: baseline; border-radius: .375rem; }
.text-bg-danger { background: #dc3545; color: #fff; }
.text-bg-secondary { background: #68717d; color: #fff; }

/* Buttons and form controls */
.btn { display: inline-block; padding: .375rem .75rem; border: 1px solid transparent; border-radius: .375rem; font-weight: 400; line-height: 1.5; text-align: center; text-decoration: none; vertical-align: middle; background: transparent; color: var(--ui-text); transition: background-color .15s, border-color .15s, box-shadow .15s; }
.btn:hover { filter: brightness(.96); }
.btn:disabled, .btn[disabled] { opacity: .65; cursor: not-allowed; }
.btn-primary { color: #fff !important; background: var(--ui-primary); border-color: var(--ui-primary); }
.btn-secondary { color: #fff !important; background: #6c757d; border-color: #6c757d; }
.btn-danger { color: #fff !important; background: var(--ui-danger); border-color: var(--ui-danger); }
.btn-outline-primary { color: var(--ui-primary); border-color: var(--ui-primary); }
.btn-outline-primary:hover { color: #fff; background: var(--ui-primary); }
.btn-outline-secondary { color: var(--ui-text); border-color: var(--ui-border); }
.btn-outline-secondary:hover { background: var(--hover--link--color); }
.btn-outline-danger { color: var(--ui-danger); border-color: var(--ui-danger); }
.btn-outline-success { color: #198754; border-color: #198754; }
.btn-link { color: var(--ui-primary); text-decoration: underline; border: 0; background: transparent; }
.btn-sm { padding: .25rem .5rem; font-size: .875rem; border-radius: .25rem; }
.btn-second { color: var(--ui-text); background: var(--ui-surface); border: 1px solid var(--ui-border); }
.form-label, .col-form-label { display: inline-block; margin-bottom: .5rem; }
.col-form-label { padding-top: calc(.375rem + 1px); padding-bottom: calc(.375rem + 1px); }
.form-control, .form-select { display: block; width: 100%; padding: .375rem .75rem; font-size: 1rem; font-weight: 400; line-height: 1.5; color: var(--input-text, #212529); background-color: var(--input-bg, #fff); border: 1px solid var(--ui-border); border-radius: .375rem; }
.form-control:focus, .form-select:focus, input:focus, textarea:focus, select:focus { outline: 0; border-color: #86b7fe !important; box-shadow: 0 0 0 .2rem rgba(13,110,253,.18); }
.form-control::placeholder { color: #6c757d; opacity: .75; }
.form-select { padding-right: 2rem; }
.form-text { display: block; margin-top: .25rem; font-size: .875em; color: var(--ui-muted); }
.form-check { display: flex; align-items: center; gap: .4rem; min-height: 1.5rem; }
.form-check-input { width: 1em; height: 1em; margin: 0; accent-color: var(--ui-primary); }
.form-check-label { display: inline-block; }
.form-group { margin-bottom: 1rem; }
.form-inline { display: flex; flex-flow: row wrap; align-items: center; gap: .5rem; }

/* Cards, alerts, tables */
.card { position: relative; display: flex; flex-direction: column; min-width: 0; overflow-wrap: break-word; background: var(--ui-surface); border: 1px solid var(--ui-border); border-radius: .375rem; }
.card-body { flex: 1 1 auto; padding: 1rem; }
.card-title { margin: 0 0 .5rem; }
.card-subtitle { margin-top: -.25rem; margin-bottom: .5rem; }
.card-text:last-child { margin-bottom: 0; }
.alert { position: relative; padding: .75rem 1rem; margin-bottom: 1rem; border: 1px solid transparent; border-radius: .375rem; }
.alert-danger { color: #842029; background: #f8d7da; border-color: #f5c2c7; }
.alert-success { color: #0f5132; background: #d1e7dd; border-color: #badbcc; }
.alert-warning { color: #664d03; background: #fff3cd; border-color: #ffecb5; }
.alert-info { color: #055160; background: #cff4fc; border-color: #b6effb; }
:root[data-theme="dark"] .alert-danger { color: #ffc1c7; background: #48272b; border-color: #753c43; }
:root[data-theme="dark"] .alert-success { color: #b7f0d2; background: #183d30; border-color: #28634b; }
:root[data-theme="dark"] .alert-warning { color: #ffe69c; background: #493d1c; border-color: #75602a; }
:root[data-theme="dark"] .alert-info { color: #9eeaf9; background: #123b43; border-color: #22616d; }
.table { width: 100%; margin-bottom: 1rem; color: var(--ui-text); border-collapse: collapse; vertical-align: top; }
.table th, .table td { padding: .5rem; border-bottom: 1px solid var(--ui-border); text-align: inherit; }
.table-bordered th, .table-bordered td { border: 1px solid var(--ui-border); }
.table-striped tbody tr:nth-child(odd) { background: color-mix(in srgb, var(--ui-surface), var(--ui-text) 4%); }
.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Modal component */
.modal { position: fixed; inset: 0; z-index: 2000; display: none; overflow-x: hidden; overflow-y: auto; padding: 1rem; background: rgba(0,0,0,.55); align-items: flex-start; justify-content: center; }
.modal.show { display: flex; }
.modal-dialog { position: relative; width: 100%; max-width: 500px; margin: 1.75rem auto; pointer-events: none; }
.modal-dialog-centered { display: flex; align-items: center; min-height: calc(100% - 3.5rem); }
.modal-lg { max-width: 800px; }
.modal-dialog-scrollable { height: calc(100% - 3.5rem); }
.modal-dialog-scrollable .modal-content { max-height: 100%; }
.modal-content { position: relative; display: flex; flex-direction: column; width: 100%; color: var(--ui-text); background: var(--ui-surface); border: 1px solid var(--ui-border); border-radius: .5rem; box-shadow: 0 .5rem 1rem rgba(0,0,0,.2); pointer-events: auto; }
.modal-header, .modal-footer { display: flex; align-items: center; justify-content: space-between; padding: 1rem; border-bottom: 1px solid var(--ui-border); }
.modal-footer { justify-content: flex-end; gap: .5rem; border-top: 1px solid var(--ui-border); border-bottom: 0; }
.modal-title { margin: 0; line-height: 1.5; }
.modal-body { position: relative; flex: 1 1 auto; padding: 1rem; overflow-y: auto; }
.btn-close { width: 1.5rem; height: 1.5rem; padding: .25rem; border: 0; opacity: .65; background: transparent; color: inherit; }
.btn-close::before { content: "×"; font-size: 1.6rem; line-height: .8; }
body.ui-modal-open { overflow: hidden; }

/* Tabs */
.nav-tabs { display: flex; flex-wrap: wrap; padding: 0; margin: 0; list-style: none; border-bottom: 1px solid var(--ui-border); }
.nav-tabs .nav-link { margin-bottom: -1px; border: 1px solid transparent; border-radius: .375rem .375rem 0 0; }
.nav-tabs .nav-link.active { color: var(--ui-text); background: var(--ui-surface); border-color: var(--ui-border) var(--ui-border) var(--ui-surface); }
.tab-content { padding-top: 1rem; }
.tab-pane { display: none; }
.tab-pane.active.show { display: block; }

/* Responsive behavior */
@media (min-width: 576px) {
  .navbar-expand-sm { flex-wrap: nowrap; justify-content: flex-start; }
  .navbar-expand-sm .navbar-toggler { display: none; }
  .navbar-expand-sm .navbar-collapse { display: flex !important; flex-basis: auto; }
}

@media (max-width: 575.98px) {
  .navbar-toggler { display: inline-flex; align-items: center; }
  .navbar-expand-sm .navbar-collapse { flex-basis: 100%; }
  .navbar-expand-sm .navbar-nav { flex-direction: column; align-items: stretch; width: 100%; }
  .navbar-expand-sm .nav-link { padding: .55rem .75rem; }
  .navbar-expand-sm .dropdown-menu { position: static; width: 100%; box-shadow: none; }
  .col-sm-2, .col-sm-10 { flex: 0 0 100%; max-width: 100%; }
}
@media (max-width: 767.98px) {
  .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-8 { flex: 0 0 100%; max-width: 100%; }
}
@media (max-width: 991.98px) {
  .col-lg-2, .col-lg-8 { flex: 0 0 100%; max-width: 100%; }
}

/* Additional utilities present in generated tables and editor templates */
.me-2 { margin-right: .5rem !important; }
.px-1 { padding-inline: .25rem !important; }
.py-0 { padding-block: 0 !important; }
.py-4 { padding-block: 1.5rem !important; }
.w-100 { width: 100% !important; }
.align-middle { vertical-align: middle !important; }
.bg-secondary { background: #6c757d !important; color: #fff !important; }
.bg-success { background: #198754 !important; color: #fff !important; }
.bg-warning { background: #ffc107 !important; color: #212529 !important; }
.bg-info { background: #0dcaf0 !important; color: #212529 !important; }
.bg-danger { background: #dc3545 !important; color: #fff !important; }
.text-bg-success { background: #198754 !important; color: #fff !important; }
.table-hover tbody tr:hover { background: color-mix(in srgb, var(--ui-surface), var(--ui-text) 8%); }
.bg-body-tertiary { background: var(--nav, var(--ui-surface)) !important; }
@media (min-width: 768px) {
  .text-md-start { text-align: left !important; }
}
@media (min-width: 992px) {
  .text-lg-start { text-align: left !important; }
}

.row.g-2, .row.g-3 { margin-inline: 0; }
.row.g-2 > [class*="col-"], .row.g-2 > .col, .row.g-2 > .col-auto { padding: .25rem; }
.row.g-3 > [class*="col-"], .row.g-3 > .col, .row.g-3 > .col-auto { padding: .5rem; }

.fade { opacity: 0; transition: opacity .15s linear; }
.fade.show { opacity: 1; }

/* Reboot essentials formerly inherited from Bootstrap */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    "Noto Sans", "Liberation Sans", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
}
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: .5rem;
  font-weight: 500;
  line-height: 1.2;
}
p { margin-top: 0; margin-bottom: 1rem; }
ul, ol { margin-top: 0; margin-bottom: 1rem; padding-left: 2rem; }
img, svg { vertical-align: middle; }


/* Typography compatibility: restore Bootstrap 5 reboot heading scale. */
h1, .h1 { font-size: calc(1.375rem + 1.5vw); }
h2, .h2 { font-size: calc(1.325rem + .9vw); }
h3, .h3 { font-size: 1.75rem; }
h4, .h4 { font-size: 1.5rem; }
h5, .h5 { font-size: 1.25rem; }
h6, .h6 { font-size: 1rem; }
@media (min-width: 1200px) {
  h1, .h1 { font-size: 2.5rem; }
  h2, .h2 { font-size: 2rem; }
}

/* Bootstrap's navbar toggler sat at the far edge on narrow screens. */
@media (max-width: 575.98px) {
  .navbar-expand-sm > .container-fluid > .navbar-toggler {
    margin-left: auto;
  }
}


/* Navbar notification bell placement */
.navbar-expand-sm > .container-fluid > .site-notifications-nav {
  order: 2;
  margin-left: auto;
  flex: 0 0 auto;
}
.navbar-expand-sm > .container-fluid > .navbar-collapse {
  order: 1;
}
.site-notifications-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: .45rem .65rem;
  position: relative;
  cursor: pointer;
}
.site-notifications-bell {
  display: block;
  width: 1.35rem;
  height: 1.35rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.site-notifications-toggle .badge {
  position: absolute;
  top: .05rem;
  right: .05rem;
  transform: translate(25%, -15%);
  min-width: 1.1rem;
  padding: .22em .4em;
}
.site-notifications-nav .dropdown-menu {
  z-index: 1100;
}
@media (max-width: 575.98px) {
  .navbar-expand-sm > .container-fluid > .site-notifications-nav {
    order: 1;
    margin-left: auto;
    margin-right: .35rem;
  }
  .navbar-expand-sm > .container-fluid > .navbar-toggler {
    order: 2;
    margin-left: 0;
  }
  .navbar-expand-sm > .container-fluid > .navbar-collapse {
    order: 3;
  }
}

@media (max-width: 575.98px) {
    .navbar-expand-sm .site-notifications-nav {
        position: relative;
    }

    .navbar-expand-sm .site-notifications-menu {
        position: absolute !important;
        top: calc(100% + .25rem);
        right: 0;
        left: auto !important;
        width: min(22rem, calc(100vw - 1rem));
        max-width: calc(100vw - 1rem);
        box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .18);
        z-index: 1200;
    }
}