* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
        'Segoe UI Symbol', 'Noto Color Emoji';
}

a {
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

:root {
    --portal-bg-start: #d9ebff;
    --portal-bg-end: #b8d6f5;
    --portal-primary: #0a3b5c;
    --portal-primary-soft: #1f5077;
    --portal-accent: #5fa7db;
    --portal-card: #ffffff;
    --portal-surface: #f4faff;
    --portal-muted: #e8f2fc;
    --portal-line: #b3d2f0;
    --portal-input: #f0f9ff;
    --portal-cream: #ffefc0;
    --portal-text: #123a57;
    --portal-success: #0f766e;
    --portal-danger: #b13e3e;
}

body.portal-body {
    min-height: 100vh;
    background: linear-gradient(145deg, var(--portal-bg-start) 0%, var(--portal-bg-end) 100%);
    color: var(--portal-text);
    font-size: calc(1rem * 0.75);
}

.portal-shell {
    width: min(1200px, calc(100% - 1rem));
    margin: 0 auto;
    padding: 0.75rem 0;
}

.portal-frame {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 1.75rem;
    background: var(--portal-card);
    box-shadow: 0 20px 40px rgba(0, 40, 80, 0.22);
}

.portal-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--portal-primary);
    color: white;
    border-bottom: 3px solid var(--portal-accent);
}

.portal-brand {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.portal-brand-title {
    font-size: calc(1.35rem * 0.75);
    font-weight: 600;
    letter-spacing: 0.03em;
}

.portal-brand-badge {
    display: inline-flex;
    width: fit-content;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: #2b6c9e;
    font-size: calc(0.85rem * 0.75);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.portal-brand-subtitle {
    font-size: calc(0.9rem * 0.75);
    color: rgba(255, 255, 255, 0.78);
}

.portal-header-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.portal-locale-switcher {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.portal-locale-label {
    font-size: calc(0.8rem * 0.75);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.78);
}

.portal-locale-options {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem;
    border-radius: 8px;
    background: rgba(12, 44, 70, 0.38);
}

.portal-locale-option {
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: white;
    cursor: pointer;
    font-size: calc(0.85rem * 0.75);
    font-weight: 700;
    line-height: 1;
    padding: 0.45rem 0.65rem;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.portal-locale-option:hover {
    border-color: rgba(255, 255, 255, 0.28);
}

.portal-locale-option.is-active {
    border-color: rgba(255, 255, 255, 0.24);
    background: white;
    color: var(--portal-primary);
}

.portal-user-pill {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    background: var(--portal-primary-soft);
}

.portal-user-meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.portal-user-name {
    font-size: calc(0.92rem * 0.75);
    font-weight: 700;
    color: var(--portal-cream);
}

.portal-user-role {
    font-size: calc(0.78rem * 0.75);
    color: rgba(255, 255, 255, 0.78);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.portal-nav {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.9rem 1.25rem 0;
    background: var(--portal-card);
    scrollbar-width: thin;
}

.portal-nav-link {
    padding: 0.7rem 0.15rem;
    border-bottom: 4px solid transparent;
    color: #2b4f6e;
    font-size: calc(0.98rem * 0.75);
    font-weight: 700;
    white-space: nowrap;
    transition: 0.2s ease;
}

.portal-nav-link:hover {
    color: var(--portal-primary);
    border-color: rgba(10, 59, 92, 0.25);
}

.portal-nav-link.is-active {
    color: var(--portal-primary);
    border-color: var(--portal-primary);
}

.portal-content {
    display: grid;
    gap: 1rem;
    min-height: 100vh;
    padding: 1rem;
    background: var(--portal-surface);
}

.portal-card {
    border: 1px solid #cddff0;
    border-radius: 1.5rem;
    background: var(--portal-card);
    padding: 1rem;
    box-shadow: 0 6px 16px rgba(0, 30, 60, 0.08);
}

.portal-card--hero {
    background:
        radial-gradient(circle at top right, rgba(95, 167, 219, 0.25), transparent 32%),
        linear-gradient(180deg, #f8fcff 0%, #edf6ff 100%);
}

.portal-card--receipt {
    padding: 1.5rem;
    background:
        linear-gradient(145deg, rgba(232, 242, 252, 0.75), rgba(255, 255, 255, 0.96));
}

.portal-card-title {
    margin-bottom: 0.35rem;
    color: var(--portal-primary);
    font-size: calc(1.15rem * 0.75);
    font-weight: 700;
}

.portal-card-subtitle {
    color: #4f6f88;
    font-size: calc(0.92rem * 0.75);
    line-height: 1.5;
}

.portal-section-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.portal-section-divider::before {
    content: '';
    width: 0.35rem;
    height: 1.35rem;
    border-radius: 999px;
    background: var(--portal-primary);
}

.portal-grid {
    display: grid;
    gap: 1rem;
}

.portal-receipt-form {
    display: grid;
    gap: 1.35rem;
    margin-top: 1.5rem;
}

.portal-pos-shell {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgba(95, 167, 219, 0.26);
    border-radius: 1.35rem;
    background: linear-gradient(180deg, rgba(235, 244, 253, 0.95), rgba(248, 251, 255, 0.98));
}

.portal-pos-toolbar {
    display: grid;
    gap: 1rem;
}

.portal-pos-room-field[hidden] {
    display: none;
}

.portal-pos-items {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
    border: 1px solid rgba(151, 190, 222, 0.72);
    border-radius: 1.2rem;
    background: rgba(255, 255, 255, 0.88);
}

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

.portal-pos-items-list {
    display: grid;
    gap: 0.85rem;
}

.portal-pos-item {
    display: grid;
    gap: 0.75rem;
    padding: 0.9rem;
    border: 1px solid var(--portal-line);
    border-radius: 1rem;
    background: white;
}

.portal-pos-item-grid {
    display: grid;
    gap: 0.85rem;
}

.portal-pos-item-actions {
    display: flex;
    justify-content: flex-end;
}

.portal-pos-item-actions .portal-button-secondary[disabled] {
    opacity: 0.55;
    pointer-events: none;
}

.portal-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border: 2px solid var(--portal-primary);
    border-radius: 999px;
    background: white;
    color: var(--portal-primary);
    cursor: pointer;
    transition: 0.2s ease;
}

.portal-icon-button:hover {
    background: #d2e7ff;
}

.portal-icon-button svg {
    width: 1.25rem;
    height: 1.25rem;
}

.portal-pos-tab-list {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
    width: min(100%, 24rem);
    padding: 0.35rem;
    margin-top: 1.25rem;
    border: 1px solid rgba(95, 167, 219, 0.26);
    border-radius: 1.1rem;
    background: linear-gradient(180deg, rgba(222, 236, 248, 0.9), rgba(244, 249, 255, 0.96));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.portal-pos-tab {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 3.2rem;
    width: 100%;
    padding: 0.9rem 1.25rem;
    border: 0;
    border-radius: 0.85rem;
    background: transparent;
    color: #59758c;
    font-size: calc(0.95rem * 0.75);
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s ease;
}

.portal-pos-tab:hover {
    color: var(--portal-primary);
    background: rgba(255, 255, 255, 0.62);
}

.portal-pos-tab.is-active {
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    color: var(--portal-primary);
    box-shadow:
        0 10px 20px rgba(10, 59, 92, 0.1),
        inset 0 0 0 1px rgba(151, 190, 222, 0.72);
}

.portal-pos-tab:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(95, 167, 219, 0.18);
}

.portal-receipt-form .portal-form-grid {
    gap: 1.15rem;
}

.portal-receipt-form .portal-button-row {
    margin-top: 0.35rem;
}

.portal-profile-grid {
    display: grid;
    gap: 1rem;
}

.portal-summary-grid,
.portal-form-grid,
.portal-report-grid,
.portal-login-grid,
.portal-receipt-grid {
    display: grid;
    gap: 0.85rem;
}

.portal-summary-item {
    border: 1px solid var(--portal-line);
    border-radius: 1.25rem;
    background: linear-gradient(180deg, #f7fbff 0%, #ebf4ff 100%);
    padding: 0.9rem 1rem;
}

.portal-summary-label {
    color: #53738e;
    font-size: calc(0.78rem * 0.75);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.portal-summary-value {
    margin-top: 0.25rem;
    color: var(--portal-primary);
    font-size: calc(1.35rem * 0.75);
    font-weight: 800;
}

.portal-summary-caption {
    margin-top: 0.25rem;
    color: #5f7a90;
    font-size: calc(0.82rem * 0.75);
}

.portal-field {
    display: grid;
    gap: 0.45rem;
    min-width: 0;
}

.portal-field-label {
    color: var(--portal-primary);
    font-size: calc(0.82rem * 0.75);
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.35;
    text-transform: uppercase;
}

.portal-field-help {
    color: #62819a;
    font-size: calc(0.8rem * 0.75);
    line-height: 1.45;
}

.portal-input,
.portal-select,
.portal-textarea {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    border: 1px solid var(--portal-line);
    border-radius: 999px;
    background: var(--portal-input);
    padding: 0.85rem 1rem;
    color: var(--portal-text);
    outline: none;
    transition: 0.2s ease;
}

.portal-input[readonly] {
    background: #f4f8fc;
    color: #53738e;
}

.portal-textarea {
    min-height: 8rem;
    border-radius: 1.1rem;
    resize: vertical;
}

.portal-input:focus,
.portal-select:focus,
.portal-textarea:focus {
    border-color: var(--portal-primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(95, 167, 219, 0.18);
}

.select2-container {
    width: 100% !important;
}

.select2-container .select2-selection--single {
    min-height: 3.25rem;
}

.select2-container--default .select2-selection--single {
    display: flex;
    align-items: center;
    border: 1px solid var(--portal-line);
    border-radius: 999px;
    background: var(--portal-input);
    padding: 0 2.75rem 0 1rem;
    transition: 0.2s ease;
}

.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--portal-primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(95, 167, 219, 0.18);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    padding: 0;
    color: var(--portal-text);
    line-height: 1.5;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #648199;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    right: 0.9rem;
    height: 100%;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
    margin-right: 0.6rem;
    color: #648199;
}

.select2-dropdown {
    border: 1px solid var(--portal-line);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 12px 24px rgba(0, 30, 60, 0.12);
}

.select2-search--dropdown {
    padding: 0.75rem;
    background: white;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid var(--portal-line);
    border-radius: 999px;
    padding: 0.7rem 0.9rem;
    background: var(--portal-input);
    color: var(--portal-text);
    outline: none;
}

.select2-results__option {
    padding: 0.8rem 1rem;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background: var(--portal-primary);
}

.portal-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.portal-pill-group input[type='radio'] {
    display: none;
}

.portal-pill-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 5.5rem;
    padding: 0.8rem 1rem;
    border: 2px solid #9bc0df;
    border-radius: 999px;
    background: white;
    color: #1f4a70;
    font-size: calc(0.88rem * 0.75);
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.portal-pill-group input[type='radio']:checked + .portal-pill-option {
    border-color: var(--portal-primary);
    background: var(--portal-primary);
    color: white;
}

.portal-button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    min-width: 0;
}

.portal-button,
.portal-button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.85rem 1.25rem;
    border-radius: 999px;
    border: 2px solid transparent;
    font-weight: 800;
    transition: 0.2s ease;
    cursor: pointer;
}

.portal-button {
    background: var(--portal-primary);
    color: white;
}

.portal-button:hover {
    background: #15659b;
}

.portal-button-secondary {
    background: white;
    border-color: var(--portal-primary);
    color: var(--portal-primary);
}

.portal-button-secondary:hover {
    background: #d2e7ff;
}

.portal-chip {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 0.45rem;
    border-radius: 999px;
    background: #e8f2fc;
    border: 1px solid var(--portal-line);
    padding: 0.5rem 0.85rem;
    color: var(--portal-primary);
    font-size: calc(0.84rem * 0.75);
    font-weight: 700;
}

.portal-chip--success {
    color: var(--portal-success);
    border-color: rgba(15, 118, 110, 0.22);
    background: rgba(15, 118, 110, 0.08);
}

.portal-chip--danger {
    color: var(--portal-danger);
    border-color: rgba(177, 62, 62, 0.2);
    background: rgba(177, 62, 62, 0.08);
}

.portal-list {
    display: grid;
    gap: 0.65rem;
}

.portal-list-item {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--portal-line);
    border-radius: 1.15rem;
    background: #f7fbff;
}

.portal-receipt-items {
    display: grid;
    gap: 0.75rem;
    width: 100%;
}

.portal-receipt-item-row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #dfe9f6;
}

.portal-receipt-item-row:first-of-type {
    padding-top: 0;
    border-top: none;
}

.portal-receipt-item-amounts {
    display: grid;
    justify-items: end;
    gap: 0.25rem;
    color: #5e7d95;
    font-size: calc(0.84rem * 0.75);
    text-align: right;
}

.portal-list-item-title {
    color: var(--portal-primary);
    font-weight: 700;
}

.portal-list-item-meta {
    color: #648199;
    font-size: calc(0.84rem * 0.75);
}

.portal-filter-grid {
    display: grid;
    gap: 0.85rem;
}

.portal-form-grid > *,
.portal-filter-grid > * {
    min-width: 0;
}

.portal-input[type='date'],
.portal-input[type='datetime-local'] {
    font-size: calc(0.92rem * 0.75);
}

.portal-table-wrap {
    overflow-x: auto;
}

.portal-table {
    width: 100%;
    min-width: 840px;
    border-collapse: collapse;
}

.portal-table th {
    padding: 0 0 0.75rem;
    border-bottom: 1px solid #d9e8f6;
    color: #1e4a72;
    font-size: calc(0.8rem * 0.75);
    font-weight: 800;
    letter-spacing: 0.06em;
    text-align: left;
    text-transform: uppercase;
}

.portal-table td {
    padding: 0.9rem 0.35rem 0.9rem 0;
    border-bottom: 1px solid #e2edff;
    vertical-align: top;
    color: #2a4f6c;
    font-size: calc(0.92rem * 0.75);
}

.portal-transaction-list {
    display: grid;
    gap: 0.85rem;
}

.portal-transaction-card {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
    border: 1px solid var(--portal-line);
    border-radius: 1.3rem;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.portal-transaction-card-header,
.portal-transaction-card-row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
}

.portal-transaction-card-title {
    color: var(--portal-primary);
    font-size: calc(1rem * 0.75);
    font-weight: 800;
}

.portal-transaction-card-meta {
    color: #5e7d95;
    font-size: calc(0.84rem * 0.75);
    line-height: 1.45;
}

.portal-receipt-sheet {
    display: grid;
    gap: 1rem;
}

.portal-printable-receipt {
    max-width: 32rem;
    padding: 1rem;
    border: 1px solid #cfd5dc;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.portal-printable-receipt .portal-card-title {
    color: #111827;
}

.portal-receipt-paper {
    display: grid;
    gap: 0.85rem;
    width: min(100%, 22rem);
    margin: 0 auto;
    padding: 1rem 1rem 1.15rem;
    border: 1px solid #c2c2c2;
    border-radius: 4px;
    background: #fff;
    color: #111;
    font-family: 'Courier New', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.portal-receipt-paper-header {
    display: grid;
    gap: 0.15rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed #9f9f9f;
    text-align: center;
}

.portal-receipt-paper-title {
    color: #111;
    font-size: calc(1.28rem * 0.75);
    font-weight: 700;
    line-height: 1.3;
}

.portal-receipt-paper-subtitle {
    color: #374151;
    font-size: calc(0.98rem * 0.75);
    line-height: 1.45;
}

.portal-receipt-paper-meta,
.portal-receipt-paper-items,
.portal-receipt-paper-summary,
.portal-receipt-paper-footer {
    display: grid;
    gap: 0.45rem;
}

.portal-receipt-paper-meta-row,
.portal-receipt-paper-summary-row,
.portal-receipt-paper-item-main,
.portal-receipt-paper-item-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
}

.portal-receipt-paper-meta-row,
.portal-receipt-paper-item-meta,
.portal-receipt-paper-footer {
    color: #374151;
    font-size: calc(0.96rem * 0.75);
    line-height: 1.45;
}

.portal-receipt-paper-meta-row strong,
.portal-receipt-paper-item-main strong {
    color: #111;
    font-weight: 700;
    text-align: right;
}

.portal-receipt-paper-section {
    display: grid;
    gap: 0.55rem;
}

.portal-receipt-paper-section-title {
    padding-bottom: 0.35rem;
    border-bottom: 1px solid #bdbdbd;
    color: #111;
    font-size: calc(0.96rem * 0.75);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.portal-receipt-paper-item {
    display: grid;
    gap: 0.2rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px dashed #bbbbbb;
}

.portal-receipt-paper-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.portal-receipt-paper-item-main {
    color: #111;
    font-size: calc(1rem * 0.75);
    font-weight: 700;
    line-height: 1.45;
}

.portal-receipt-paper-item-main span,
.portal-receipt-paper-item-meta span,
.portal-receipt-paper-meta-row span {
    min-width: 0;
}

.portal-receipt-paper-item-main span {
    overflow-wrap: anywhere;
}

.portal-receipt-paper-item-meta {
    font-size: calc(0.9rem * 0.75);
}

.portal-receipt-paper-summary {
    padding-top: 0.65rem;
    border-top: 1px solid #bdbdbd;
}

.portal-receipt-paper-summary-row {
    color: #111;
    font-size: calc(1.02rem * 0.75);
}

.portal-receipt-paper-summary-row--total {
    padding-top: 0.35rem;
    border-top: 1px dashed #9f9f9f;
    font-size: calc(1.12rem * 0.75);
    font-weight: 700;
}

.portal-receipt-paper-summary-row--total strong {
    font-size: calc(1.32rem * 0.75);
}

.portal-receipt-paper-footer {
    padding-top: 0.7rem;
    border-top: 1px dashed #9f9f9f;
    text-align: center;
}

.portal-receipt-highlight {
    border: 1px solid rgba(95, 167, 219, 0.22);
    border-radius: 1.35rem;
    background: linear-gradient(145deg, rgba(10, 59, 92, 0.98), rgba(31, 80, 119, 0.92));
    padding: 1.1rem;
    color: white;
}

.portal-receipt-reference {
    color: var(--portal-cream);
    font-size: calc(1.55rem * 0.75);
    font-weight: 800;
    letter-spacing: 0.04em;
}

.portal-receipt-label {
    color: rgba(255, 255, 255, 0.72);
    font-size: calc(0.76rem * 0.75);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.portal-receipt-value {
    color: var(--portal-primary);
    font-size: calc(1rem * 0.75);
    font-weight: 700;
}

.portal-flash,
.portal-error {
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    font-size: calc(0.92rem * 0.75);
    font-weight: 600;
}

.portal-flash {
    border: 1px solid rgba(15, 118, 110, 0.2);
    background: rgba(15, 118, 110, 0.08);
    color: var(--portal-success);
}

.portal-error {
    border: 1px solid rgba(177, 62, 62, 0.18);
    background: rgba(177, 62, 62, 0.08);
    color: var(--portal-danger);
}

.portal-empty {
    padding: 1.25rem;
    border: 1px dashed var(--portal-line);
    border-radius: 1.25rem;
    background: #f8fbff;
    color: #62819a;
    text-align: center;
}

.portal-mobile-only {
    display: grid;
}

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

.portal-link {
    color: var(--portal-primary);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgba(10, 59, 92, 0.25);
    text-underline-offset: 0.2rem;
}

.portal-login-shell {
    display: grid;
    gap: 1rem;
}

.portal-login-card {
    max-width: 28rem;
    margin: 0 auto;
}

.portal-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1rem;
}

.portal-pagination-meta {
    color: #5f7a90;
    font-size: calc(0.85rem * 0.75);
}

@media (max-width: 480px) {
    .portal-field-label {
        font-size: calc(0.74rem * 0.75);
        letter-spacing: 0.04em;
    }

    .portal-input[type='date'],
    .portal-input[type='datetime-local'] {
        padding: 0.8rem 0.85rem;
        font-size: calc(0.85rem * 0.75);
    }
}

@media (min-width: 768px) {
    .portal-content {
        padding: 1.25rem;
    }

    .portal-card--receipt {
        padding: 1.75rem;
    }

    .portal-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .portal-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .portal-pos-toolbar {
        grid-template-columns: minmax(0, 1fr) minmax(14rem, 0.65fr);
        align-items: end;
    }

    .portal-pos-item-grid {
        grid-template-columns: minmax(0, 1.6fr) repeat(5, minmax(0, 1fr));
        align-items: end;
    }

    .portal-filter-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        align-items: end;
    }

    .portal-login-grid {
        grid-template-columns: 1.15fr 0.85fr;
        align-items: stretch;
    }

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

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

@media (min-width: 1024px) {
    .portal-shell {
        padding: 1rem 0;
    }

    .portal-profile-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .portal-report-grid {
        grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.55fr);
    }
}

@media print {
    @page {
        margin: 12mm;
    }

    body.portal-body {
        background: white;
    }

    .portal-shell {
        width: 100%;
        padding: 0;
    }

    .portal-frame,
    .portal-card {
        box-shadow: none;
    }

    .portal-header,
    .portal-nav,
    .portal-button-row,
    .portal-receipt-actions,
    .portal-flash,
    .portal-card--hero,
    .portal-report-sidebar,
    .portal-receipt-preview-column {
        display: none !important;
    }

    .portal-content {
        min-height: auto;
        background: white;
        padding: 0;
    }

    .portal-card,
    .portal-frame {
        border: none;
        background: white;
    }

    .portal-profile-grid {
        display: block;
    }

    .portal-printable-receipt {
        max-width: 82mm;
        margin: 0 auto;
        padding: 0;
        border: none;
        box-shadow: none;
    }

    .portal-printable-receipt .portal-section-divider {
        display: none;
    }

    .portal-receipt-paper {
        width: 100%;
        padding: 0;
        border: none;
        box-shadow: none;
        border-radius: 0;
    }
}
