:root {
  --color-page: #f6f7fb;
  --color-surface: #ffffff;
  --color-text: #172033;
  --color-muted: #667085;
  --color-primary: #5f7cf7;
  --color-primary-dark: #405edb;
  --color-border: #e4e7ec;
  --shadow-card: 0 24px 70px rgba(16, 24, 40, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--color-page);
  color: var(--color-text);
  font-family: "Plus Jakarta Sans", Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-body {
  min-height: 100vh;
  background: #f9f9fb;
  color: #191c1d;
  font-family: "Be Vietnam Pro", "Plus Jakarta Sans", Arial, Helvetica, sans-serif;
}

.app-shell {
  display: flex;
  min-height: 100vh;
  background: #f9f9fb;
}

.app-content {
  width: calc(100% - 280px);
  min-width: 0;
  margin-left: 280px;
}

.mobile-sidebar-trigger,
.sidebar-backdrop {
  display: none;
}

.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  display: flex;
  width: 280px;
  flex-direction: column;
  justify-content: space-between;
  padding: 32px 16px;
  border-right: 1px solid #c0c7cc;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(12, 174, 242, 0.05);
}

.sidebar__top {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.sidebar__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 40px;
}

.sidebar-close {
  display: none;
}

.sidebar-brand__mark {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #addef7;
  color: #33647a;
}

.sidebar-brand__mark svg,
.sidebar-brand__mark img,
.sidebar-nav__icon svg,
.sidebar-nav__icon img {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.sidebar-brand__mark img,
.sidebar-nav__icon img {
  display: block;
}

.sidebar-brand strong {
  display: block;
  color: #33647a;
  font-family: "Plus Jakarta Sans", Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
}

.sidebar-brand small {
  display: block;
  color: #41484c;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
}

.sidebar-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav__item {
  display: flex;
  height: 44px;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-left: 4px solid transparent;
  border-radius: 8px;
  color: #41484c;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.7px;
  line-height: 20px;
}

.sidebar-nav__item.is-active {
  border-left-color: #00658f;
  background: rgba(173, 222, 247, 0.2);
  color: #00658f;
}

.sidebar-nav__icon {
  display: inline-flex;
  width: 20px;
  flex: 0 0 20px;
  justify-content: center;
}

.sidebar__bottom {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 16px;
}

.sidebar-logout-form {
  width: 100%;
  margin: 0;
}

.sidebar-logout {
  display: flex;
  width: 100%;
  height: 44px;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 0;
  border-radius: 8px;
  background: rgba(186, 26, 26, 0.08);
  color: #ba1a1a;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.7px;
  line-height: 20px;
}

.sidebar-logout svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.sidebar-logout:hover {
  background: rgba(186, 26, 26, 0.14);
}

.sidebar__footer {
  margin: 0;
  padding: 0 16px;
  color: #71787d;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  text-align: center;
  width: 100%;
}

@media (max-width: 960px) {
  body.is-sidebar-open {
    overflow: hidden;
  }

  .app-content {
    width: 100%;
    margin-left: 0;
  }

  .mobile-sidebar-trigger {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 50;
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid #c0c7cc;
    border-radius: 9999px;
    background: #ffffff;
    color: #33647a;
    box-shadow: 0 8px 24px rgba(25, 28, 29, 0.12);
  }

  .mobile-sidebar-trigger svg,
  .sidebar-close svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
  }

  .sidebar {
    left: -320px;
    z-index: 200;
    width: 280px;
    transition: left 240ms ease;
  }

  .sidebar.is-open {
    left: 0;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 150;
    display: block;
    border: 0;
    background: rgba(25, 28, 29, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 240ms ease;
  }

  body.is-sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  body.is-sidebar-open .mobile-sidebar-trigger {
    opacity: 0;
    pointer-events: none;
  }

  .sidebar-brand {
    padding-bottom: 32px;
  }

  .sidebar-close {
    display: inline-flex;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 9999px;
    background: rgba(173, 222, 247, 0.2);
    color: #33647a;
  }

}

.language-trigger {
  position: fixed;
  top: 16px;
  right: 24px;
  z-index: 40;
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: #41484c;
}

.language-trigger img {
  width: 24px;
  height: 24px;
  display: block;
}

.language-trigger--inline {
  position: static;
  z-index: auto;
}

.language-trigger--inline img {
  width: 20px;
  height: 20px;
}

.auth-body .language-trigger {
  top: 24px;
  right: 24px;
}

.language-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(7px);
}

.language-modal[hidden] {
  display: none;
}

.language-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 460px;
  border-radius: 1px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
  color: #111827;
  font-family: inherit;
}

.language-modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 1px;
  background: transparent;
  color: #6b7280;
}

.language-modal__close svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.language-modal__header {
  padding: 30px 32px 22px;
  text-align: center;
}

.language-modal__header h2,
.language-modal__header p {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.8em;
  line-height: 1.65;
  text-transform: uppercase;
}

.language-modal__header h2 {
  color: #111827;
}

.language-modal__header p {
  margin-top: 2px;
  color: #4b5563;
}

.language-modal__body {
  padding: 0 32px 32px;
}

.language-modal__body > label {
  display: block;
  margin-bottom: 8px;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.language-modal__options {
  display: flex;
  gap: 10px;
}

.language-modal__option {
  display: flex;
  min-height: 48px;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #d1d5db;
  border-radius: 1px;
  background: #ffffff;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  padding: 12px 16px;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.language-modal__option.is-active {
  border-color: #3b82f6;
  background: #eff6ff;
  color: #1d4ed8;
}

.language-modal__flag {
  display: block;
  width: 20px;
  height: 14px;
  flex: 0 0 20px;
  border-radius: 2px;
  object-fit: cover;
}

.language-modal__continue {
  width: 100%;
  height: 49px;
  margin-top: 18px;
  border: 0;
  border-radius: 1px;
  background: #111827;
  color: #ffffff;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.15em;
  line-height: 20px;
}

@media (max-width: 560px) {
  .language-modal__dialog {
    max-width: 360px;
  }

  .language-modal__header,
  .language-modal__body {
    padding-right: 22px;
    padding-left: 22px;
  }

  .language-modal__header h2,
  .language-modal__header p {
    letter-spacing: 0.55em;
  }
}
