/* =========================================================
   Pulse Alert — Portal Role-Selection Page
   Pixel-accurate match to the design reference.
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  --portal-bg: #dcebf2;
  --color-ink: #050505;
  --color-brand: #8d1018;
  --color-subtitle: #d4803a;

  --card-admin-bg: #5a3035;
  --card-doctor-bg: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 57.21%, rgba(102, 102, 102, 0.15) 85%),
    linear-gradient(0deg, #020544, #020544);
  --card-nurse-bg: #354044;
  --card-border: rgba(160, 150, 148, 0.55);
  --card-radius: 1rem;

  --font-body: "Inter", sans-serif;
  --font-accent: "Libre Caslon Text", serif;
}

.portal__notice {
  width: min(100%, 42rem);
  margin: 1.25rem auto 0;
  padding: 0.9rem 1rem;
  border: 1px solid #e5b3b3;
  border-radius: 0.6rem;
  background: #fff4f4;
  color: #790004;
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: center;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;

  font-family: var(--font-body);
  color: var(--color-ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* =========================================================
   PORTAL CONTAINER
   ========================================================= */
.portal {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  color: var(--color-ink);
}

/* ---------- Top bar ---------- */
.portal__topbar {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 2.5rem 2rem 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

/* ---------- PULSE ALERT logo ---------- */
.brand-logo {
  position: relative;
  display: inline-block;
  width: 8rem;
  height: 8rem;
  background: transparent;
}

.brand-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
}

/* =========================================================
   MAIN CONTENT
   ========================================================= */
.portal__main {
  width: 100%;
  max-width: 960px;
  margin: 2.8rem auto 0;
  padding: 0 2rem 4rem;
  flex: 1;
}

.portal__title {
  text-align: center;
  font-size: clamp(1.85rem, 3.4vw, 2.65rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--color-ink);
}

.portal__subtitle {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-subtitle);
  letter-spacing: 0.01em;
}

/* =========================================================
   ROLE CARDS GRID
   ========================================================= */
.role-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 3.5rem;
}

/* ---------- Individual card ---------- */
.role-card {
  position: relative;
  min-height: 22rem;
  padding: 1.8rem 1.5rem 1.4rem;
  border-radius: var(--card-radius);
  border: 1.5px solid var(--card-border);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.10),
    0 8px 24px rgba(0, 0, 0, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}

.role-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.14),
    0 16px 40px rgba(0, 0, 0, 0.10);
}

/* Card color variants — darker top, lighter bottom matching screenshot */
.card--admin {
  background: linear-gradient(180deg, #4e2328 0%, #7d454a 100%);
}

.card--doctor {
  background: var(--card-doctor-bg);
}

.card--nurse {
  background: linear-gradient(180deg, #2b3538 0%, #4e5c60 100%);
}

/* Card body */
.role-card__body {
  position: relative;
  z-index: 1;
  margin-bottom: 1rem;
}

.role-card__icon {
  align-self: flex-start;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1.25rem;
  object-fit: contain;
}

.role-card__title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.role-card__subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.3;
  opacity: 0.85;
}

/* Arrow */
.role-card__arrow {
  position: relative;
  z-index: 1;
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: var(--color-ink);
  transition: transform 0.2s ease;
}

.role-card:hover .role-card__arrow {
  transform: translateX(3px);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {

  .portal__topbar,
  .portal__main {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .role-grid {
    gap: 1.5rem;
  }
}

@media (max-width: 680px) {
  .portal {
    background-position: center center;
    background-size: cover;
  }

  .portal__topbar {
    padding-top: 1rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .brand-logo {
    width: 6rem;
    height: 6rem;
  }

  .portal__main {
    margin-top: 1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: 2rem;
  }

  .role-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-top: 2rem;
  }

  .role-card {
    min-height: 11rem;
  }

  .portal__title {
    font-size: 1.65rem;
  }

  .role-card {
    min-height: 10rem;
  }

  .role-card__icon {
    width: 3rem;
    height: 3rem;
  }
}