/* Iftakhar Memorial Hospital — the pages people interact with.
 *
 * Loaded after site.css on the reviews, staff and software pages only, so the
 * static pages stay as light as they were. Everything here uses the same
 * tokens as the rest of the site: navy ink, the emblem's teal, the gold flame.
 */

/* ------------------------------------------------------------ header account */
.account {
  display: inline-flex; align-items: center; gap: .6rem;
}
.account__avatar {
  width: 26px; height: 26px; border-radius: 50%; object-fit: cover;
  border: 1px solid rgba(255,255,255,.35); background: var(--teal-700);
}
.account__initial {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--teal-600); color: #fff; font-weight: 700; font-size: .78rem;
}
.account__sep { display: inline-block; width: 1px; height: 16px; background: rgba(255,255,255,.18); }
.account__link--owner { color: var(--gold-300); }

/* ------------------------------------------------------------------- reviews */
.rv-hero {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center; background: #fff; border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg); padding: clamp(1.4rem, 3vw, 2rem);
  box-shadow: var(--shadow-card); margin-bottom: 1.75rem;
}
@media (max-width: 640px) { .rv-hero { grid-template-columns: 1fr; } }

.rv-score { text-align: center; min-width: 140px; }
.rv-score__value {
  font-family: var(--font-display); font-weight: 800; line-height: 1;
  font-size: clamp(2.8rem, 2rem + 3vw, 3.8rem); color: var(--ink-900);
}
.rv-score__out { color: var(--ink-400); font-size: 1rem; font-weight: 600; }
.rv-score__count { font-size: .9rem; color: var(--ink-500); margin-top: .35rem; }

.rv-stars { display: inline-flex; gap: .12em; line-height: 1; }
.rv-stars svg { width: 1em; height: 1em; }
.rv-stars--lg { font-size: 1.35rem; }
.rv-stars--sm { font-size: .95rem; }
.rv-star { fill: var(--gold-500); }
.rv-star--empty { fill: var(--ink-200); }

.rv-bars { display: grid; gap: .45rem; }
.rv-bar { display: grid; grid-template-columns: 2.6rem 1fr 2.2rem; gap: .7rem; align-items: center; }
.rv-bar__label { font-size: .85rem; color: var(--ink-600); font-weight: 600; white-space: nowrap; }
.rv-bar__track { display: block; height: 9px; border-radius: 999px; background: var(--ink-100); overflow: hidden; }
.rv-bar__fill {
  display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--teal-600), var(--teal-400));
  transition: width .6s cubic-bezier(.2,.7,.3,1);
}
.rv-bar__count { font-size: .85rem; color: var(--ink-500); text-align: right; font-variant-numeric: tabular-nums; }

.rv-list { display: grid; gap: 1rem; }
.rv-card {
  background: #fff; border: 1px solid var(--ink-200); border-radius: var(--radius);
  padding: 1.35rem 1.5rem; box-shadow: var(--shadow-card);
  transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}
.rv-card:hover { box-shadow: var(--shadow-lift); border-color: var(--teal-200); transform: translateY(-2px); }
.rv-card__top { display: flex; gap: .9rem; align-items: center; margin-bottom: .85rem; }
.rv-avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--teal-700), var(--teal-500)); color: #fff;
  font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; overflow: hidden;
}
.rv-avatar img { width: 100%; height: 100%; object-fit: cover; }
.rv-who { min-width: 0; }
.rv-name { font-family: var(--font-display); font-weight: 700; color: var(--ink-900); line-height: 1.3; }
.rv-when { font-size: .84rem; color: var(--ink-500); }
.rv-card__right { margin-left: auto; text-align: right; }
.rv-title { font-family: var(--font-display); font-weight: 700; color: var(--ink-800); margin: 0 0 .3rem; font-size: 1.05rem; }
.rv-body { margin: 0; color: var(--ink-700); white-space: pre-wrap; overflow-wrap: anywhere; }

.rv-empty {
  border: 1px dashed var(--ink-300); border-radius: var(--radius); padding: 2.5rem 1.5rem;
  text-align: center; color: var(--ink-500); background: var(--ink-50);
}
.rv-empty strong { display: block; color: var(--ink-800); font-family: var(--font-display); margin-bottom: .35rem; }

/* star picker -------------------------------------------------------------- */
.starpick { display: flex; gap: .25rem; margin-bottom: .35rem; }
.starpick input { position: absolute; opacity: 0; width: 0; height: 0; }
.starpick label {
  cursor: pointer; padding: .15rem; line-height: 0; color: var(--ink-200);
  transition: transform .12s ease, color .12s ease;
  min-width: 44px; min-height: 44px; display: grid; place-items: center;
}
/* Hovering the row previews the rating, the way a star control should. */
.starpick:hover label { color: var(--gold-300); }
.starpick label:hover ~ label { color: var(--ink-200); }
.starpick label svg { width: 34px; height: 34px; fill: currentColor; }
.starpick label:hover { transform: scale(1.12); }
.starpick.is-1 label:nth-of-type(-n+1),
.starpick.is-2 label:nth-of-type(-n+2),
.starpick.is-3 label:nth-of-type(-n+3),
.starpick.is-4 label:nth-of-type(-n+4),
.starpick.is-5 label:nth-of-type(-n+5) { color: var(--gold-500); }
.starpick input:focus-visible + label { outline: 3px solid var(--teal-300); outline-offset: 2px; border-radius: 6px; }
.starpick__hint { font-size: .88rem; color: var(--ink-500); min-height: 1.2em; }

.counter { font-size: .8rem; color: var(--ink-400); text-align: right; margin-top: .3rem; }
.counter--warn { color: var(--gold-600); }

.rv-mine { margin-top: 1.75rem; border-top: 1px solid var(--ink-200); padding-top: 1.25rem; }
.rv-mine h3 { font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-500); }
.rv-mine__item { border: 1px solid var(--ink-200); border-radius: 12px; padding: .9rem 1rem; margin-top: .7rem; }

.pill {
  display: inline-flex; align-items: center; gap: .35rem; font-size: .74rem; font-weight: 700;
  border-radius: 999px; padding: .2rem .65rem; text-transform: uppercase; letter-spacing: .05em;
}
.pill--pending  { background: #fff4d6; color: #8d4a1e; }
.pill--approved { background: #e8f7ee; color: #1c6b3f; }
.pill--rejected { background: #fdeaea; color: var(--red-700); }
.pill--new      { background: var(--teal-50); color: var(--teal-700); }
.pill--read     { background: var(--ink-100); color: var(--ink-600); }
.pill--archived { background: var(--ink-100); color: var(--ink-500); }
.pill__dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ------------------------------------------------------------------- staff */
.ad-top {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center;
  justify-content: space-between; margin-bottom: 1.75rem;
}
.ad-top h1 { margin: 0; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.1rem); }
.ad-top__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.ad-top__sub { color: var(--ink-500); font-size: .95rem; margin: .2rem 0 0; }

.ad-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.75rem; }
.ad-tile {
  background: #fff; border: 1px solid var(--ink-200); border-radius: var(--radius);
  padding: 1.1rem 1.25rem; box-shadow: var(--shadow-card); position: relative; overflow: hidden;
}
.ad-tile::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--ink-300); }
.ad-tile--action::before { background: linear-gradient(180deg, var(--gold-500), var(--gold-300)); }
.ad-tile--good::before   { background: linear-gradient(180deg, var(--teal-600), var(--teal-400)); }
.ad-tile__label { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-500); font-weight: 700; }
.ad-tile__value { font-family: var(--font-display); font-weight: 800; font-size: 2rem; color: var(--ink-900); line-height: 1.1; margin-top: .3rem; }
.ad-tile__note { font-size: .84rem; color: var(--ink-500); margin-top: .1rem; }

.segmented {
  display: inline-flex; flex-wrap: wrap; gap: .25rem; background: var(--ink-100);
  padding: .3rem; border-radius: 999px; margin-bottom: 1.5rem;
}
.segmented button {
  border: 0; background: transparent; border-radius: 999px; padding: .5rem 1rem;
  font: inherit; font-weight: 600; font-size: .92rem; color: var(--ink-600); cursor: pointer;
  display: inline-flex; align-items: center; gap: .45rem; transition: background .15s ease, color .15s ease;
}
.segmented button:hover { color: var(--ink-900); }
.segmented button[aria-selected="true"] { background: #fff; color: var(--ink-900); box-shadow: var(--shadow-card); }
.segmented .badge {
  background: var(--red-600); color: #fff; border-radius: 999px; font-size: .72rem;
  font-weight: 700; padding: .05rem .4rem; min-width: 1.15rem; text-align: center;
}

.ad-item {
  background: #fff; border: 1px solid var(--ink-200); border-radius: var(--radius);
  padding: 1.25rem 1.4rem; box-shadow: var(--shadow-card);
}
.ad-item__top { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: .8rem; }
.ad-item__who { min-width: 0; }
.ad-item__name { font-family: var(--font-display); font-weight: 700; color: var(--ink-900); }
.ad-item__mail { font-size: .85rem; color: var(--ink-500); overflow-wrap: anywhere; }
.ad-item__right { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.ad-item__body { color: var(--ink-700); white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.ad-item__subject { font-family: var(--font-display); font-weight: 700; color: var(--ink-800); margin: 0 0 .3rem; }
.ad-item__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--ink-100); }

.ad-empty {
  border: 1px dashed var(--ink-300); border-radius: var(--radius); background: var(--ink-50);
  padding: 3rem 1.5rem; text-align: center; color: var(--ink-500);
}
.ad-empty svg { width: 42px; height: 42px; color: var(--ink-300); margin-bottom: .75rem; }
.ad-empty strong { display: block; font-family: var(--font-display); color: var(--ink-800); margin-bottom: .3rem; }

/* loading placeholders ----------------------------------------------------- */
.skeleton { border-radius: var(--radius); background: var(--ink-100); position: relative; overflow: hidden; }
.skeleton--card { height: 120px; margin-bottom: 1rem; }
.skeleton::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.75), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .skeleton::after { animation: none; } }

/* toast -------------------------------------------------------------------- */
.toast-host { position: fixed; right: 1rem; bottom: 1rem; z-index: 200; display: grid; gap: .5rem; }
.toast {
  background: var(--ink-900); color: #fff; border-radius: 12px; padding: .8rem 1.1rem;
  box-shadow: var(--shadow-lift); font-size: .93rem; max-width: 22rem;
  animation: toast-in .25s ease-out both;
}
.toast--error { background: var(--red-700); }
.toast--success { background: #1c6b3f; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

.btn--danger { background: #fff; color: var(--red-700); border-color: #f3c9c9; }
.btn--danger:hover { background: #fdeaea; border-color: var(--red-600); }
