:root {
  --page: #f4f7fc;
  --panel: #ffffff;
  --ink: #0b1f4d;
  --text: #18324a;
  --muted: #71809a;
  --blue: #1261dc;
  --blue-dark: #0b43aa;
  --blue-soft: #eaf2ff;
  --teal: #17a9a5;
  --purple: #8258e8;
  --border: #dbe4f1;
  --soft: #f7faff;
  --good: #15835a;
  --warn: #bd7112;
  --danger: #b43a49;
  --shadow: 0 22px 70px rgba(30, 66, 125, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page);
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: var(--page);
  color: var(--text);
}

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

button {
  -webkit-tap-highlight-color: transparent;
}

.hidden {
  display: none !important;
}

/* Login */
.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 16px;
  padding: 16px 18px 10px;
  background:
    radial-gradient(circle at 14% 4%, rgba(85, 160, 255, 0.13), transparent 28rem),
    linear-gradient(135deg, #f8fbff 0%, #f1f5fb 100%);
}

.login-shell {
  width: min(1480px, 100%);
  min-height: min(830px, calc(100vh - 58px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 51% 49%;
  overflow: hidden;
  border: 1px solid rgba(193, 210, 234, 0.72);
  border-radius: 26px;
  background: #eef4ff;
  box-shadow: 0 14px 50px rgba(45, 78, 130, 0.06);
}

.brand-panel {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(222, 237, 255, 0.75), rgba(213, 233, 255, 0.92)),
    linear-gradient(135deg, #e6f2ff, #cfe6ff);
}

.brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(25, 105, 212, 0.12) 1.4px, transparent 1.4px);
  background-size: 18px 18px;
  mask-image: radial-gradient(circle at 83% 18%, #000, transparent 26%);
  pointer-events: none;
}

.brand-copy {
  position: relative;
  z-index: 2;
  padding: clamp(38px, 6vh, 70px) clamp(38px, 6vw, 86px) 0;
}

.brand-lockup {
  display: flex;
  align-items: flex-start;
  gap: 22px;
}

.brand-lockup h1 {
  margin: 0 0 7px;
  color: #0b2861;
  font-size: clamp(35px, 3.3vw, 52px);
  line-height: 1;
  letter-spacing: -0.035em;
}

.brand-lockup p {
  margin: 0;
  color: #0f234d;
  font-size: clamp(16px, 1.35vw, 20px);
  font-weight: 650;
  line-height: 1.45;
}

.health-logo {
  position: relative;
  width: 84px;
  height: 69px;
  flex: 0 0 84px;
}

.logo-heart {
  position: absolute;
  inset: -17px auto auto 0;
  color: #1763d9;
  font-size: 87px;
  line-height: 1;
  text-shadow: 0 7px 15px rgba(23, 99, 217, 0.12);
}

.logo-pulse {
  position: absolute;
  left: 21px;
  top: 18px;
  z-index: 2;
  color: #fff;
  font-size: 44px;
  font-weight: 900;
  transform: rotate(-7deg);
}

.logo-plus {
  position: absolute;
  right: -4px;
  bottom: -4px;
  z-index: 3;
  color: #17a9a5;
  font-size: 50px;
  font-weight: 900;
  line-height: 1;
  filter: drop-shadow(0 5px 8px rgba(23, 169, 165, 0.18));
}

.health-logo.compact {
  width: 46px;
  height: 38px;
  flex-basis: 46px;
}

.health-logo.compact .logo-heart {
  inset: -10px auto auto 0;
  font-size: 50px;
}

.health-logo.compact .logo-plus {
  right: -2px;
  bottom: -4px;
  font-size: 29px;
}

.brand-rule {
  width: 48px;
  height: 4px;
  margin: 28px 0 20px 107px;
  border-radius: 99px;
  background: var(--blue);
}

.brand-message {
  margin: 0 0 0 107px;
  color: #506681;
  font-size: 17px;
  font-weight: 550;
  line-height: 1.55;
}

.hero-art {
  position: absolute;
  inset: 24% 0 95px;
  z-index: 1;
}

.hero-art::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 30%;
  background: linear-gradient(180deg, transparent, rgba(210, 232, 255, 0.72));
}

.hero-art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center bottom;
}

.decor-cross {
  position: absolute;
  z-index: 3;
  color: rgba(25, 105, 212, 0.09);
  font-size: 96px;
  font-weight: 900;
}

.cross-one {
  top: 0;
  right: 11%;
}

.cross-two {
  top: 26%;
  right: 4%;
  font-size: 46px;
}

.benefit-strip {
  position: absolute;
  z-index: 5;
  left: 38px;
  right: 38px;
  bottom: 42px;
  min-height: 112px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  gap: 16px;
  padding: 24px 28px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 46px rgba(33, 74, 133, 0.11);
  backdrop-filter: blur(12px);
}

.benefit-item {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.benefit-icon {
  width: 37px;
  height: 37px;
  flex: 0 0 37px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  font-size: 20px;
  font-weight: 900;
}

.shield-icon {
  border-radius: 11px 11px 16px 16px;
  background: linear-gradient(145deg, #1d73ea, #1456c3);
}

.time-icon {
  background: linear-gradient(145deg, #28c3bc, #159691);
}

.care-icon {
  background: linear-gradient(145deg, #976ff1, #6e46d2);
}

.benefit-item strong,
.benefit-item small {
  display: block;
}

.benefit-item strong {
  margin-bottom: 5px;
  color: #132647;
  font-size: 12px;
}

.benefit-item small {
  color: #708097;
  font-size: 10.5px;
  line-height: 1.45;
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: clamp(30px, 5vw, 70px);
  background:
    radial-gradient(circle at 94% 8%, rgba(93, 142, 228, 0.1), transparent 22rem),
    #f1f5fd;
}

.login-card {
  width: min(540px, 100%);
  padding: clamp(35px, 5vh, 58px) clamp(34px, 4vw, 56px) 40px;
  border: 1px solid rgba(224, 230, 241, 0.92);
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.mobile-brand {
  display: none;
  align-items: center;
  gap: 11px;
  margin-bottom: 26px;
  color: var(--ink);
  font-size: 22px;
}

.auth-heading {
  margin-bottom: 37px;
  text-align: center;
}

.auth-heading .eyebrow {
  display: none;
  margin-bottom: 9px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.15em;
}

.auth-heading h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: clamp(29px, 2.6vw, 38px);
  letter-spacing: -0.035em;
}

.auth-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.form-stack {
  display: grid;
  text-align: left;
}

.field-label {
  margin: 0 0 10px;
  color: #142345;
  font-size: 14px;
  font-weight: 800;
}

.field-label:not(:first-child) {
  margin-top: 24px;
}

.input-wrap {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 15px;
  border: 1px solid #d3dce9;
  border-radius: 12px;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.input-wrap:focus-within {
  border-color: #5c91e9;
  box-shadow: 0 0 0 4px rgba(35, 105, 220, 0.1);
  transform: translateY(-1px);
}

.input-icon {
  width: 24px;
  color: #526176;
  font-size: 24px;
  line-height: 1;
  text-align: center;
}

.input-wrap input {
  min-width: 0;
  flex: 1;
  margin: 0;
  padding: 15px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
}

.input-wrap input::placeholder {
  color: #9aa6b8;
}

.icon-button,
.text-button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.icon-button {
  width: 38px;
  height: 38px;
  padding: 0;
  color: #5d687a;
  font-size: 20px;
}

.text-button {
  padding: 3px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}

.text-button:hover {
  color: var(--blue-dark);
  text-decoration: underline;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin: 21px 0 29px;
}

.remember-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #637187;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.remember-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--blue);
}

.primary-btn,
.secondary-btn,
.role-switch-btn {
  border: 0;
  border-radius: 12px;
  padding: 13px 17px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.primary-btn {
  background: linear-gradient(95deg, #2b78ee, #1056d7);
  color: #fff;
  box-shadow: 0 12px 24px rgba(26, 94, 218, 0.2);
}

.primary-btn:hover {
  background: linear-gradient(95deg, #1d6fe9, #0a49c2);
  box-shadow: 0 16px 28px rgba(26, 94, 218, 0.27);
  transform: translateY(-1px);
}

.primary-btn:active,
.role-switch-btn:active,
.secondary-btn:active {
  transform: translateY(1px);
}

.login-btn {
  min-height: 54px;
  font-size: 16px;
}

.login-btn span,
.role-switch-btn > span {
  margin-right: 9px;
  font-size: 23px;
  vertical-align: -2px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 28px 0;
  color: #7d8797;
  font-size: 13px;
  font-weight: 700;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #e2e7ef;
}

.role-switch-btn {
  min-height: 54px;
  border: 1.5px solid #79a4eb;
  background: #fff;
  color: #1556bf;
  font-size: 15px;
}

.role-switch-btn:hover {
  border-color: #2a70dd;
  background: #f6f9ff;
}

.role-chooser {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #dbe6f6;
  border-radius: 14px;
  background: #f7faff;
}

.role-chooser > p {
  margin: 0 0 11px;
  color: #6e7c92;
  font-size: 12px;
  line-height: 1.45;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.role-option {
  min-height: 70px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 10px 8px;
  border: 1px solid #d5e2f6;
  border-radius: 10px;
  background: #fff;
  color: #17315a;
  cursor: pointer;
}

.role-option:hover,
.role-option.selected {
  border-color: #4f8ae8;
  background: var(--blue-soft);
}

.role-option small {
  color: #78869b;
  font-size: 9px;
}

.account-note {
  margin: 29px 0 0;
  color: #7d8898;
  font-size: 14px;
  text-align: center;
}

.login-footer {
  color: #77859b;
  font-size: 12px;
  text-align: center;
}

/* Application */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 274px 1fr;
  background: #f4f7fb;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 24px 20px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 8% 100%, rgba(29, 119, 235, 0.2), transparent 18rem),
    linear-gradient(180deg, #102c5d 0%, #0a1f45 100%);
  color: #fff;
  box-shadow: 10px 0 40px rgba(12, 39, 81, 0.09);
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px 7px 8px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border-radius: 22px;
  background: linear-gradient(145deg, var(--blue), var(--teal));
  color: white;
  font-size: 34px;
  font-weight: 800;
}

.brand-mark.small {
  width: 44px;
  height: 44px;
  margin: 0;
  border-radius: 14px;
  font-size: 19px;
}

.sidebar nav {
  display: grid;
  gap: 7px;
}

.nav-item {
  min-height: 45px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #bfd0eb;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.nav-item:hover,
.nav-item.active {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.sidebar .secondary-btn {
  margin-top: auto;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.main {
  min-width: 0;
  padding: clamp(22px, 3vw, 38px);
  overflow: auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  margin-bottom: 25px;
}

.topbar h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(27px, 2.5vw, 36px);
  letter-spacing: -0.035em;
}

.topbar p {
  margin: 7px 0 0;
  color: var(--muted);
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  border: 1px solid #e3e8f1;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 7px 25px rgba(32, 69, 84, 0.07);
}

#roleBadge {
  padding: 6px 10px;
  border-radius: 999px;
  background: #e8f1ff;
  color: #1d5dbc;
  font-size: 11px;
  font-weight: 900;
}

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

.kpi-card,
.panel {
  border: 1px solid #e1e7f0;
  border-radius: 19px;
  background: var(--panel);
  box-shadow: 0 9px 30px rgba(38, 63, 91, 0.055);
}

.kpi-card {
  position: relative;
  min-height: 142px;
  padding: 22px;
  overflow: hidden;
}

.kpi-card::after {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  right: -28px;
  top: -28px;
  border-radius: 50%;
  background: rgba(26, 101, 220, 0.08);
}

.kpi-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.kpi-card strong {
  display: block;
  margin: 9px 0 3px;
  color: var(--ink);
  font-size: 38px;
}

.kpi-card small {
  color: #8995a8;
}

.split-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.split-grid.wide-left {
  grid-template-columns: 1fr 1.3fr;
}

.panel {
  padding: 22px;
  overflow: auto;
}

.panel h3 {
  margin: 0 0 17px;
  color: #1a2f4f;
  font-size: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

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

th {
  color: #768399;
  font-size: 10.5px;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
  line-height: 1.45;
}

label {
  color: #274553;
  font-size: 12px;
  font-weight: 750;
}

.grid-form input,
.grid-form select,
.grid-form textarea,
.search {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border: 1px solid #dbe4ef;
  border-radius: 11px;
  outline: 0;
  background: white;
  font-size: 13px;
}

.grid-form input:focus,
.grid-form select:focus,
.grid-form textarea:focus,
.search:focus {
  border-color: #6c9eea;
  box-shadow: 0 0 0 3px rgba(55, 118, 220, 0.09);
}

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

.secondary-btn {
  background: #eaf1fb;
  color: #174e9d;
}

.secondary-btn:hover {
  background: #dce9fb;
}

.status {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.Pending {
  background: #fff4df;
  color: #9a5e00;
}

.Confirmed {
  background: #e5f1ff;
  color: #1766a4;
}

.Completed {
  background: #e3f7ec;
  color: #1d7645;
}

.Cancelled {
  background: #ffe8e8;
  color: #a53636;
}

.clean-list {
  color: #526276;
  line-height: 1.85;
}

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

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

.grid-form .primary-btn {
  align-self: end;
}

.search {
  margin-bottom: 12px;
}

.action-link {
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: #edf4ff;
  color: #1d5dbc;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.action-link:hover {
  background: #dceaff;
}

.view {
  display: none;
}

.active-view {
  display: block;
}

.toast {
  position: fixed;
  right: 22px;
  top: 22px;
  z-index: 100;
  max-width: min(390px, calc(100vw - 44px));
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 13px;
  background: #102a55;
  color: #fff;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
  font-size: 13px;
}

.report-bars {
  display: grid;
  gap: 16px;
  max-width: 760px;
}

.bar-row {
  display: grid;
  grid-template-columns: 160px 1fr 60px;
  gap: 12px;
  align-items: center;
}

.bar {
  height: 17px;
  overflow: hidden;
  border-radius: 99px;
  background: #dce7f4;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #246de0, #3cc0c3);
}

.privacy-note {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #cfe0f3;
  border-radius: 11px;
  background: #f0f7ff;
  color: #315869;
  font-size: 12px;
  line-height: 1.45;
}

.section-gap {
  margin-top: 24px !important;
}

.action-link + .action-link {
  margin-left: 6px;
}

input:invalid:not(:placeholder-shown) {
  border-color: #d28b22;
}

@media (max-width: 1180px) {
  .login-shell {
    grid-template-columns: 46% 54%;
  }

  .brand-copy {
    padding-inline: 40px;
  }

  .brand-rule,
  .brand-message {
    margin-left: 0;
  }

  .benefit-strip {
    left: 24px;
    right: 24px;
    gap: 10px;
    padding: 20px;
  }

  .benefit-item {
    gap: 8px;
  }

  .benefit-item strong {
    font-size: 11px;
  }

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

@media (max-width: 900px) {
  .login-screen {
    padding: 0;
  }

  .login-shell {
    min-height: calc(100vh - 35px);
    grid-template-columns: 1fr;
    border: 0;
    border-radius: 0 0 24px 24px;
  }

  .brand-panel {
    display: none;
  }

  .auth-panel {
    padding: 28px 18px;
  }

  .login-card {
    padding: 32px 28px;
  }

  .mobile-brand {
    display: flex;
  }

  .auth-heading .eyebrow {
    display: inline-block;
  }

  .login-footer {
    padding: 0 0 8px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    gap: 14px;
    padding: 15px;
  }

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

  .nav-item {
    text-align: center;
  }

  .sidebar .secondary-btn {
    margin-top: 0;
  }

  .split-grid,
  .split-grid.wide-left {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .auth-panel {
    align-items: start;
    padding: 18px 12px;
  }

  .login-card {
    padding: 26px 20px 30px;
    border-radius: 20px;
  }

  .auth-heading {
    margin-bottom: 28px;
  }

  .auth-heading h2 {
    font-size: 30px;
  }

  .role-grid {
    grid-template-columns: 1fr;
  }

  .role-option {
    min-height: 58px;
  }

  .form-options {
    margin-bottom: 24px;
  }

  .main {
    padding: 18px 13px 28px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .grid-form {
    grid-template-columns: 1fr;
  }

  .grid-form .full {
    grid-column: auto;
  }

  .sidebar nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .nav-item {
    min-width: 150px;
  }

  .bar-row {
    grid-template-columns: 120px 1fr 34px;
    font-size: 11px;
  }
}
