/* Hub screens — five tabs at most. Home opens the register directly; Teach,
   Duty, Work and Me are launchpads whose cards come from hub-nav.js. */

/* Five tabs share the bar evenly; the pre-hub items are hidden and never see
   this rule. */
.tab-navigation .tab-item[data-hub] {
    flex: 1 1 0;
}

.hub-screen {
    padding: 18px 15px 110px;
    max-width: 680px;
    margin: 0 auto;
}

.hub-header {
    margin-bottom: 16px;
}

.hub-header .section-title {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hub-blurb {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--text-muted);
}

.hub-cards {
    display: grid;
    gap: 12px;
}

.hub-card {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 15px 16px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 51, 0.08);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hub-card:active {
    transform: scale(0.985);
}

.hub-card-icon {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--bg-mint);
    color: var(--primary-light);
    font-size: 18px;
}

.hub-card-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 auto;
    min-width: 0;
}

.hub-card-label {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-emerald);
}

.hub-card-blurb {
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-muted);
}

.hub-card-chevron {
    flex: 0 0 auto;
    color: #c3c8d6;
    font-size: 14px;
}

.hub-empty {
    padding: 18px;
    border-radius: 16px;
    background: var(--bg-mint);
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
}

/* Sick Bay ward — the admissions trend and the medicine-expiry alert that used
   to sit on the Duty hub. The figures now belong with the ward they describe. */
.sb-range {
    display: inline-flex;
    gap: 2px;
    padding: 2px;
    background: #f1f5f9;
    border-radius: 10px;
}

.sb-range-btn {
    border: none;
    background: transparent;
    color: #64748b;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 8px;
    cursor: pointer;
}

.sb-range-btn.active {
    background: #ffffff;
    color: #0d9488;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}

/* One bar per day, today filled in; the tapped day is outlined. */
.sb-trend {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
}

.sb-trend-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex: 1 1 0;
    min-width: 0;
    padding: 0 0 4px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-family: inherit;
    cursor: pointer;
}

.sb-trend-col.is-selected {
    background: rgba(13, 148, 136, 0.1);
}

.sb-trend-bar {
    width: 100%;
    max-width: 26px;
    border-radius: 6px 6px 3px 3px;
    background: #cbeae7;
}

.sb-trend-bar.is-today {
    background: #0d9488;
}

.sb-trend-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Thirty bars on a phone: tighter, and every other label drops out so the
   strip stays readable rather than a grey smear. */
.sb-trend.is-dense {
    gap: 2px;
}

.sb-trend.is-dense .sb-trend-col {
    gap: 3px;
}

.sb-trend.is-dense .sb-trend-label {
    font-size: 8px;
}

.sb-trend.is-dense .sb-trend-col:nth-child(even) .sb-trend-label {
    visibility: hidden;
}

.sb-trend-detail {
    margin-top: 8px;
    min-height: 17px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    text-align: center;
}

/* Medicine close to expiry — a quiet amber note in the ward. */
.sb-expiry {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 16px;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
}

.sb-expiry i {
    color: #d97706;
    margin-top: 2px;
}

.sb-expiry-text {
    font-size: 12px;
    line-height: 1.45;
    color: #92400e;
}
