:root {
  --navy: #06284a;
  --navy-2: #0a355e;
  --green: #16b377;
  --green-dark: #07895a;
  --teal: #11a9a2;
  --orange: #ffa536;
  --red: #ef4e42;
  --ink: #162231;
  --muted: #6b7785;
  --line: #d8e0e8;
  --surface: #f5f7fa;
  --panel: #ffffff;
  --sidebar: #333b43;
  --sidebar-dark: #050505;
  --shadow: 0 18px 55px rgba(6, 40, 74, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.is-hidden {
  display: none !important;
}

.login-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #edf2f7 url("assets/bg_login.jpg") center center / cover no-repeat;
}

.login-card {
  position: relative;
  z-index: 2;
  width: min(545px, calc(100vw - 32px));
  min-height: 520px;
  padding: 48px 48px 32px;
  border-radius: 4px;
  background: #adb7c0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.login-logo {
  display: block;
  width: min(275px, 82%);
  margin: 0 auto 42px;
}

.login-form {
  display: grid;
  gap: 10px;
}

.login-form h1 {
  height: 1px;
  margin: 0;
  overflow: hidden;
  opacity: 0;
}

.login-form label {
  display: grid;
  gap: 6px;
}

.login-form label span {
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.login-form input {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border: 1px solid #d4dce4;
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
  outline: none;
  font-size: 18px;
}

.login-form input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 179, 119, 0.16);
}

.login-error {
  min-height: 18px;
  margin: 0;
  color: #8b1f16;
  font-size: 13px;
  font-weight: 700;
}

.login-form button {
  height: 84px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  background: #28a745;
  font-weight: 700;
  font-size: 18px;
}

.login-form button:hover {
  background: #218838;
}

.forgot-link {
  display: block;
  margin: 42px auto 0;
  border: 0;
  color: #fff;
  background: transparent;
  font-weight: 700;
}

.login-wsc-logo {
  position: relative;
  z-index: 2;
  width: 76px;
  margin: 0;
  opacity: 0.65;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 280px minmax(0, 1fr);
  background: #fff;
  transition: grid-template-columns 0.22s ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 74px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: #343a40;
  color: #dce3ea;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
}

.brand-panel {
  display: grid;
  height: 126px;
  place-items: center;
  padding: 0;
  background: #d3d3d3;
  border-bottom: 1px solid #4b545c;
  overflow: hidden;
}

.brand-toggle {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border: 0;
  background: transparent;
}

.brand-panel img {
  width: 190px;
  max-width: 78%;
}

.brand-logo-icon {
  display: none;
}

.app-shell.sidebar-collapsed .brand-logo-full {
  display: none;
}

.app-shell.sidebar-collapsed .brand-logo-icon {
  display: block;
  width: 46px;
  max-width: 46px;
}

.app-shell.sidebar-collapsed .brand-panel {
  height: 74px;
}

.user-panel {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 72px;
  padding: 12px 16px;
  background: #000;
}

.avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  color: #000;
  background: #fff;
  font-weight: 800;
}

.user-panel strong,
.user-panel span {
  display: block;
  line-height: 1.25;
}

.user-panel strong {
  color: #fff;
  font-size: 12px;
}

.user-panel span {
  color: #c4cbd2;
  font-size: 11px;
}

.user-panel button {
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}

.app-shell.sidebar-collapsed .user-panel {
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 14px 8px;
}

.app-shell.sidebar-collapsed .user-info,
.app-shell.sidebar-collapsed .logout-button {
  display: none;
}

.side-nav {
  display: grid;
  gap: 2px;
  padding: 6px 0 28px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px 0 20px;
  border: 0;
  border-left: 3px solid transparent;
  color: #c2c7d0;
  background: transparent;
  text-align: left;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
}

.nav-link:hover,
.nav-link.is-active {
  border-left-color: transparent;
  color: #1db45a;
  background: #26282a;
}

.nav-icon {
  display: inline-grid;
  width: 24px;
  min-width: 24px;
  place-items: center;
  background: transparent;
  color: currentColor;
  font-size: 17px;
  font-weight: 700;
}

.app-shell.sidebar-collapsed .nav-link {
  justify-content: center;
  min-height: 44px;
  padding: 0;
}

.app-shell.sidebar-collapsed .nav-icon {
  margin: 0;
  font-size: 18px;
}

.app-shell.sidebar-collapsed .nav-text {
  display: none;
}

.workspace {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  min-width: 0;
  background: #fff;
}

.topbar {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  padding: 28px 28px 20px;
  border-bottom: 3px solid #1db45a;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.topbar h1 {
  margin: 0;
  color: var(--green);
  font-size: 28px;
  line-height: 1.15;
}

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

.outline-button,
.primary-button {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 700;
}

.outline-button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
}

.primary-button {
  border: 1px solid var(--green);
  color: #fff;
  background: var(--green);
}

.page-content {
  flex: 1;
  padding: 24px 28px 36px;
}

.app-footer {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 14px 28px;
  border-top: 1px solid var(--line);
  color: #5e6b78;
  background: #f7f9fb;
  font-size: 13px;
  font-weight: 700;
}

.app-footer img {
  width: 74px;
  height: auto;
  opacity: 0.62;
}

.hero-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 24px;
}

.summary-panel,
.module-panel,
.table-panel,
.detail-panel {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  box-shadow: 0 4px 16px rgba(20, 38, 56, 0.04);
}

.summary-panel {
  padding: 24px;
}

.summary-panel h2,
.detail-panel h2 {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: 22px;
}

.summary-panel p {
  max-width: 960px;
  margin: 0;
  color: #405063;
  line-height: 1.55;
}

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

.metric {
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

.metric strong {
  display: block;
  color: var(--navy);
  font-size: 30px;
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.module-card {
  display: grid;
  gap: 14px;
  align-content: start;
  min-height: 230px;
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent, var(--green));
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(20, 38, 56, 0.04);
}

.module-card h3 {
  margin: 0;
  color: var(--navy);
  font-size: 18px;
  line-height: 1.25;
}

.module-card p {
  margin: 0;
  color: #4a5968;
  font-size: 14px;
  line-height: 1.45;
}

.module-card button {
  align-self: end;
  width: max-content;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--accent, var(--green));
  border-radius: 4px;
  color: var(--accent, var(--green));
  background: #fff;
  font-weight: 700;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
}

.module-panel {
  padding: 20px;
}

.module-panel h2,
.table-panel h2 {
  margin: 0;
  color: var(--navy);
  font-size: 22px;
}

.module-lead {
  margin: 10px 0 20px;
  color: #405063;
  line-height: 1.55;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  position: relative;
  min-height: 46px;
  padding: 12px 12px 12px 36px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f8fafc;
  color: #354557;
  font-size: 14px;
}

.feature-list li::before {
  position: absolute;
  top: 13px;
  left: 13px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--green);
  content: "";
}

.detail-panel {
  padding: 20px;
}

.timeline {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
}

.timeline-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--navy);
  font-size: 13px;
  font-weight: 800;
}

.timeline-item strong {
  display: block;
  margin: 0 0 4px;
  color: var(--navy);
}

.timeline-item span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.filter-panel {
  margin-bottom: 18px;
  padding: 20px;
  border-top: 3px solid var(--green);
  background: #f7f9fb;
}

.filter-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 18px;
  color: var(--ink);
  font-size: 18px;
}

.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.filters label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.filters input,
.filters select {
  height: 42px;
  padding: 0 12px;
  border: 1px solid #cdd7e1;
  border-radius: 4px;
  color: #405063;
  background: #fff;
}

.table-panel {
  padding: 0;
  overflow: hidden;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.search-box {
  width: min(280px, 100%);
  height: 40px;
  padding: 0 12px;
  border: 1px solid #cdd7e1;
  border-radius: 4px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th,
.data-table td {
  padding: 15px 18px;
  border-bottom: 1px solid #e7ecf1;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: var(--ink);
  background: #fbfcfd;
  font-size: 13px;
}

.data-table tbody tr:nth-child(odd) {
  background: #f2f3f5;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--status-color, var(--green));
  background: var(--status-bg, rgba(22, 179, 119, 0.12));
  font-size: 12px;
  font-weight: 800;
}

.row-action {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--red);
  border-radius: 4px;
  color: var(--red);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 1300px) {
  .module-grid {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
  }
}

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

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

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

  .hero-strip,
  .content-layout {
    grid-template-columns: 1fr;
  }

  .filters,
  .feature-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .login-card {
    padding: 42px 24px 32px;
  }

  .topbar,
  .table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .side-nav,
  .module-grid,
  .filters,
  .feature-list,
  .status-grid {
    grid-template-columns: 1fr;
  }

  .page-content {
    padding: 18px 14px 28px;
  }

  .app-footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px;
  }

  .data-table {
    min-width: 760px;
  }

  .table-panel {
    overflow-x: auto;
  }
}
