:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #1d2b3a;
  --muted: #66758a;
  --line: #d9e4f2;
  --blue: #174b86;
  --blue-2: #2563eb;
  --teal: #11948d;
  --green: #218657;
  --red: #c94a4a;
  --amber: #d9902f;
  --shadow: 0 22px 60px rgba(18, 43, 74, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Segoe UI", Tahoma, sans-serif;
  background:
    radial-gradient(circle at 12% 12%, rgba(37, 99, 235, 0.16), transparent 28%),
    radial-gradient(circle at 90% 15%, rgba(17, 148, 141, 0.16), transparent 30%),
    linear-gradient(135deg, #f8fbff 0%, #edf3fa 100%);
}

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

.hidden {
  display: none !important;
}

.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 560px) minmax(300px, 1fr);
  gap: 32px;
  align-items: center;
  padding: 42px;
}

.login__panel,
.login__info,
.card,
.modal__card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(217, 228, 242, 0.95);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.login__panel {
  padding: 38px;
}

.login__info {
  padding: 38px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(23, 75, 134, 0.94), rgba(24, 111, 151, 0.9)),
    repeating-linear-gradient(135deg, transparent 0 12px, rgba(255,255,255,0.08) 12px 13px);
  color: white;
}

.login__info h2 {
  margin-top: 0;
  font-size: 30px;
}

.login__info li {
  margin: 12px 0;
  line-height: 1.5;
}

.brand,
.sidebar__brand {
  display: flex;
  gap: 16px;
  align-items: center;
}

.brand__mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(23, 75, 134, 0.25);
}

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

h1,
h2,
h3 {
  margin: 0;
}

.login h1 {
  max-width: 440px;
  font-size: 34px;
  line-height: 1.08;
}

.lead {
  color: var(--muted);
  line-height: 1.6;
  margin: 24px 0;
}

.form {
  display: grid;
  gap: 16px;
}

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

.form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.form input,
.form select,
.form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--text);
  background: white;
  outline: none;
}

.form textarea {
  min-height: 92px;
  resize: vertical;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  border-color: var(--blue-2);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.btn,
.demo__btn,
.icon-btn {
  border: 0;
  border-radius: 14px;
  padding: 11px 16px;
  cursor: pointer;
  color: var(--blue);
  background: #e8f0fb;
  font-weight: 800;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.btn:hover,
.demo__btn:hover,
.icon-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(23, 75, 134, 0.14);
}

.btn--primary {
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
}

.btn--danger {
  color: white;
  background: var(--red);
}

.btn--ghost {
  color: white;
  background: rgba(255,255,255,0.12);
}

.demo {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 16px;
}

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

.sidebar {
  min-height: 100vh;
  padding: 24px;
  color: white;
  background:
    linear-gradient(180deg, #143966, #102b4c),
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.32), transparent 40%);
  position: sticky;
  top: 0;
}

.sidebar__brand {
  margin-bottom: 28px;
}

.sidebar__brand span {
  display: block;
  color: #b9c9dc;
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 9px;
}

.nav button {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 13px 14px;
  color: #dce8f6;
  background: rgba(255,255,255,0.07);
  cursor: pointer;
  font-weight: 700;
}

.nav button.active,
.nav button:hover {
  color: white;
  background: rgba(255,255,255,0.18);
}

.sidebar__bottom {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
}

.userbox {
  padding: 14px;
  margin-bottom: 12px;
  border-radius: 18px;
  background: rgba(255,255,255,0.09);
}

.userbox span {
  display: block;
  margin-top: 3px;
  color: #bdd0e5;
  font-size: 12px;
}

.workspace {
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  margin-bottom: 22px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 12px 34px rgba(18, 43, 74, 0.08);
}

.topbar h1 {
  font-size: 28px;
}

.topbar__actions {
  display: flex;
  gap: 10px;
}

.content {
  display: grid;
  gap: 18px;
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

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

.card {
  padding: 22px;
}

.stat {
  min-height: 132px;
  overflow: hidden;
  position: relative;
}

.stat::after {
  content: "";
  position: absolute;
  right: -25px;
  bottom: -25px;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.1);
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.stat strong {
  display: block;
  margin-top: 12px;
  color: var(--blue);
  font-size: 30px;
}

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

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid #edf2f8;
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  background: #f7fafd;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

tr:hover td {
  background: #fbfdff;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  background: #e9f2ff;
  color: var(--blue);
}

.badge--green {
  background: #e8f7ef;
  color: var(--green);
}

.badge--red {
  background: #fdeeee;
  color: var(--red);
}

.badge--amber {
  background: #fff4df;
  color: #a46300;
}

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filters {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.filters input,
.filters select {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 10px 12px;
  background: white;
}

.bar {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.bar__label {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.bar__track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef6;
}

.bar__fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue-2), var(--teal));
}

.alert {
  display: grid;
  gap: 6px;
  padding: 14px;
  margin-top: 12px;
  border-radius: 16px;
  color: #6f4200;
  background: #fff5df;
  border: 1px solid #f2d29a;
}

.alert strong {
  color: #a46300;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(12, 28, 48, 0.42);
  z-index: 30;
}

.modal__card {
  width: min(760px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 24px;
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 24px;
}

.wide {
  grid-column: 1 / -1;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  padding: 14px 18px;
  border-radius: 16px;
  color: white;
  background: var(--blue);
  box-shadow: var(--shadow);
  font-weight: 800;
}

.print-title {
  display: none;
}

@media print {
  body {
    background: white;
  }
  .sidebar,
  .topbar__actions,
  .nav,
  .modal,
  .toast,
  .btn,
  .filters {
    display: none !important;
  }
  .app {
    display: block;
  }
  .workspace {
    padding: 0;
  }
  .topbar,
  .card {
    box-shadow: none;
  }
  .print-title {
    display: block;
  }
}

@media (max-width: 980px) {
  .login,
  .app {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: relative;
    min-height: auto;
  }
  .sidebar__bottom {
    position: static;
    margin-top: 22px;
  }
  .grid--4,
  .grid--3,
  .grid--2,
  .form--grid {
    grid-template-columns: 1fr;
  }
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
