html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem #1e1e1e, 0 0 0 0.25rem #f49f0d;
}

html {
  position: relative;
  min-height: 100%;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ==========================================================================
   Liberum ServiceDesk-inspired theme: dark charcoal + orange accent,
   echoing the look of the original classic-ASP app this was rebuilt from.
   ========================================================================== */

:root,
[data-bs-theme="dark"] {
  --lhd-accent: #f49f0d;
  --lhd-accent-light: #f8c162;
  --lhd-accent-dark: #c97d00;
  --lhd-bg: #262626;
  --lhd-panel: #2f2f2f;
  --lhd-panel-alt: #2b2b2b;
  --lhd-border: #474747;
  --lhd-text: #d9d9d9;
  --lhd-text-muted: #9c9c9c;

  --bs-body-bg: var(--lhd-bg);
  --bs-body-color: var(--lhd-text);
  --bs-border-color: var(--lhd-border);
  --bs-primary: var(--lhd-accent);
  --bs-primary-rgb: 244, 159, 13;
  --bs-link-color: var(--lhd-accent);
  --bs-link-color-rgb: 244, 159, 13;
  --bs-link-hover-color: var(--lhd-accent-light);
  --bs-link-hover-color-rgb: 248, 193, 98;
}

body {
  background-color: #161616;
  color: var(--lhd-text);
}

/* The original app rendered as a fixed-width "sheet" floating centered on
   a plain dark page, not an edge-to-edge layout - this reproduces that. */
.lhd-sheet {
  max-width: 1300px;
  margin: 10px auto;
  border-radius: 6px;
  background-color: var(--lhd-bg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}

.brand-white {
  color: #fff;
}

.brand-accent {
  color: var(--lhd-accent);
}

/* Site-wide banner: dark gradient + the original app's own headset/laptop
   illustration anchored right, with our (configurable) site name on the
   left instead of the original's baked-in "Liberum ServiceDesk" wordmark. */
.lhd-banner {
  position: relative;
  overflow: hidden;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  background:
    radial-gradient(ellipse 45% 160% at 10% 0%, rgba(255, 255, 255, 0.16), transparent 65%),
    linear-gradient(180deg, #3c3c3c 0%, #1b1b1b 100%);
  border-bottom: 3px solid var(--lhd-accent-dark);
}

/* Brand text and the original app's own headset illustration (cut as a
   transparent PNG straight from its header.psd layers - no logo text or
   background baked in) flow together as one compact cluster, rather than
   being pulled to opposite edges of the banner on wide screens. */
.lhd-banner-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 90px;
  padding: 0.4rem 1.5rem;
}

.lhd-brand {
  font-weight: 800;
  font-size: 1.9rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.lhd-banner-illustration {
  height: 85px;
  width: auto;
  flex-shrink: 0;
}

/* App shell: fixed sidebar + content, matching the original's two-column layout.
   align-items: stretch so the sidebar and content always match heights,
   rather than guessing at a fixed viewport-based min-height. */
.lhd-shell {
  position: relative;
  display: flex;
  align-items: stretch;
  min-height: 280px;
}

.lhd-sidebar-toggle {
  align-self: flex-start;
  margin: 0.75rem 0 0 0.75rem;
  color: var(--lhd-text);
  border: 1px solid var(--lhd-border);
}

.lhd-sidebar {
  flex: 0 0 220px;
  width: 220px;
  background-color: #262626;
  border-right: 1px solid var(--lhd-border);
}

/* The sidebar stays inline down to the md breakpoint rather than lg, so it
   doesn't collapse behind the Menu toggle until the window is genuinely
   narrow - not just whenever it dips below a wide desktop width. */
@media (max-width: 767.98px) {
  .lhd-shell {
    min-height: auto;
  }

  .lhd-sidebar {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 20;
    width: 260px;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    min-height: auto;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
  }

  .lhd-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 15;
    background-color: rgba(0, 0, 0, 0.5);
  }

  .lhd-backdrop.show {
    display: block;
  }
}

.lhd-nav {
  list-style: none;
  margin: 0;
  padding: 0.75rem 0;
}

.lhd-nav-link,
button.lhd-nav-link {
  display: flex;
  align-items: center;
  padding: 0.45rem 1rem;
  color: var(--lhd-text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  background: linear-gradient(180deg, #3a3a3a 0%, #2c2c2c 100%);
  border-bottom: 1px solid #1e1e1e;
  text-decoration: none;
  cursor: pointer;
}

.lhd-nav-link::before {
  content: "";
  display: inline-block;
  width: 13px;
  height: 15px;
  margin-right: 10px;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 2h9l5 5v15a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zm8 1.5V8h4.5L14 3.5z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 2h9l5 5v15a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zm8 1.5V8h4.5L14 3.5z'/%3E%3C/svg%3E");
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
}

.lhd-nav-link:hover,
.lhd-nav-link:focus,
.lhd-nav-link.active {
  color: var(--lhd-accent-light);
  background: linear-gradient(180deg, #474747 0%, #363636 100%);
}

.lhd-nav-heading {
  padding: 0.75rem 1rem 0.25rem;
  color: var(--lhd-text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lhd-nav-separator {
  height: 1px;
  margin: 0.5rem 0;
  background-color: var(--lhd-border);
}

.lhd-nav-user {
  padding: 0.6rem 1rem 0.25rem;
  color: var(--lhd-text-muted);
  font-size: 0.75rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.lhd-content {
  flex: 1 1 auto;
  min-width: 0;
  padding: 1.5rem;
}

.hero-title {
  font-weight: 800;
  font-size: 2.5rem;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(180deg, var(--lhd-accent-light) 0%, var(--lhd-accent) 55%, var(--lhd-accent-dark) 100%);
  border-color: var(--lhd-accent-dark);
  color: #241400;
  font-weight: 600;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background: linear-gradient(180deg, var(--lhd-accent) 0%, var(--lhd-accent-dark) 100%);
  border-color: var(--lhd-accent-dark);
  color: #fff;
}

.btn-outline-primary {
  color: var(--lhd-accent-light);
  border-color: var(--lhd-accent);
}

.btn-outline-primary:hover {
  background-color: var(--lhd-accent);
  border-color: var(--lhd-accent);
  color: #241400;
}

.btn-outline-secondary {
  color: var(--lhd-text);
  border-color: var(--lhd-border);
}

.btn-outline-secondary:hover {
  background-color: var(--lhd-border);
  border-color: var(--lhd-border);
  color: #fff;
}

/* Cards / panels */
.card {
  background-color: var(--lhd-panel);
  border-color: var(--lhd-border);
}

/* Tables */
.table {
  --bs-table-color: var(--lhd-text);
  --bs-table-bg: transparent;
  --bs-table-border-color: var(--lhd-border);
  --bs-table-striped-bg: var(--lhd-panel-alt);
  --bs-table-striped-color: var(--lhd-text);
  --bs-table-hover-bg: #333333;
  --bs-table-hover-color: #ffffff;
}

.table thead th {
  color: var(--lhd-accent-light);
  border-bottom-color: var(--lhd-accent-dark);
}

.table td {
  overflow-wrap: anywhere;
}

/* Forms */
.form-control,
.form-select {
  background-color: #1e1e1e;
  border-color: var(--lhd-border);
  color: #e6e6e6;
}

.form-control:focus,
.form-select:focus {
  background-color: #1e1e1e;
  border-color: var(--lhd-accent);
  color: #e6e6e6;
  box-shadow: 0 0 0 0.2rem rgba(244, 159, 13, 0.25);
}

.form-control::placeholder {
  color: #8a8a8a;
}

.badge.bg-warning {
  color: #241400;
}

.lhd-footer {
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 0.8rem;
  border-top: 1px solid var(--lhd-border);
  background-color: #262626;
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
}

.alert-danger {
  background-color: #3a1f1f;
  border-color: #6b2b2b;
  color: #f5b5b5;
}