/* Login + attending portal */

.login-page {
    min-height: 100vh;
    margin: 0;
    background: #eef1f5;
}

.login-layout {
    display: flex;
    min-height: 100vh;
}

.login-brand-panel {
    flex: 1;
    background: linear-gradient(160deg, #0c1929 0%, #1a3352 50%, #23466b 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.login-brand-content {
    max-width: 400px;
}

.login-brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.login-brand-mark .brand-vital-mark {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    line-height: 1;
}

.login-brand-mark .brand-vital-mark i {
    font-size: 1.15rem;
}

.login-brand-content h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
}

.login-brand-content > p {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.login-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.login-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.login-features i {
    color: #5eead4;
}

.login-form-panel {
    flex: 0 0 440px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #eef1f5;
}

.login-card {
    width: 100%;
    max-width: 380px;
    background: #fff;
    border-radius: 14px;
    padding: 2rem;
    border: 1px solid #dde3ea;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
}

.login-card-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.login-card-subtitle {
    color: #64748b;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .login-layout {
        flex-direction: column;
    }

    .login-brand-panel {
        padding: 2rem 1.5rem;
    }

    .login-brand-content h1 {
        font-size: 1.35rem;
    }

    .login-features {
        display: none;
    }

    .login-form-panel {
        flex: 1;
        padding: 1.5rem;
    }
}

.portal-body {
    background: #eef1f5;
    min-height: 100vh;
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
}

.portal-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #0c1929;
    color: #fff;
    padding: 0.85rem 1rem;
    padding-top: calc(0.85rem + env(safe-area-inset-top));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.portal-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.portal-brand {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.portal-brand .brand-vital-mark {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    line-height: 1;
    flex-shrink: 0;
}

.portal-brand .brand-vital-mark i {
    font-size: 1.05rem;
}

.portal-user {
    font-size: 0.8rem;
    opacity: 0.9;
    max-width: 45%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-main {
    padding: 1rem;
    max-width: 640px;
    margin: 0 auto;
}

.portal-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 200;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}

.portal-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.5rem 0.25rem;
    font-size: 0.65rem;
    color: #64748b;
    text-decoration: none;
}

.portal-nav-item i {
    font-size: 1.25rem;
}

.portal-nav-item.active {
    color: #23466b;
    font-weight: 600;
}

.portal-footer-actions {
    text-align: center;
    padding-bottom: 0.5rem;
    margin-top: -4.5rem;
}

.portal-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.25rem 0.75rem;
    background: #fff;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: #1e293b;
    font-weight: 600;
    font-size: 0.85rem;
    height: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.portal-action-card i {
    font-size: 1.75rem;
    color: #23466b;
}

.portal-action-card-wide {
    flex-direction: row;
    justify-content: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.15rem;
    text-align: left;
}

.portal-action-card-wide i {
    flex-shrink: 0;
}

.portal-action-card-hint {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: #64748b;
    margin-top: 0.15rem;
}

.portal-cell-mine {
    background: #dbeafe !important;
    box-shadow: inset 0 0 0 2px #2563eb;
}

.portal-schedule-scroll .week-col-end {
    min-width: 3.25rem;
    font-size: 0.7rem;
    white-space: nowrap;
}

.portal-week-list .list-group-item {
    padding: 0.85rem 1rem;
}

.portal-week-unavailable {
    background: #fef2f2;
}

.portal-shift-list .list-group-item {
    padding: 1rem;
}

.sticky-save {
    position: sticky;
    bottom: 5.5rem;
    z-index: 50;
}

.portal-schedule-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.portal-schedule-scroll .week-col {
    position: sticky;
    left: 0;
    background: #f8fafc;
    z-index: 2;
    min-width: 3.5rem;
}

.portal-schedule-scroll .unit-col {
    min-width: 2.75rem;
    font-size: 0.7rem;
}

@media (min-width: 768px) {
    .portal-bottom-nav {
        max-width: 640px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 1rem 1rem 0 0;
    }
}

/* On-call week (portal theme) */

.on-call-week--portal {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem 1.1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.on-call-week--portal .on-call-week-title {
    color: #0f172a;
}

.on-call-week--portal .on-call-table {
    border: none;
    border-radius: 0;
    background: transparent;
}

.on-call-week--portal .on-call-table-head {
    background: transparent;
    padding-left: 0;
    padding-right: 0;
}

.on-call-week--portal .on-call-table-row {
    padding-left: 0;
    padding-right: 0;
    background: transparent;
}

.on-call-week--portal .on-call-table-row:nth-child(even) {
    background: transparent;
}

a.icu-badge-link,
.icu-badge-link {
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

a.icu-badge-link:hover,
a.icu-badge-link:focus-visible {
    filter: brightness(0.96);
    outline: none;
    text-decoration: underline !important;
    text-underline-offset: 2px;
}

.unit-day-contact-btn {
    border: none;
    background: none;
    padding: 0;
    font: inherit;
    font-weight: 600;
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    cursor: pointer;
    text-align: right;
}

.unit-day-contact-btn:hover,
.unit-day-contact-btn:focus-visible {
    opacity: 0.75;
}

.unit-group-header-link {
    color: inherit;
    font-weight: 700;
    cursor: pointer;
}

.unit-group-header-link:hover,
.unit-group-header-link:focus-visible {
    text-decoration: underline !important;
    text-underline-offset: 3px;
}

/* Desktop-only portal features (hidden on phone / narrow screens) */

.portal-desktop-only {
    display: none;
}

@media (min-width: 992px) {
    .portal-desktop-only {
        display: block;
    }
}

.portal-calendar-export-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem 1.15rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.portal-calendar-export-copy {
    margin-bottom: 0.85rem;
}

.portal-calendar-export-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.portal-calendar-export-hint {
    line-height: 1.45;
}

.portal-calendar-export-hint code {
    font-size: 0.8em;
}
