:root {
  --ink: #162033;
  --muted: #667085;
  --line: #dbe4f0;
  --paper: #ffffff;
  --soft: #f4f8fc;
  --blue: #0d62b7;
  --cyan: #02a4c7;
  --green: #10a37f;
  --red: #e25563;
  --yellow: #f2a93b;
  --violet: #6f5bd6;
  --shadow: 0 18px 50px rgba(22, 32, 51, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(2, 164, 199, 0.18), transparent 32rem),
    linear-gradient(135deg, #edf7fb 0%, #f8fbff 42%, #f4f1ff 100%);
  font-family: "Segoe UI", Arial, sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 18px;
  background: rgba(255, 255, 255, 0.82);
  border-right: 1px solid rgba(219, 228, 240, 0.9);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: block;
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(13, 98, 183, 0.12);
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: #253348;
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid transparent;
}

.nav-item:hover,
.nav-item.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 24px rgba(13, 98, 183, 0.22);
}

.nav-item.locked {
  position: relative;
}

.nav-item.locked::after {
  content: attr(data-lock-label);
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--blue);
  background: #eaf5ff;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.nav-item.locked:hover::after,
.nav-item.locked.active::after {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
}

.nav-icon {
  width: 26px;
  text-align: center;
}

.sidebar-note {
  margin-top: auto;
  padding: 14px;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, #19273f, #0d62b7);
}

.sidebar-note span {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  line-height: 1.45;
}

.main {
  min-width: 0;
  padding: 26px clamp(18px, 3vw, 42px) 42px;
}

.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 42px);
}

h2 {
  margin-bottom: 0;
  font-size: 26px;
}

h3 {
  margin-bottom: 8px;
}

.top-actions,
.modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.language-control {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.language-control span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.language-control select {
  min-height: 30px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-weight: 750;
  outline: none;
}

.icon-button,
.profile-button,
.primary-button,
.secondary-button,
.chip {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
}

.icon-button {
  width: 42px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
}

.profile-button {
  padding: 6px 12px 6px 6px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--violet), var(--blue));
  font-weight: 800;
}

.primary-button,
.secondary-button {
  padding: 0 14px;
  font-weight: 750;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 24px rgba(13, 98, 183, 0.2);
}

.primary-button.light {
  color: var(--blue);
  background: #ffffff;
}

.secondary-button {
  color: var(--blue);
  background: #edf6ff;
  border: 1px solid #cfe3fa;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.home-hero,
.hero-panel,
.panel,
.recruitment-hero {
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.home-hero {
  min-height: 390px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.85fr);
  gap: 0;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #12345d, var(--blue) 52%, var(--cyan));
}

.home-copy {
  padding: clamp(28px, 5vw, 58px);
  display: grid;
  align-content: center;
}

.home-copy .eyebrow {
  color: rgba(255, 255, 255, 0.78);
}

.home-copy h2 {
  max-width: 780px;
  margin-bottom: 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.03;
}

.home-copy p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.65;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.home-photo {
  position: relative;
  min-height: 320px;
}

.home-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-panel {
  min-height: 250px;
  padding: clamp(24px, 4vw, 42px);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  align-items: center;
  gap: 28px;
  color: #ffffff;
  background:
    linear-gradient(120deg, rgba(13, 98, 183, 0.95), rgba(2, 164, 199, 0.76)),
    url("clearpath-logo.png") right 28px center / min(44vw, 500px) auto no-repeat;
  overflow: hidden;
}

.hero-panel .eyebrow,
.recruitment-hero .eyebrow {
  color: rgba(255, 255, 255, 0.82);
}

.hero-panel h2 {
  max-width: 760px;
  margin-bottom: 14px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.02;
}

.hero-panel p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.65;
}

.hero-metrics {
  display: grid;
  gap: 12px;
}

.hero-metrics div {
  padding: 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
}

.hero-metrics strong {
  display: block;
  font-size: 36px;
}

.stats-grid,
.category-grid,
.news-grid,
.article-grid,
.service-grid,
.jobs-grid,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.stat-card,
.category-card,
.news-card,
.article-card,
.service-card,
.job-card,
.contact-card {
  min-width: 0;
  padding: 18px;
  border-radius: 8px;
  background: var(--paper);
  border: 1px solid rgba(219, 228, 240, 0.8);
  box-shadow: 0 12px 30px rgba(22, 32, 51, 0.08);
}

.latest-news-head {
  margin-top: 18px;
}

.news-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.news-card {
  min-height: 260px;
  display: grid;
  align-content: space-between;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.92)),
    linear-gradient(135deg, rgba(13, 98, 183, 0.12), rgba(111, 91, 214, 0.1));
  border-top: 5px solid var(--cyan);
}

.news-card:nth-child(2n) {
  border-top-color: var(--violet);
}

.news-card:nth-child(3n) {
  border-top-color: var(--green);
}

.news-card p {
  color: var(--muted);
  line-height: 1.56;
}

.news-card footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.article-grid {
  margin-bottom: 18px;
}

.article-card {
  min-height: 260px;
  display: grid;
  align-content: space-between;
  border-top: 5px solid var(--blue);
}

.article-card:nth-child(2n) {
  border-top-color: var(--green);
}

.article-card:nth-child(3n) {
  border-top-color: var(--yellow);
}

.article-card p,
.service-card p {
  color: var(--muted);
  line-height: 1.56;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.service-section {
  margin-top: 18px;
  padding: 22px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(219, 228, 240, 0.9);
}

.service-card {
  min-height: 290px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.92)),
    linear-gradient(135deg, rgba(13, 98, 183, 0.16), rgba(16, 163, 127, 0.12));
}

.service-card .service-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-size: 24px;
}

.stat-card {
  min-height: 146px;
  display: grid;
  align-content: space-between;
}

.stat-card span {
  font-size: 28px;
}

.stat-card p {
  color: var(--muted);
  margin-bottom: 8px;
}

.stat-card strong {
  font-size: 15px;
}

.stat-card.blue {
  border-top: 5px solid var(--blue);
}

.stat-card.green {
  border-top: 5px solid var(--green);
}

.stat-card.red {
  border-top: 5px solid var(--red);
}

.stat-card.yellow {
  border-top: 5px solid var(--yellow);
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
}

.branch-showcase {
  display: grid;
  grid-template-columns: 1.45fr 0.9fr;
  gap: 16px;
  margin-top: 18px;
}

.branch-card {
  overflow: hidden;
  border-radius: 8px;
  background: var(--paper);
  border: 1px solid rgba(219, 228, 240, 0.88);
  box-shadow: 0 12px 30px rgba(22, 32, 51, 0.08);
}

.branch-card img {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  display: block;
}

.branch-card div:not(.office-placeholder) {
  padding: 18px;
}

.branch-card p {
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 0;
}

.branch-card.placeholder {
  display: grid;
  align-content: stretch;
}

.office-placeholder {
  min-height: 190px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(13, 98, 183, 0.92), rgba(16, 163, 127, 0.82)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.14) 0 1px, transparent 1px 18px);
  font-size: 54px;
  font-weight: 900;
}

.panel {
  padding: 20px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(219, 228, 240, 0.86);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.section-head.roomy {
  padding: 22px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(219, 228, 240, 0.9);
}

.leader-list,
.document-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.list-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  background: var(--soft);
}

.list-row small,
.muted {
  color: var(--muted);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.chip {
  padding: 0 14px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
}

.chip.active {
  color: #ffffff;
  background: var(--blue);
  border-color: var(--blue);
}

.department-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.department-column {
  min-height: 430px;
  padding: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
}

.department-column header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.employee-card {
  padding: 14px;
  margin-bottom: 10px;
  border-radius: 8px;
  background: var(--paper);
  border-left: 5px solid var(--blue);
  box-shadow: 0 8px 20px rgba(22, 32, 51, 0.08);
}

.employee-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.danger-button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(226, 85, 99, 0.3);
  border-radius: 8px;
  color: #b42335;
  background: #fff1f3;
  font-size: 12px;
  font-weight: 800;
}

.danger-button:hover {
  color: #ffffff;
  background: var(--red);
}

.employee-card:nth-child(3n) {
  border-left-color: var(--green);
}

.employee-card:nth-child(3n + 1) {
  border-left-color: var(--red);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--blue);
  background: #eaf5ff;
  font-size: 12px;
  font-weight: 800;
}

.category-card {
  min-height: 320px;
}

.category-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.category-card ul {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.category-card li {
  padding: 12px;
  border-radius: 8px;
  background: var(--soft);
}

.category-card li strong {
  display: block;
}

.recruitment-hero {
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 4vw, 44px);
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(111, 91, 214, 0.92), rgba(13, 98, 183, 0.9)),
    linear-gradient(45deg, rgba(242, 169, 59, 0.22), transparent);
}

.recruitment-hero h2 {
  margin-bottom: 12px;
  font-size: clamp(32px, 5vw, 52px);
}

.recruitment-hero p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.65;
}

.job-card {
  display: grid;
  gap: 12px;
  border-top: 5px solid var(--violet);
}

.job-card footer,
.contact-card footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.contact-card {
  min-height: 240px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.86)),
    linear-gradient(135deg, rgba(2, 164, 199, 0.14), rgba(242, 169, 59, 0.14));
}

.contact-card.with-photo {
  padding-top: 150px;
  background:
    linear-gradient(180deg, transparent 0 122px, rgba(255, 255, 255, 0.96) 122px),
    url("bmt-office.png") center top / 100% 150px no-repeat;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(10, 19, 32, 0.55);
}

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

.modal {
  width: min(720px, 100%);
  max-height: min(760px, 92vh);
  overflow: auto;
  padding: 22px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.login-modal {
  width: min(520px, 100%);
}

.news-modal {
  width: min(980px, 100%);
}

.all-news-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.all-news-item {
  padding: 14px;
  border-radius: 8px;
  background: var(--soft);
  border: 1px solid var(--line);
}

.all-news-item h3 {
  margin-bottom: 8px;
  font-size: 17px;
}

.all-news-item p {
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.all-news-item footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.login-note,
.login-hint {
  color: var(--muted);
  line-height: 1.55;
}

.login-note {
  margin-bottom: 16px;
}

.login-hint {
  margin: 12px 0 0;
  font-size: 13px;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-weight: 750;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fbfdff;
  color: var(--ink);
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.modal-actions {
  justify-content: flex-end;
  margin-top: 18px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  max-width: min(360px, calc(100vw - 40px));
  padding: 13px 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--green), var(--blue));
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .nav-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sidebar-note {
    display: none;
  }

  .hero-panel,
  .two-column,
  .branch-showcase {
    grid-template-columns: 1fr;
  }

  .stats-grid,
  .category-grid,
  .news-grid,
  .article-grid,
  .service-grid,
  .jobs-grid,
  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .department-board {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .main {
    padding: 18px 14px 32px;
  }

  .topbar,
  .section-head,
  .recruitment-hero,
  .home-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .section-actions {
    justify-content: stretch;
  }

  .section-actions button {
    width: 100%;
  }

  .home-hero {
    display: flex;
  }

  .nav-list,
  .stats-grid,
  .category-grid,
  .news-grid,
  .article-grid,
  .service-grid,
  .jobs-grid,
  .contact-grid,
  .form-grid,
  .all-news-list {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    padding: 24px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
  }

  .hero-panel h2,
  .home-copy h2,
  .recruitment-hero h2 {
    font-size: 34px;
  }

  .top-actions {
    justify-content: space-between;
  }
}
