:root {
    color-scheme: light;
    --bg: #f4f7fb;
    --panel: #ffffff;
    --text: #172033;
    --muted: #667085;
    --line: #d9e2ef;
    --primary: #155eef;
    --primary-dark: #1249bd;
    --danger: #b42318;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top left, #e0edff 0, transparent 32rem), var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.site-header {
    align-items: center;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    min-height: 72px;
    padding: 14px clamp(18px, 4vw, 48px);
}

.brand {
    align-items: center;
    color: var(--text);
    display: inline-flex;
    font-size: 1.05rem;
    font-weight: 700;
    gap: 14px;
    height: 44px;
    overflow: visible;
}

.brand img {
    height: auto;
    max-height: none;
    max-width: none;
    object-fit: contain;
    transform: scale(1.35);
    transform-origin: left center;
    width: 180px;
}

.brand span {
    display: none;
}

.brand .brand-text-visible {
    display: inline-block;
}

.page {
    margin: 0 auto;
    max-width: 1080px;
    padding: clamp(24px, 5vw, 52px) clamp(16px, 4vw, 32px);
}

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
    padding: clamp(20px, 4vw, 34px);
}

.login-card {
    margin: 30px auto 0;
    max-width: 440px;
}

h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    letter-spacing: -0.03em;
    margin: 0 0 10px;
}

p {
    color: var(--muted);
    line-height: 1.55;
}

label {
    display: block;
    font-weight: 650;
    margin: 18px 0 8px;
}

input[type="text"],
input[type="password"] {
    border: 1px solid var(--line);
    border-radius: 11px;
    font: inherit;
    padding: 12px 14px;
    width: 100%;
}

button,
.button {
    background: var(--primary);
    border: 0;
    border-radius: 11px;
    color: #fff;
    cursor: pointer;
    display: inline-block;
    font: inherit;
    font-weight: 700;
    margin-top: 22px;
    padding: 12px 18px;
}

button:hover,
.button:hover {
    background: var(--primary-dark);
    text-decoration: none;
}

.alert {
    background: #fff1f0;
    border: 1px solid #fecdca;
    border-radius: 12px;
    color: var(--danger);
    margin: 16px 0;
    padding: 12px 14px;
}

.invoice-table {
    border-collapse: collapse;
    margin-top: 22px;
    width: 100%;
}

.invoice-table th,
.invoice-table td {
    border-bottom: 1px solid var(--line);
    padding: 14px 10px;
    text-align: left;
}

.invoice-table th {
    color: var(--muted);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.amount {
    text-align: right !important;
    white-space: nowrap;
}

.empty-state {
    background: #f8fafc;
    border: 1px dashed var(--line);
    border-radius: 14px;
    margin-top: 22px;
    padding: 24px;
}

@media (max-width: 720px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .invoice-table,
    .invoice-table thead,
    .invoice-table tbody,
    .invoice-table tr,
    .invoice-table th,
    .invoice-table td {
        display: block;
    }

    .invoice-table thead {
        display: none;
    }

    .invoice-table tr {
        border-bottom: 1px solid var(--line);
        padding: 12px 0;
    }

    .invoice-table td {
        border: 0;
        padding: 7px 0;
    }

    .amount {
        text-align: left !important;
    }
}
