* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #111827;
    --primary-hover: #374151;
    --background: #f4f5f7;
    --surface: #ffffff;
    --surface-soft: #f9fafb;
    --border: #e5e7eb;
    --border-strong: #d1d5db;
    --text: #111827;
    --muted: #6b7280;
    --link: #2563eb;
    --button-text: #ffffff;
    --shadow: 0 18px 50px rgba(17, 24, 39, 0.08);
}

body {
    min-height: 100dvh;
    background: var(--background);
    color: var(--text);
    padding: 24px;
    font-family: Montserrat, Arial, sans-serif;
    text-rendering: geometricPrecision;
}

.app {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 760px;
    min-height: calc(100dvh - 48px);
    margin: 0 auto;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 40px;
}

.app--document {
    align-items: stretch;
    justify-content: flex-start;
    max-width: 980px;
    padding-top: 48px;
    padding-bottom: 56px;
}

.app__logo {
    width: 144px;
    height: 144px;
    border-radius: 28px;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
}

.app__title {
    font-size: 30px;
    line-height: 1.2;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 28px;
    text-align: center;
}

.app__description {
    display: flex;
    justify-content: center;
}

.app__documents {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 18px;
    margin-top: 28px;
    font-size: 14px;
    line-height: 1.4;
}

.app__documents a {
    color: var(--muted);
    text-decoration: none;
}

.app__documents a:hover {
    color: var(--text);
}

.app__documents a:focus-visible,
.content a:focus-visible,
.app-button:focus-visible {
    outline: 2px solid var(--link);
    outline-offset: 3px;
}

.app-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    background-color: var(--primary);
    color: var(--button-text);
    border: 1px solid var(--primary);
    border-radius: 10px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.app-button:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.content .app-button {
    color: var(--button-text);
    text-decoration: none;
}

.content .app-button:hover {
    color: var(--button-text);
}

.content-title {
    width: 100%;
    max-width: 820px;
    font-size: 28px;
    line-height: 1.25;
    font-weight: 600;
    color: var(--text);
    margin: 0 auto 24px;
}

.content {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    font-size: 16px;
    color: var(--text);
    line-height: 1.7;
    margin-bottom: auto;
    overflow-wrap: break-word;
}

.content h2 {
    font-size: 22px;
    font-weight: 600;
    margin-top: 28px;
    margin-bottom: 10px;
    line-height: 1.3;
}

.content h3 {
    font-size: 18px;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 8px;
    line-height: 1.35;
}

.content p {
    margin-bottom: 12px;
    margin-top: 0;
}

.content ul,
.content ol {
    padding-left: 24px;
    margin-bottom: 14px;
}

.content a {
    color: var(--link);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.content li {
    margin-bottom: 6px;
}

.content strong {
    font-weight: 600;
}

.content blockquote {
    border-left: 3px solid var(--border-strong);
    margin: 18px 0;
    padding: 4px 0 4px 16px;
    color: var(--muted);
}

.content code {
    padding: 2px 6px;
    border-radius: 6px;
    background-color: var(--surface-soft);
    border: 1px solid var(--border);
    font-family: monospace;
    font-size: 0.92em;
}

.content hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 28px 0;
}

.table-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    margin: 18px 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    -webkit-overflow-scrolling: touch;
}

.content table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    margin: 18px 0;
    font-size: 15px;
}

.table-scroll table {
    margin: 0;
}

.content th,
.content td {
    border: 1px solid var(--border);
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.content th {
    background-color: var(--surface-soft);
    font-weight: 600;
}

.table-scroll table th:first-child,
.table-scroll table td:first-child {
    border-left: 0;
}

.table-scroll table th:last-child,
.table-scroll table td:last-child {
    border-right: 0;
}

.table-scroll table tr:first-child th,
.table-scroll table tr:first-child td {
    border-top: 0;
}

.table-scroll table tr:last-child th,
.table-scroll table tr:last-child td {
    border-bottom: 0;
}

.receipt .table-scroll table {
    min-width: 640px;
}

.receipt .table-scroll--items table {
    width: max-content;
    min-width: 100%;
}

.receipt .table-scroll--items th,
.receipt .table-scroll--items td {
    overflow-wrap: normal;
    white-space: nowrap;
}

.receipt .table-scroll--summary table,
.receipt .table-scroll--settlements table {
    min-width: 520px;
}

.receipt__download {
    border: none;
    outline: none;
    width: fit-content;
    cursor: pointer;
    appearance: none;
}

.receipt__download:focus-visible {
    outline: 2px solid var(--link);
    outline-offset: 3px;
}

.receipt__download-icon {
    color: #ffffff;
    font-family: "Material Symbols Outlined";
    font-size: 22px;
    font-weight: normal;
    font-style: normal;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    direction: ltr;
    -webkit-font-feature-settings: "liga";
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "liga";
    font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.receipt__actions {
    display: flex;
    justify-content: flex-start;
    margin-top: 24px;
}

@media print {
    body {
        background-color: #ffffff;
        padding: 0;
    }

    .app {
        min-height: auto;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
        display: block;
        max-width: none;
    }

    .app > * {
        display: none !important;
    }

    .app .receipt {
        display: block !important;
        width: 100%;
        max-width: none;
        margin: 0;
        font-size: 12px;
        line-height: 1.3;
    }

    .receipt > * {
        display: none !important;
    }

    .receipt .table-scroll {
        display: block !important;
        overflow: visible !important;
        border: 0;
        border-radius: 0;
        margin: 0 0 12px;
    }

    .receipt table {
        display: table !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 0;
        font-size: 12px;
        page-break-inside: avoid;
    }

    .receipt thead {
        display: table-header-group !important;
    }

    .receipt tbody {
        display: table-row-group !important;
    }

    .receipt tr {
        display: table-row !important;
    }

    .receipt th,
    .receipt td {
        display: table-cell !important;
    }
}

@media (max-width: 640px) {
    body {
        padding: 8px;
    }

    .app {
        min-height: calc(100dvh - 16px);
        border-radius: 18px;
        padding: 28px 18px;
    }

    .app--document {
        padding-top: 28px;
        padding-bottom: 36px;
    }

    .app__logo {
        width: 112px;
        height: 112px;
        border-radius: 22px;
    }

    .app__title {
        font-size: 26px;
    }

    .content-title {
        font-size: 23px;
    }

    .content {
        font-size: 16px;
    }

    .content h2 {
        font-size: 20px;
    }

    .content h3 {
        font-size: 17px;
    }

    .content table {
        font-size: 14px;
    }
}
