.portal-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    padding: 34px 36px;
    border-radius: 16px;
    background: linear-gradient(120deg, #102c70 0%, #176b78 100%);
    color: #fff;
    box-shadow: 0 16px 30px rgba(15, 47, 136, 0.2);
}

.collaborator-only-app {
    display: block;
    min-height: 100vh;
}

.collaborator-only-app .main {
    max-width: 1180px;
    margin: 0 auto;
}

.topbar-company { display: grid; gap: 3px; min-width: 0; }
.topbar-company span { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.topbar-company strong { overflow: hidden; color: #123d66; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }

.portal-hero h1 { margin: 5px 0 8px; font-size: clamp(28px, 4vw, 44px); }
.portal-hero p:not(.eyebrow) { margin: 0; color: #d7f4f2; }
.eyebrow { margin: 0; color: #4e9eab; font-size: 11px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.portal-hero .eyebrow { color: #a9e6df; }
.portal-status { display: inline-flex; align-items: center; gap: 9px; padding: 9px 13px; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; color: #e4fffa; font-size: 12px; white-space: nowrap; }
.push-toggle { min-height: 38px; border: 1px solid rgba(255,255,255,.4); border-radius: 7px; padding: 0 13px; color: #fff; background: rgba(255,255,255,.14); font-weight: 600; cursor: pointer; }
.push-toggle:hover { background: rgba(255,255,255,.24); }
.push-toggle[aria-pressed="true"] { color: #123d66; background: #fff; }
.push-toggle:disabled { cursor: not-allowed; opacity: .72; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #73e2a1; box-shadow: 0 0 0 4px rgba(115,226,161,.18); }
.profile-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 18px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--line); }
.profile-strip div { display: grid; gap: 5px; padding: 16px 18px; background: rgba(255,255,255,.9); }
.profile-strip span, .metrics-row span { color: var(--muted); font-size: 11px; }
.profile-strip strong { font-size: 14px; }
.portal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.portal-panel { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.94); box-shadow: var(--shadow); }
.panel-wide { grid-column: span 3; }
.payslip-panel { margin-top: 18px; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.panel-heading h2 { margin: 4px 0 0; font-size: 19px; }
.panel-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #e9f5f4; color: #137779; font-size: 19px; }
.period-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.period-controls label { color: var(--muted); font-size: 12px; }
.period-controls input, .period-controls select { min-height: 38px; border: 1px solid #dce2ef; border-radius: 7px; padding: 0 10px; color: var(--ink); background: #fff; }
.period-controls input { width: 86px; }
.primary-btn { min-height: 38px; border: 0; border-radius: 7px; padding: 0 15px; color: #fff; background: #176b78; font-weight: 600; cursor: pointer; }
.primary-btn:hover { background: #0f505b; }
.metrics-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 22px; }
.metrics-row div { display: grid; gap: 4px; padding: 13px; border-radius: 8px; background: #f4f8fb; }
.metrics-row strong { font-size: 21px; color: #123d66; }
.inline-feedback { margin-top: 14px; color: var(--muted); font-size: 12px; }
.activity-list { display: grid; gap: 9px; padding: 0; margin: 0; list-style: none; }
.activity-list li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid #edf0f6; font-size: 12px; }
.activity-list li:last-child { border-bottom: 0; }
.activity-main { display: grid; gap: 3px; }
.activity-main strong { font-size: 12px; }
.activity-main span { color: var(--muted); }
.activity-value { color: #176b78; font-weight: 700; white-space: nowrap; }
.activity-message { min-width: 0; max-width: 58%; overflow-wrap: anywhere; text-align: right; white-space: normal; }
.empty-state { color: var(--muted); text-align: center; }
.table-wrap { overflow-x: auto; }
.payslip-panel table { width: 100%; min-width: 650px; border-collapse: collapse; }
.payslip-panel th, .payslip-panel td { padding: 12px 10px; border-bottom: 1px solid #edf0f6; text-align: left; font-size: 12px; }
.payslip-panel th { color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; }
.document-action { border: 0; border-radius: 6px; padding: 7px 10px; color: #176b78; background: #e9f5f4; font-weight: 600; cursor: pointer; }
.document-action:hover { background: #d4eceb; }
.integrity-ok { color: #25814e; font-weight: 600; }
@media (max-width: 1100px) { .portal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .panel-wide { grid-column: span 2; } }
@media (max-width: 760px) {
    .sidebar { padding: 14px 11px; }
    .brand { margin-bottom: 12px; padding: 8px 7px 11px; }
    .brand-logo { max-width: 210px; }
    .menu-title { margin: 12px 6px 8px; }
    .nav a { margin-bottom: 2px; padding: 8px 10px; }
    .main { padding: 12px; }
    .topbar { align-items: center; flex-direction: row; gap: 8px; margin-top: 10px; padding: 9px 10px; }
    .topbar-company { flex: 1 1 120px; gap: 1px; }
    .topbar-company span { font-size: 9px; }
    .topbar-company strong { font-size: 13px; }
    .topbar-right { justify-content: flex-end; flex: 0 1 auto; flex-wrap: nowrap; gap: 6px; }
    .topbar-right a,
    .topbar-user { display: none; }
    .topbar-btn { min-height: 32px; flex: 0 0 auto; padding: 0 9px; font-size: 12px; }
    .portal-hero { align-items: flex-start; flex-direction: column; padding: 26px 22px; }
    .profile-strip { grid-template-columns: repeat(2, 1fr); }
    .portal-grid { grid-template-columns: 1fr; }
    .panel-wide { grid-column: span 1; }
    .portal-panel { padding: 18px; }
}