* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --navy: #1560b2;
  --white: #ffffff;
  --subtitle: #5f7287;
  --label: rgba(255, 255, 255, 0.96);
  --link: #1d67c4;
  --input-text: #44586d;
  --input-placeholder: #708296;
  --icon: #728396;
  --line: rgba(255, 255, 255, 0.18);
  --btn-top: #2b86eb;
  --btn-bottom: #176fd4;
}

body {
  font-family: Arial, Helvetica, sans-serif;
}

button,
input {
  font: inherit;
}

a {
  text-decoration: none;
}

.login-page {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 28px 16px;
  background: #dbe7f0;
}

.page-bg {
  position: absolute;
  inset: 0;
  background: url("../assets/images/hsp.png") center center / cover no-repeat;
  filter: blur(6px) brightness(0.85);
  transform: scale(1.05);
  z-index: 0;
}

.page-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.04);
  z-index: 1;
}

.page-shell {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px 0;
}

.login-card {
  position: relative;
  width: 100%;
  max-width: 640px;
  padding: 42px 42px 30px;
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(28px);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 28px;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.30),
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.30)
  );
  opacity: 0.25;
  pointer-events: none;
}

.login-header,
.login-form,
.section-line,
.secondary-row,
.trust-row,
.demo-row {
  position: relative;
  z-index: 1;
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
}

.brand-title {
  font-size: 3rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: 0.2px;
  margin-bottom: 16px;
}

.header-divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.35),
    transparent
  );
  margin-bottom: 16px;
}

.portal-title {
  display: inline-block;
  font-size: 2.2rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.98);
  margin-bottom: 12px;
  letter-spacing: 0.2px;
  padding: 6px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  text-shadow:
    0 2px 8px rgba(0, 0, 0, 0.18),
    0 0 1px rgba(255, 255, 255, 0.35);
}
.portal-subtitle {
  max-width: 470px;
  margin: 0 auto;
  color: #53697d;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.45;
}
.login-form {
  margin-top: 4px;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  margin-bottom: 9px;
  color: var(--label);
  font-size: 1rem;
  font-weight: 700;
}

.input-wrap {
  position: relative;
}

.input-wrap input {
  width: 100%;
  height: 58px;
  border: none;
  outline: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.90);
  color: var(--input-text);
  font-size: 1rem;
  font-weight: 600;
  padding: 0 16px 0 48px;
  box-shadow:
    0 2px 8px rgba(99, 120, 141, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.input-wrap input::placeholder {
  color: var(--input-placeholder);
  font-weight: 600;
}

.input-wrap input:focus {
  box-shadow:
    0 0 0 3px rgba(21, 96, 178, 0.12),
    0 6px 12px rgba(99, 120, 141, 0.08);
}

.input-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: var(--icon);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.input-icon svg {
  width: 18px;
  height: 18px;
}

.input-wrap input[type="password"] {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 24px;
  height: 24px;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--icon);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.password-toggle svg {
  width: 18px;
  height: 18px;
}

.password-rules {
  margin-top: 10px;
}

.rules-list {
  list-style: none;
  display: grid;
  gap: 6px;
}

.rule-ok,
.rule-pending {
  font-size: 0.9rem;
  font-weight: 700;
}

.rule-ok {
  color: #0f7b39;
}

.rule-pending {
  color: #5e6f82;
}

.hidden-icon {
  display: none;
}

.utility-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 18px;
  gap: 12px;
}

.remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #f5faff;
  font-size: 0.97rem;
  font-weight: 600;
  cursor: pointer;
}

.remember input {
  width: 16px;
  height: 16px;
  accent-color: var(--navy);
}

.text-link {
  color: var(--link);
  font-size: 0.97rem;
  font-weight: 700;
}

.text-link:hover {
  text-decoration: underline;
}

.strong-link {
  color: #ffffff;
}

.form-message {
  min-height: 20px;
  margin-bottom: 10px;
  color: #b42318;
  font-size: 0.92rem;
  font-weight: 700;
}

.form-message.is-error {
  color: #b42318;
}

.form-message.is-success {
  color: #0f7b39;
}

.form-message.is-info {
  color: #31537a;
}

.form-message-inline {
  margin-bottom: 14px;
}

.otp-step {
  margin-top: 10px;
}

.step-card {
  padding: 22px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 14px 28px rgba(24, 52, 92, 0.10);
}

.step-heading {
  margin-bottom: 14px;
}

.step-title {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.step-subtitle {
  color: #dce8f4;
  font-size: 0.96rem;
  line-height: 1.55;
}

.step-subtitle strong {
  color: #ffffff;
}

.otp-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.otp-input {
  width: 100%;
  height: 62px;
  border: none;
  outline: none;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  color: #163f69;
  font-size: 1.45rem;
  font-weight: 800;
  text-align: center;
  padding: 0;
  box-shadow:
    0 2px 8px rgba(99, 120, 141, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.otp-input:focus {
  box-shadow:
    0 0 0 3px rgba(21, 96, 178, 0.16),
    0 8px 14px rgba(99, 120, 141, 0.10);
}

.otp-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.secondary-btn {
  height: 60px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 12px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 0.98rem;
  font-weight: 800;
  transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.secondary-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
}

.secondary-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.otp-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.step-note {
  color: #dce8f4;
  font-size: 0.9rem;
  font-weight: 600;
}

.inline-btn {
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
}

.inline-btn:hover {
  text-decoration: underline;
}

.flow-banner {
  margin-bottom: 18px;
  padding: 13px 15px;
  border-radius: 14px;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.55;
}

.flow-banner.is-success {
  background: rgba(232, 249, 239, 0.94);
  border: 1px solid rgba(22, 163, 74, 0.24);
  color: #166534;
}

.flow-banner.is-warning {
  background: rgba(255, 247, 237, 0.95);
  border: 1px solid rgba(217, 119, 6, 0.26);
  color: #b45309;
}

.input-wrap input[readonly] {
  background: rgba(255, 255, 255, 0.82);
}

.signin-btn {
  width: 100%;
  height: 60px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  color: #ffffff;
  font-size: 1.12rem;
  font-weight: 800;
  background: linear-gradient(180deg, var(--btn-top), var(--btn-bottom));
  box-shadow:
    0 10px 20px rgba(23, 105, 200, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.signin-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 12px 24px rgba(23, 105, 200, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.signin-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.section-line {
  width: 100%;
  height: 1px;
  background: var(--line);
  margin: 18px 0;
}

.secondary-row,
.trust-row,
.demo-row {
  text-align: center;
}

.secondary-row p {
  color: #f3f8fc;
  font-size: 0.98rem;
  font-weight: 600;
}

.trust-row p {
  color: #f6fbff;
  font-size: 0.92rem;
  font-weight: 500;
  margin-bottom: 6px;
}

.demo-link {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
}

.demo-link:hover {
  text-decoration: underline;
}

@media (max-width: 700px) {
  .login-card {
    max-width: 100%;
    padding: 30px 22px 24px;
    border-radius: 22px;
  }

  .brand-title {
    font-size: 2.3rem;
  }

  .portal-title {
    font-size: 1.7rem;
  }

  .portal-subtitle {
    font-size: 0.95rem;
  }

  .utility-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .otp-grid {
    gap: 8px;
  }

  .otp-input {
    height: 56px;
    font-size: 1.2rem;
  }

  .otp-actions {
    grid-template-columns: 1fr;
  }
}

.role-select {
  width: 100%;
  height: 58px;
  border: none;
  outline: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.90);
  color: var(--input-text);
  font-size: 1rem;
  font-weight: 600;
  padding: 0 16px;
  box-shadow:
    0 2px 8px rgba(99, 120, 141, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
  appearance: none;
}

/*  DASHBOARD PAGES */

/* =========================
   DASHBOARD STYLES
========================= */

.dashboard-page {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 28px 16px;
  background: #dbe7f0;
}

.dashboard-shell {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px 0;
}

.dashboard-card {
  position: relative;
  width: 100%;
  max-width: 1180px;
  padding: 34px;
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow:
    0 24px 50px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.dashboard-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(255,255,255,0.18),
    rgba(255,255,255,0.03),
    rgba(255,255,255,0.18)
  );
  opacity: 0.2;
  pointer-events: none;
}

.dashboard-header,
.stats-grid,
.dashboard-grid,
.wide-panel {
  position: relative;
  z-index: 1;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 26px;
}

.dashboard-title {
  color: #ffffff;
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.dashboard-subtitle {
  color: #dceaf6;
  font-size: 1rem;
  font-weight: 500;
}

.dashboard-user-box {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  font-weight: 700;
}

.mini-btn {
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  color: #ffffff;
  background: linear-gradient(180deg, var(--btn-top), var(--btn-bottom));
  font-weight: 700;
  text-decoration: none;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.stat-box {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  padding: 22px;
}

.stat-box h3 {
  color: #eaf4fb;
  font-size: 1rem;
  margin-bottom: 10px;
}

.stat-box p {
  color: #ffffff;
  font-size: 2rem;
  font-weight: 800;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.panel-box {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  padding: 24px;
}

.panel-box h2 {
  color: #ffffff;
  font-size: 1.3rem;
  margin-bottom: 16px;
}

.wide-panel {
  margin-top: 6px;
}

.action-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.action-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  border: none;
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  color: #ffffff;
  font-weight: 700;
  background: linear-gradient(180deg, var(--btn-top), var(--btn-bottom));
}

.action-btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.alert-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.alert-list li {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.alert-list strong {
  display: block;
  color: #ffffff;
  margin-bottom: 4px;
}

.alert-list span {
  color: #dce8f2;
  font-size: 0.95rem;
}

.scope-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.scope-item {
  background: rgba(255, 255, 255, 0.08);
  color: #eef7ff;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 600;
}

.admin-management-panel[hidden] {
  display: none;
}

.admin-fixed-page {
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  padding: 20px 16px;
}

.admin-fixed-page .dashboard-shell {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 0;
}

.admin-fixed-page .dashboard-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.admin-fixed-page .admin-management-panel {
  min-height: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
}

.admin-panel-header,
.assignment-form,
.admin-action-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-panel-header {
  justify-content: space-between;
  margin-bottom: 18px;
}

.admin-message {
  color: #dceaf6;
  font-size: 0.95rem;
  margin-top: 4px;
}

.admin-message-error {
  color: #ffd6d6;
}

.admin-subsection {
  margin-top: 20px;
}

.admin-subsection h3 {
  color: #ffffff;
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.user-management-hub {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.admin-search {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 13px 14px;
  margin-bottom: 14px;
  color: var(--input-text);
  background: rgba(255, 255, 255, 0.92);
  font-size: 0.98rem;
  font-weight: 700;
}

.admin-scroll-list {
  min-height: 0;
  flex: 1;
  overflow-x: auto;
  overflow-y: auto;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-fixed-page .admin-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(35, 87, 139, 0.96);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  color: #eef7ff;
}

.admin-table th,
.admin-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  vertical-align: middle;
}

.admin-table th {
  color: #ffffff;
  font-size: 0.9rem;
}

.admin-table td,
.admin-table span {
  font-size: 0.92rem;
}

.admin-select {
  min-width: 140px;
  border: none;
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--input-text);
  background: rgba(255, 255, 255, 0.92);
  font-weight: 700;
}

.admin-row-btn {
  padding: 8px 12px;
  border-radius: 9px;
}

.admin-row-btn:disabled,
.admin-select:disabled,
.action-btn:disabled,
.mini-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.status-pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 9px;
  color: #ffffff;
  font-weight: 800;
  text-transform: capitalize;
}

.status-approved {
  background: rgba(22, 163, 74, 0.78);
}

.status-pending {
  background: rgba(217, 119, 6, 0.82);
}

.status-rejected {
  background: rgba(220, 38, 38, 0.78);
}

@media (max-width: 900px) {
  .stats-grid,
  .dashboard-grid,
  .scope-grid,
  .user-management-hub {
    grid-template-columns: 1fr;
  }

  .dashboard-header {
    flex-direction: column;
  }

  .admin-panel-header,
  .assignment-form,
  .admin-action-row {
    align-items: stretch;
    flex-direction: column;
  }
}
.page-bg,
.page-overlay {
  position: fixed;
  inset: 0;
}

.doctor-alert-item {
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease;
}

.doctor-alert-item:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.12);
}

.doctor-case-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.case-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.case-detail-card {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 16px;
}

.case-detail-card h4 {
  color: #dceaf6;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.case-detail-card p {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
}

.doctor-note-box {
  background: rgba(255, 255, 255, 0.09);
  color: #eef7ff;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 600;
}

.secondary-note {
  color: #d6e7f6;
}

@media (max-width: 900px) {
  .case-detail-grid {
    grid-template-columns: 1fr;
  }
}

.role-select {
  width: 100%;
  height: 58px;
  border: none;
  outline: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.90);
  color: var(--input-text);
  font-size: 1rem;
  font-weight: 600;
  padding: 0 16px;
  box-shadow:
    0 2px 8px rgba(99, 120, 141, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.password-rules {
  margin-top: 10px;
}

.rules-list {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rule-ok {
  color: #14532d;
  font-size: 0.92rem;
  font-weight: 600;
}

.rule-pending {
  color: #6b7280;
  font-size: 0.92rem;
  font-weight: 600;
}
.explore-demo {
  margin-top: 10px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);  /* same tone as other text */
  text-align: center;
  cursor: pointer;
  transition: 0.3s;
}

.explore-demo:hover {
  text-decoration: underline;
}
