/* Styles for the two plain (non-interactive) pages; everything else uses MudBlazor. */
.plain-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mud-palette-background-gray, #f5f5f5);
    font-family: Roboto, Helvetica, Arial, sans-serif;
}

.plain-card {
    width: min(92vw, 380px);
    padding: 32px;
    background: var(--mud-palette-surface, #fff);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.plain-card h1 {
    margin: 0 0 20px;
    font-size: 1.4rem;
    font-weight: 500;
}

.plain-card label {
    display: block;
    margin: 14px 0 4px;
    font-size: 0.9rem;
}

.plain-card input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    font: inherit;
    border: 1px solid #9e9e9e;
    border-radius: 4px;
}

.plain-card input:focus {
    outline: 2px solid var(--mud-palette-primary, #594ae2);
    outline-offset: 1px;
}

.plain-card button {
    width: 100%;
    margin-top: 22px;
    padding: 12px;
    font: inherit;
    font-weight: 500;
    color: var(--mud-palette-primary-text, #fff);
    background: var(--mud-palette-primary, #594ae2);
    border: 0;
    border-radius: 4px;
    cursor: pointer;
}

.plain-card .plain-error {
    margin: 0 0 8px;
    padding: 10px 12px;
    color: #7f1d1d;
    background: #fde8e8;
    border-radius: 4px;
}

.plain-card .plain-hint {
    margin: 0 0 8px;
    color: #555;
    font-size: 0.9rem;
}

/* Brand pack preview. Colours come from the pack being edited, never from here. */
.brand-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.brand-screen {
    width: 200px;
    height: 300px;
    border: 6px solid #263238;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    color: #212121;
    font-size: 12px;
}

.brand-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px;
    font-weight: 600;
}

.brand-bar img {
    max-height: 24px;
    max-width: 60px;
}

.brand-tiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 8px;
}

.brand-tile, .brand-button {
    padding: 10px 6px;
    border-radius: 6px;
    text-align: center;
}

.brand-result {
    padding: 16px 10px;
    text-align: center;
}

.brand-approved {
    color: #1b5e20;
    font-size: 16px;
    font-weight: 700;
}

.brand-amount {
    margin: 10px 0 16px;
    font-size: 22px;
    font-weight: 700;
}

.brand-help {
    margin-top: 12px;
    color: #555;
}

.brand-receipt {
    width: 240px;
    padding: 10px 8px;
    border: 1px solid #bdbdbd;
    background: #fff;
    color: #000;
    font: 11px/1.35 ui-monospace, Consolas, monospace;
}

/* Keep the spaces that line a receipt up, on each line only. */
.brand-receipt div {
    white-space: pre;
}

.brand-receipt img {
    display: block;
    max-width: 120px;
    max-height: 60px;
    margin: 0 auto 6px;
    filter: grayscale(1) contrast(4);
}

.brand-centre {
    text-align: center;
}

.plain-languages {
    margin-top: 16px;
    text-align: center;
    font-size: 0.9rem;
}

.plain-languages a {
    color: inherit;
    margin: 0 6px;
}

/* The shell: app bar, drawer and content. Colours come from the theme (the bank's brand). */
.portal-appbar .mud-button-label {
    text-transform: none;
}

.appbar-logo {
    max-height: 36px;
    max-width: 96px;
    margin: 0 12px 0 4px;
    background: #fff;
    border-radius: 4px;
    padding: 2px;
}

.appbar-title {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    min-width: 0;
}

.appbar-bank {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.appbar-product {
    opacity: 0.8;
}

.menu-form {
    margin: 0;
}

.menu-form button {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 6px 16px;
    border: 0;
    background: none;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.menu-form button:hover {
    background: var(--mud-palette-action-default-hover);
}

.nav-menu {
    padding-top: 8px;
}

.portal-content {
    min-height: calc(100vh - 64px);
}

/* Page header: title on the left, actions on the right; stacked on a narrow screen. */
.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 16px;
    margin-bottom: 20px;
}

.page-header-text {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
    flex: 1 1 320px;
}

.page-header-icon {
    margin-top: 4px;
}

.page-header-title {
    font-weight: 500;
}

.page-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.date-field {
    max-width: 200px;
}

/* Figures */
.stat-card {
    padding: 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-card-value {
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

/* Empty tables and panels */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 16px;
    gap: 4px;
}

.empty-state-icon {
    color: var(--mud-palette-text-disabled);
    margin-bottom: 4px;
}

.text-right {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.clickable-row {
    cursor: pointer;
}

.row-actions {
    display: inline-flex;
    white-space: nowrap;
}

.fill-height {
    height: 100%;
}

.permission-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

/* A statement, on screen and on paper */
.statement-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 2px solid var(--mud-palette-primary);
    padding-bottom: 12px;
}

.statement-summary .statement-total td {
    font-weight: 700;
    border-top: 2px solid var(--mud-palette-lines-default);
}

@media print {
    .mud-appbar, .mud-drawer, .no-print, .mud-snackbar-provider {
        display: none !important;
    }

    .mud-main-content {
        padding: 0 !important;
        margin: 0 !important;
    }

    .statement {
        border: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    body {
        background: #fff !important;
    }
}
