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 white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 0;
}

:root {
  --sidebar-width: 264px;
  --sidebar-collapsed-width: 78px;
  --sidebar-bg: linear-gradient(180deg, #122437 0%, #0f1d2d 100%);
  --sidebar-border: rgba(255, 255, 255, 0.12);
  --content-bg: #f2f5f9;
  --surface: #ffffff;
  --text-primary: #101826;
  --text-muted: #5f6f82;
  --accent: #0f9f88;
  --accent-strong: #0a7f6d;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
  transition: grid-template-columns 220ms ease;
}

.sidebar {
  color: #eaf2fb;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  padding: 1rem;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

.brand {
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.sidebar-toggle,
.mobile-menu-button {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-radius: 10px;
  padding: 0.4rem 0.62rem;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.nav-group-title {
  margin: 0;
  color: #9eb4cb;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
}

.nav-link {
  display: block;
  padding: 0.56rem 0.7rem;
  border-radius: 10px;
  color: #dbe8f6;
  text-decoration: none;
}

.nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.content-shell {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: radial-gradient(circle at 0% 0%, #e8eff8 0%, var(--content-bg) 40%, #edf2f8 100%);
}

.content-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.25rem;
}

.page-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
}

.content-main {
  flex: 1;
  padding: 0 1.25rem 1.25rem;
}

.mobile-menu-button {
  display: none;
}

.app-shell[data-sidebar-collapsed="true"] {
  grid-template-columns: var(--sidebar-collapsed-width) 1fr;
}

.app-shell[data-sidebar-collapsed="true"] .brand,
.app-shell[data-sidebar-collapsed="true"] .nav-group-title,
.app-shell[data-sidebar-collapsed="true"] .nav-label {
  display: none;
}

@media (max-width: 991px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(82vw, 290px);
    transform: translateX(-100%);
    z-index: 1040;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    transition: transform 220ms ease;
  }

  .mobile-menu-button {
    display: inline-flex;
    border-color: rgba(0, 0, 0, 0.15);
    color: var(--text-primary);
    background: #ffffff;
  }

  .app-shell[data-sidebar-collapsed="false"] .sidebar {
    transform: translateX(0);
  }
}

.login-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100dvh;
  width: 100vw;
  background: #d6dee6;
}

.login-split {
  min-height: 100dvh;
}

.login-split--left {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eceff3;
  padding: 2.5rem;
}

.login-split--right {
  position: relative;
  overflow: hidden;
}

.login-hero__image {
  display: block;
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  object-fit: cover;
}

.login-page {
  margin: 0;
  margin-bottom: 0 !important;
  overflow: hidden;
}

.login-form-wrap {
  width: min(92%, 560px);
  min-height: 620px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.8rem;
  border-radius: 24px;
  border: 1px solid #dde4ec;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 16px 30px rgba(21, 33, 49, 0.12);
}

.login-badge {
  width: 62px;
  height: 28px;
  margin-bottom: 2rem;
  background: #2b2f36;
  border-radius: 2px;
}

.login-title {
  margin-bottom: 0.85rem;
  font-size: 3rem;
  line-height: 1;
  font-weight: 700;
  color: #063b7a;
}

.login-subtitle {
  margin-bottom: 2.2rem;
  color: #4a688d;
  font-size: 1.9rem;
}

.login-label {
  color: #0f3f76;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.login-input {
  height: 54px;
  border-radius: 9px;
  border: 1px solid #d3dce8;
  background: rgba(255, 255, 255, 0.92);
  font-size: 1.25rem;
}

.login-input::placeholder {
  color: #8799ae;
}

.login-submit {
  height: 58px;
  margin-top: 0.25rem;
  border-radius: 10px;
  background: #00366c;
  border: none;
  color: #ffffff;
  font-size: 1.65rem;
  font-weight: 700;
}

.login-submit:hover {
  background: #0a4f96;
}

.login-help {
  margin-top: 1.25rem;
  text-align: center;
  color: #6f8093;
  font-size: 1rem;
}

.login-help a {
  color: #2a78c7;
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 767.98px) {
  .login-hero {
    grid-template-columns: 1fr;
  }

  .login-split--left {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: transparent;
    padding: 1rem;
  }

  .login-split--right {
    grid-row: 1;
  }

  .login-hero {
    min-height: 100dvh;
    padding: 0;
  }

  .login-hero__image {
    min-height: 100dvh;
  }

  .login-form-wrap {
    width: calc(100% - 1.5rem);
    min-height: auto;
    margin: 0.75rem auto;
    padding: 1.4rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.83);
  }

  .login-title {
    font-size: 2.2rem;
  }

  .login-subtitle {
    font-size: 1.1rem;
  }

  .login-input {
    font-size: 1rem;
    height: 46px;
  }

  .login-submit {
    font-size: 1.2rem;
    height: 48px;
  }
}

.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;
}
