﻿:root {
  --bg: #f2f3f6;
  --bg-soft: #f7f8fa;
  --text: #151922;
  --muted: #6f7784;
  --line: #e5e8ef;
  --card: #ffffff;
  --red: #d32f2f;
  --red-dark: #bc2525;
  --sidebar: #1e1e1e;
  --sidebar-2: #101923;
  --blue: #2196f3;
  --green: #4caf50;
  --yellow: #ffc107;
  --radius: 14px;
  --shadow: 0 10px 26px rgba(20, 24, 34, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(180deg, #f7f8fa 0, #eef1f7 100%);
  font-family: "Outfit", sans-serif;
}

.app-bg {
  position: fixed;
  border-radius: 999px;
  filter: blur(72px);
  opacity: 0.16;
  z-index: -1;
}

.shape-1 {
  width: 380px;
  height: 380px;
  background: #f14b4b;
  top: -140px;
  left: -120px;
}

.shape-2 {
  width: 420px;
  height: 420px;
  background: #4d98ff;
  top: -180px;
  right: -160px;
}

main {
  width: min(1400px, 97vw);
  margin: 18px auto;
}

h1, h2, h3, h4 {
  margin: 0;
  letter-spacing: -0.02em;
}

p {
  color: var(--muted);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.login-card {
  max-width: 620px;
  margin: 28px auto;
}

.hint {
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 14px 0;
}

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

label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

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

input,
select,
textarea {
  border: 1px solid #d8dee8;
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
  width: 100%;
}

textarea {
  min-height: 80px;
}

.btn {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(115deg, var(--red), var(--red-dark));
}

.btn-light {
  background: #f2f4f8;
  color: #202936;
  border: 1px solid #dde3ef;
}

.btn-danger {
  background: #c92d3f;
  color: #fff;
}

.hidden {
  display: none !important;
}

.app-shell {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 14px;
}

.sidebar {
  color: #f7f9ff;
  border-radius: var(--radius);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: calc(100vh - 36px);
  background:
    radial-gradient(circle at 8% 4%, rgba(255, 255, 255, 0.07), transparent 28%),
    linear-gradient(155deg, #2f0000 0, #1b202d 34%, #121923 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 34px rgba(7, 11, 21, 0.45);
}

.sidebar h2 {
  font-size: 34px;
  line-height: 1;
  color: #fff;
}

.sidebar h2::after {
  content: "";
  display: block;
  width: 112px;
  height: 8px;
  margin-top: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red) 0, rgba(211, 47, 47, 0.06) 100%);
}

.sidebar p {
  color: rgba(235, 240, 249, 0.72);
  font-size: 13px;
}

#menuList {
  display: grid;
  gap: 8px;
}

.menu-btn {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: #f2f6ff;
  text-align: left;
  border-radius: 10px;
  padding: 10px 11px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.menu-btn:hover {
  background: rgba(255, 255, 255, 0.09);
}

.menu-btn.active {
  background: linear-gradient(100deg, #d32f2f 0, #ea4032 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(211, 47, 47, 0.35);
}

.sidebar .btn-light {
  margin-top: auto;
  width: 100%;
  background: rgba(242, 245, 252, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

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

.content-head {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.content-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.content-tools input {
  width: 240px;
}

#sectionContent {
  display: grid;
  gap: 10px;
}

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

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

.dash-hero {
  background: linear-gradient(145deg, #fff 0, #f8fafc 100%);
}

.dash-hero h2 {
  font-size: 40px;
  text-transform: uppercase;
}

.dash-hero h2 span {
  color: var(--red);
}

.dash-tags {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.dash-tags span {
  background: #f7f9fd;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  font-size: 14px;
  font-weight: 600;
}

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

.kpi {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}

.kpi h3 {
  font-size: 38px;
  margin-bottom: 2px;
}

.kpi span {
  color: var(--muted);
  font-size: 14px;
}

.block-title {
  text-transform: uppercase;
  font-size: 21px;
  color: #1f2633;
  margin-bottom: 10px;
}

.patient-card {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: center;
}

.patient-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(145deg, #f9d4d6, #f4b8bc);
  color: #93242d;
  font-weight: 800;
  font-size: 34px;
  display: grid;
  place-items: center;
}

.monitor-timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.monitor-step {
  border: 1px dashed #d9deea;
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
  background: #fcfdff;
}

.monitor-step .dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  margin: 0 auto 6px;
  background: #adb5c2;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}

.monitor-step.active {
  border-color: rgba(76, 175, 80, 0.45);
  background: #f3fbf4;
}

.monitor-step.active .dot {
  background: var(--green);
}

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

.item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: #fcfdff;
}

.item-clickable {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.item-clickable:hover {
  transform: translateY(-1px);
  border-color: #c8d2e4;
  box-shadow: 0 10px 18px rgba(18, 24, 36, 0.08);
}

.item small {
  color: var(--muted);
}

.item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  background: #e9f4ff;
  color: #185a9a;
  font-weight: 700;
}

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

.alert-item {
  border-left: 4px solid #f0a31e;
  background: #fffdf7;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  border-radius: 10px;
  padding: 10px 13px;
  color: #fff;
  background: #212a39;
  z-index: 40;
}

.toast.error {
  background: #bf2434;
}

.detail-panel {
  border-left: 4px solid var(--red);
}

@media (max-width: 1200px) {
  .dash-tags,
  .dash-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dash-hero h2 {
    font-size: 32px;
  }
}

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

  .sidebar {
    min-height: auto;
  }

  .grid-2,
  .grid-3,
  .dash-kpi-grid,
  .dash-tags,
  .monitor-timeline {
    grid-template-columns: 1fr;
  }

  .content-tools {
    width: 100%;
    justify-content: flex-end;
  }

  .content-tools input {
    width: 100%;
  }
}
