:root {
    --blue: #173ea5;
    --blue-dark: #102b74;
    --red: #c92d2f;
    --ink: #172033;
    --muted: #657085;
    --line: #dce1e8;
    --soft: #f5f7fa;
    --blue-soft: #edf3ff;
    --green: #188457;
    --green-soft: #e9f7f0;
    --amber: #ad6508;
    --amber-soft: #fff5df;
    --red-soft: #fff0f0;
    --radius: 6px;
    --sidebar: 250px;
    --preview: 38px;
    --header: 76px;
    --shadow: 0 12px 35px rgba(23, 32, 51, 0.12);
}

* { box-sizing: border-box; letter-spacing: 0; }
[hidden] { display: none !important; }

html { min-width: 320px; background: var(--soft); }

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: var(--soft);
    font-family: "Inter", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid rgba(23, 62, 165, 0.22); outline-offset: 2px; }

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 24px; line-height: 1.2; }
h2 { margin-bottom: 4px; font-size: 18px; line-height: 1.3; }
h3 { margin-bottom: 4px; font-size: 14px; line-height: 1.35; }

.preview-bar {
    display: none !important;
    position: fixed;
    z-index: 80;
    inset: 0 0 auto 0;
    height: var(--preview);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    color: #fff;
    background: #172033;
    font-size: 11px;
    font-weight: 700;
}

.preview-bar > span, .preview-bar a { display: inline-flex; align-items: center; gap: 7px; }
.preview-bar a { color: #d9e3f3; text-decoration: none; }
.preview-bar a:hover { color: #fff; }
.preview-bar svg { width: 13px; }

.live-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: #35c783; box-shadow: 0 0 0 3px rgba(53, 199, 131, 0.15); }

.portal-header {
    position: fixed;
    z-index: 60;
    top: var(--preview);
    left: 0;
    right: 0;
    height: var(--header);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 22px;
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.brand { min-width: 0; display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand img { width: 47px; height: 57px; object-fit: contain; }
.brand strong, .brand small { display: block; }
.brand strong { color: var(--blue-dark); font-size: 18px; line-height: 1.1; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 9px; }

.header-right, .page-actions, .button-row, .toolbar, .toolbar-actions { display: flex; align-items: center; gap: 9px; }
.header-right { justify-content: flex-end; }

.application-chip, .badge, .tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.application-chip { color: #925405; background: var(--amber-soft); }
.application-chip.is-approved { color: #0c6b45; background: var(--green-soft); }
.application-chip.is-rejected { color: #a32628; background: var(--red-soft); }
.application-chip svg { width: 14px; }

.icon-button, .button {
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-weight: 700;
}

.icon-button {
    position: relative;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #536075;
    border-color: var(--line);
    background: #fff;
}

.icon-button:hover { color: var(--blue); border-color: #b4c4ec; background: var(--blue-soft); }
.icon-button svg { width: 18px; }

.notification-dot { position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; border: 2px solid #fff; border-radius: 50%; background: var(--red); }

.profile-control {
    min-width: 210px;
    display: grid;
    grid-template-columns: 34px 1fr 16px;
    align-items: center;
    gap: 9px;
    min-height: 48px;
    padding: 5px 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
    background: #fff;
    text-align: left;
}

.profile-control:hover { background: var(--soft); }
.profile-control strong, .profile-control small { display: block; max-width: 125px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-control strong { font-size: 10px; }
.profile-control small { color: var(--muted); font-size: 8px; }
.profile-control svg { width: 14px; }

.avatar {
    width: 34px;
    height: 34px;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: var(--blue-dark);
    font-size: 10px;
    font-weight: 800;
}

.portal-shell { min-height: 100vh; padding-top: calc(var(--preview) + var(--header)); }

.portal-sidebar {
    position: fixed;
    z-index: 40;
    top: calc(var(--preview) + var(--header));
    bottom: 0;
    left: 0;
    width: var(--sidebar);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--line);
    background: #fff;
}

.program-context {
    min-height: 80px;
    display: grid;
    grid-template-columns: 36px 1fr;
    align-items: center;
    gap: 10px;
    padding: 13px 15px;
    border-bottom: 1px solid var(--line);
    background: var(--blue-soft);
}

.program-context__icon { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius); color: var(--blue); background: #fff; }
.program-context__icon svg { width: 18px; }
.program-context small, .program-context strong { display: block; }
.program-context small { color: var(--muted); font-size: 8px; }
.program-context strong { margin-top: 2px; font-size: 10px; line-height: 1.3; }

#portal-nav { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 11px; }
.nav-label { margin: 14px 10px 6px; color: #929baa; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.nav-label:first-child { margin-top: 0; }
.nav-item {
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 3px;
    padding: 8px 10px;
    border: 0;
    border-radius: var(--radius);
    color: #536075;
    background: transparent;
    text-align: left;
    font-size: 12px;
    font-weight: 650;
}
.nav-item svg { width: 17px; flex: 0 0 auto; }
.nav-item:hover { color: var(--blue); background: var(--blue-soft); }
.nav-item.is-active { color: #fff; background: var(--blue); }
.nav-badge { min-width: 21px; margin-left: auto; padding: 1px 6px; border-radius: 10px; color: var(--blue-dark); background: #dce7ff; font-size: 9px; text-align: center; }
.nav-item.is-active .nav-badge { background: #fff; }

.sidebar-help { margin: 11px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); }
.sidebar-help > svg { width: 19px; color: var(--red); }
.sidebar-help strong, .sidebar-help span { display: block; }
.sidebar-help strong { margin-top: 5px; font-size: 10px; }
.sidebar-help span { margin: 2px 0 9px; color: var(--muted); font-size: 8px; }

.portal-main { min-width: 0; margin-left: var(--sidebar); }
.page-header { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 28px; border-bottom: 1px solid var(--line); background: #fff; }
.eyebrow { margin: 0 0 2px; color: var(--blue); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.password-field { position: relative; display: flex; align-items: center; }
.password-field input { width: 100%; padding-right: 44px; }
.password-toggle { position: absolute; right: 0; top: 0; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 100%; border: 0; background: transparent; color: #9aa5b5; cursor: pointer; border-radius: 10px; }
.password-toggle:hover, .password-toggle:focus-visible { background: #f4f6fa; color: #6f7d91; outline: none; }
.password-toggle svg { width: 24px; height: 24px; }
.page-content { width: 100%; max-width: 1480px; margin: 0 auto; padding: 24px 28px 44px; }

.button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; white-space: nowrap; }
.button svg { width: 16px; }
.button--primary { color: #fff; background: var(--blue); }
.button--primary:hover { background: var(--blue-dark); }
.button--secondary { color: #354155; border-color: var(--line); background: #fff; }
.button--secondary:hover { color: var(--blue); border-color: #b6c6ec; background: var(--blue-soft); }
.button--success { color: #fff; background: var(--green); }
.button--danger { color: var(--red); border-color: #ebc2c3; background: #fff; }
.button--small { min-height: 31px; padding: 5px 10px; font-size: 10px; }
button:disabled { cursor: not-allowed; opacity: 0.5; }

.hero {
    min-height: 245px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid #b9c9ef;
    border-radius: var(--radius);
    color: #fff;
    background: var(--blue-dark);
}
.hero__content { align-self: center; padding: 30px; }
.hero__content .eyebrow { color: #c5d6ff; }
.hero__content h2 { max-width: 680px; margin-bottom: 9px; font-size: 24px; }
.hero__content p { max-width: 650px; margin-bottom: 17px; color: #dbe5ff; }
.hero__image { width: 100%; height: 100%; min-height: 245px; object-fit: cover; object-position: 50% 42%; border-left: 5px solid var(--red); }

.status-banner { min-height: 98px; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px; margin-bottom: 20px; padding: 16px 18px; border: 1px solid #efd49a; border-radius: var(--radius); background: var(--amber-soft); }
.status-banner.is-approved { border-color: #b9e0cd; background: var(--green-soft); }
.status-banner__icon { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--amber); background: #fff; }
.status-banner.is-approved .status-banner__icon { color: var(--green); }
.status-banner__icon svg { width: 21px; }
.status-banner h2 { margin-bottom: 2px; }
.status-banner p { margin-bottom: 0; color: var(--muted); font-size: 10px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; margin-bottom: 20px; }
.stat-card { min-width: 0; min-height: 88px; display: grid; grid-template-columns: 39px 1fr; align-items: center; gap: 11px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.stat-icon { width: 39px; height: 39px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius); color: var(--blue); background: var(--blue-soft); }
.stat-icon svg { width: 19px; }
.stat-icon--green { color: var(--green); background: var(--green-soft); }
.stat-icon--amber { color: var(--amber); background: var(--amber-soft); }
.stat-icon--red { color: var(--red); background: var(--red-soft); }
.stat-value, .stat-label { display: block; }
.stat-value { overflow-wrap: anywhere; font-size: 20px; font-weight: 800; line-height: 1.2; }
.stat-label { margin-top: 3px; color: var(--muted); font-size: 9px; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.75fr); gap: 17px; }
.content-grid--equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.panel + .panel { margin-top: 15px; }
.panel-header { min-height: 57px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 15px; border-bottom: 1px solid var(--line); }
.panel-header h2, .panel-header h3 { margin-bottom: 0; }
.panel-header p { margin: 2px 0 0; color: var(--muted); font-size: 9px; }
.panel-body { padding: 15px; }
.panel-body--flush { padding: 0; }

.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; margin: 0 0 12px; }
.section-heading p { margin-bottom: 0; color: var(--muted); font-size: 10px; }

.badge--success { color: #0c6b45; background: var(--green-soft); }
.badge--warning { color: #925405; background: var(--amber-soft); }
.badge--danger { color: #a32628; background: var(--red-soft); }
.badge--info { color: var(--blue-dark); background: var(--blue-soft); }
.badge--neutral { color: #536075; background: #edf0f4; }
.tag { margin: 2px 4px 2px 0; color: #4c586b; background: #edf0f4; font-weight: 600; }

.progress-track { height: 7px; overflow: hidden; border-radius: 7px; background: #e5e9ef; }
.progress-track span { display: block; height: 100%; border-radius: 7px; background: var(--green); }
.progress-meta { display: flex; justify-content: space-between; gap: 10px; margin: 7px 0 15px; color: var(--muted); font-size: 9px; }

.timeline, .check-list, .resource-list, .announcement-list { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; display: grid; grid-template-columns: 31px 1fr auto; gap: 10px; min-height: 61px; padding: 6px 0; }
.timeline li:not(:last-child)::after { content: ""; position: absolute; top: 38px; bottom: -2px; left: 15px; width: 1px; background: #ccd3df; }
.timeline-number { position: relative; z-index: 1; width: 31px; height: 31px; display: flex; align-items: center; justify-content: center; border: 2px solid #bdc6d4; border-radius: 50%; color: var(--muted); background: #fff; font-size: 9px; font-weight: 800; }
.timeline li.is-done .timeline-number { color: #fff; border-color: var(--green); background: var(--green); }
.timeline li.is-current .timeline-number { color: #fff; border-color: var(--blue); background: var(--blue); }
.timeline strong, .timeline small { display: block; }
.timeline strong { margin-top: 2px; font-size: 10px; }
.timeline small { margin-top: 2px; color: var(--muted); font-size: 8px; }

.check-list li { min-height: 48px; display: grid; grid-template-columns: 31px 1fr auto; align-items: center; gap: 9px; border-top: 1px solid #edf0f4; }
.check-list li:first-child { border-top: 0; }
.check-list svg { width: 17px; color: var(--green); }
.check-list .pending-icon { color: var(--amber); }
.check-list strong, .check-list small { display: block; }
.check-list strong { font-size: 10px; }
.check-list small { color: var(--muted); font-size: 8px; }

.notice { min-width: 0; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid #bed0f5; border-radius: var(--radius); background: var(--blue-soft); }
.notice > svg { width: 19px; color: var(--blue); }
.notice strong, .notice p { display: block; }
.notice strong { font-size: 10px; }
.notice p { margin: 2px 0 0; color: var(--muted); font-size: 9px; }
.notice--warning { border-color: #efd49a; background: var(--amber-soft); }
.notice--warning > svg { color: var(--amber); }
.notice--success { border-color: #b9e0cd; background: var(--green-soft); }
.notice--success > svg { color: var(--green); }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.entity-card { min-width: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.entity-card__band { height: 5px; background: var(--blue); }
.entity-card__band--green { background: var(--green); }
.entity-card__band--gray { background: #727b89; }
.entity-card__head { display: grid; grid-template-columns: 43px 1fr auto; align-items: center; gap: 10px; padding: 14px; border-bottom: 1px solid #edf0f4; }
.entity-card__head h3 { margin: 0; overflow-wrap: anywhere; }
.entity-card__head p { margin: 2px 0 0; color: var(--muted); font-size: 8px; }
.entity-card__body { flex: 1; padding: 14px; }
.entity-card__body p { margin-bottom: 10px; color: var(--muted); font-size: 10px; }
.entity-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 12px; }
.entity-meta span, .entity-meta strong { display: block; }
.entity-meta span { color: var(--muted); font-size: 8px; }
.entity-meta strong { margin-top: 2px; font-size: 9px; overflow-wrap: anywhere; }
.entity-card__footer { min-height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 14px; border-top: 1px solid #edf0f4; background: #fafbfc; }

.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.guide-card { min-width: 0; display: grid; grid-template-columns: 40px 1fr 34px; gap: 10px; align-items: start; min-height: 120px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.guide-card .stat-icon { width: 40px; height: 40px; }
.guide-card h3 { margin: 5px 0 3px; }
.guide-card p { margin: 0; color: var(--muted); font-size: 9px; }
.guide-card .icon-button { width: 32px; height: 32px; }

.announcement-list li { display: grid; grid-template-columns: 39px 1fr auto; gap: 10px; align-items: start; min-height: 79px; padding: 12px 0; border-bottom: 1px solid #edf0f4; }
.announcement-list li:last-child { border-bottom: 0; }
.announcement-list strong, .announcement-list small, .announcement-list p { display: block; }
.announcement-list strong { font-size: 11px; }
.announcement-list small { margin-top: 2px; color: var(--blue); font-size: 8px; font-weight: 700; }
.announcement-list p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }

.toolbar { justify-content: space-between; margin-bottom: 14px; }
.toolbar-filters { min-width: 0; display: flex; align-items: center; gap: 8px; flex: 1; }
.input, .select, .textarea { width: 100%; border: 1px solid #cad2dd; border-radius: var(--radius); color: var(--ink); background: #fff; }
.input, .select { height: 40px; padding: 0 11px; }
.select { width: auto; min-width: 150px; }
.textarea { min-height: 95px; padding: 10px 11px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.form-field label { display: block; margin-bottom: 5px; color: #4e5a6e; font-size: 9px; font-weight: 700; }
.form-field--wide { grid-column: 1 / -1; }

.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; min-width: 760px; border-collapse: collapse; background: #fff; }
.data-table th, .data-table td { padding: 11px 13px; border-bottom: 1px solid #e8ecf1; text-align: left; vertical-align: middle; }
.data-table th { color: #697487; background: #f8f9fb; font-size: 9px; font-weight: 800; text-transform: uppercase; white-space: nowrap; }
.data-table td { font-size: 10px; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fafcff; }
.table-entity { display: flex; align-items: center; gap: 8px; min-width: 170px; }
.table-entity strong, .table-entity span { display: block; }
.table-entity span { color: var(--muted); font-size: 8px; }

.meeting-row { display: grid; grid-template-columns: 105px 7px minmax(0, 1fr) 125px 105px; align-items: center; gap: 11px; min-height: 68px; padding: 10px 13px; border: 1px solid var(--line); border-bottom: 0; background: #fff; }
.meeting-row:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.meeting-row:last-child { border-bottom: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }
.meeting-row__line { align-self: stretch; border-radius: 3px; background: var(--blue); }
.meeting-row__line--red { background: var(--red); }
.meeting-row__line--green { background: var(--green); }
.meeting-row strong, .meeting-row small { display: block; }
.meeting-row small { color: var(--muted); font-size: 8px; }

.arrival-warning { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-left: 4px solid var(--amber); border-radius: 4px; background: var(--amber-soft); }
.arrival-warning svg { width: 19px; color: var(--amber); }
.arrival-warning strong, .arrival-warning span { display: block; }
.arrival-warning strong { font-size: 10px; }
.arrival-warning span { color: var(--muted); font-size: 8px; }

.qr-section { min-height: 260px; display: flex; align-items: center; justify-content: center; gap: 25px; padding: 20px; border: 1px dashed #b8c1d0; border-radius: var(--radius); background: var(--soft); }
.qr-code { width: 150px; height: 170px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 10px solid #fff; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.qr-code svg { width: 100px; height: 100px; }
.qr-code span { font-size: 9px; font-weight: 800; }

.modal-backdrop { position: fixed; z-index: 120; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(17, 25, 40, 0.58); }
.modal-backdrop[hidden] { display: none; }
.modal { position: relative; width: min(100%, 640px); max-height: calc(100vh - 40px); overflow-y: auto; padding: 23px; border-radius: var(--radius); background: #fff; box-shadow: 0 25px 70px rgba(17, 25, 40, 0.28); }
.modal-close { position: absolute; top: 13px; right: 13px; }
.modal-title { padding-right: 46px; margin-bottom: 4px; font-size: 20px; }
.modal-subtitle { margin-bottom: 18px; color: var(--muted); font-size: 10px; }
.modal .button-row { justify-content: flex-end; margin-top: 18px; }

.toast { position: fixed; z-index: 140; right: 19px; bottom: 19px; min-width: 240px; max-width: calc(100vw - 38px); display: flex; align-items: center; gap: 9px; padding: 12px 14px; border-radius: var(--radius); color: #fff; background: #172033; box-shadow: var(--shadow); transform: translateY(130%); opacity: 0; pointer-events: none; transition: transform 0.22s ease, opacity 0.22s ease; }
.toast.is-visible { transform: translateY(0); opacity: 1; }
.toast svg { width: 18px; color: #5ee3a8; }

.mobile-menu, .menu-overlay { display: none; }

@media (max-width: 1120px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero { grid-template-columns: minmax(0, 1fr) 300px; }
}

@media (max-width: 900px) {
    .portal-header { padding: 0 13px; }
    /* Keep the navigation control at the far right on compact screens. */
    .portal-header { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; }
    .portal-header .brand { order: 1; }
    .portal-header .header-right { order: 2; min-width: 0; }
    .mobile-menu { display: inline-flex; flex: 0 0 auto; order: 3; }
    .profile-control { min-width: 0; grid-template-columns: 34px 16px; }
    .profile-control > span:nth-child(2) { display: none; }
    .application-chip { margin-left: auto; }
    .portal-sidebar { transform: translateX(-102%); transition: transform 0.22s ease; box-shadow: var(--shadow); }
    body.menu-open .portal-sidebar { transform: translateX(0); }
    .menu-overlay { position: fixed; z-index: 35; inset: calc(var(--preview) + var(--header)) 0 0 0; background: rgba(17, 25, 40, 0.45); }
    body.menu-open .menu-overlay { display: block; }
    .portal-main { margin-left: 0; }
    .page-header { padding: 14px 18px; }
    .page-content { padding: 20px 18px 38px; }
    .content-grid, .content-grid--equal { grid-template-columns: 1fr; }
    .content-grid > .panel + .panel { margin-top: 0; }
    .hero { grid-template-columns: 1fr; }
    .hero__image { display: none; }
}

@media (max-width: 640px) {
    :root { --preview: 34px; --header: 67px; }
    .preview-bar { padding: 0 10px; }
    .preview-bar > span { font-size: 9px; }
    .preview-bar a { font-size: 0; }
    .preview-bar a svg { width: 17px; }
    .portal-header { gap: 8px; padding: 0 8px; }
    .brand { gap: 6px; }
    .brand img { width: 34px; height: 42px; }
    .brand strong { font-size: 14px; }
    .brand small { display: none; }
    .header-right { flex: 0 0 auto; gap: 6px; }
    .application-chip { width: 34px; height: 34px; flex: 0 0 34px; padding: 0; border-radius: var(--radius); font-size: 0; }
    .application-chip svg { width: 16px; height: 16px; }
    .profile-control { width: 38px; min-height: 38px; grid-template-columns: 1fr; padding: 2px; }
    .profile-control > svg { display: none; }
    .profile-control .avatar { width: 32px; height: 32px; }
    .portal-header .icon-button:not(.mobile-menu) { display: none; }
    .page-header { min-height: 72px; }
    .page-header h1 { font-size: 20px; }
    .page-actions .button span { display: none; }
    .page-actions .button { width: 38px; padding: 0; }
    .page-content { padding: 15px 11px 32px; }
    .status-banner { grid-template-columns: 40px 1fr; }
    .status-banner > .button, .status-banner > .badge { grid-column: 2; justify-self: start; }
    .stat-grid, .card-grid, .guide-grid, .form-grid { grid-template-columns: 1fr; }
    .stat-card { min-height: 76px; }
    .section-heading, .toolbar { align-items: stretch; flex-direction: column; }
    .toolbar-filters { align-items: stretch; flex-direction: column; }
    .select { width: 100%; }
    .notice { grid-template-columns: 28px 1fr; }
    .notice > .button, .notice > .badge { grid-column: 2; justify-self: start; }
    .hero__content { padding: 22px 18px; }
    .hero__content h2 { font-size: 20px; }
    .entity-meta { grid-template-columns: 1fr; }
    .meeting-row { min-width: 0; grid-template-columns: 7px minmax(0, 1fr) auto; align-items: start; }
    .meeting-row > :nth-child(1) { grid-column: 2; grid-row: 1; }
    .meeting-row > .meeting-row__line { grid-column: 1; grid-row: 1 / 4; }
    .meeting-row > :nth-child(3) { grid-column: 2; grid-row: 2; }
    .meeting-row > :nth-child(4) { grid-column: 2; grid-row: 3; }
    .meeting-row > :nth-child(5) { grid-column: 3; grid-row: 1; justify-self: end; }
    .qr-section { flex-direction: column; text-align: center; }
    .modal { padding: 20px 15px; }
    .button-row { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
