* {
    box-sizing: border-box;
}

body {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #161616;
    line-height: 1.5;
}

/* Header */
.header {
    background-color: #161616;
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #393939;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    gap: 2rem;
    margin: 0 auto;
}

.header h1 {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.btn-primary {
    background-color: #0f62fe;
    color: #ffffff;
    border: none;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 400;
    border-radius: 0;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: background-color 0.11s cubic-bezier(0.2, 0, 0.38, 0.9);
}

.btn-primary:hover {
    background-color: #0353e9;
}

.btn-primary:focus {
    outline: 2px solid #0f62fe;
    outline-offset: -2px;
}

/* Main content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

/* Summary cards */
.summary-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.summary-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    padding: 1.5rem;
}

.summary-card h3 {
    font-size: 0.875rem;
    font-weight: 400;
    color: #525252;
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.16px;
}

.summary-value {
    font-size: 2rem;
    font-weight: 300;
    color: #161616;
    margin: 0;
}

/* Table section */
.table-section {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
}

.table-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f4f4f4;
}

.table-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    color: #161616;
}

.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th {
    background-color: #f4f4f4;
    padding: 0.75rem 1.5rem;
    text-align: left;
    font-weight: 600;
    color: #161616;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.32px;
}

.data-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    color: #161616;
}

.data-table tbody tr:hover {
    background-color: #f4f4f4;
}

/* Amount styling */
.amount-positive {
    color: #198038;
    font-weight: 600;
}

.amount-negative {
    color: #da1e28;
    font-weight: 600;
}

/* Date formatting */
.date-cell {
    color: #525252;
    font-variant-numeric: tabular-nums;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }

    .summary-section {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .summary-card {
        padding: 1rem;
    }

    .summary-value {
        font-size: 1.5rem;
    }

    .table-header {
        padding: 1rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.75rem 1rem;
    }

    .data-table th {
        font-size: 0.75rem;
    }

    .data-table td {
        font-size: 0.875rem;
    }

    /* Stack table on very small screens */
    @media (max-width: 480px) {
        .data-table thead {
            display: none;
        }

        .data-table,
        .data-table tbody,
        .data-table tr,
        .data-table td {
            display: block;
        }

        .data-table tr {
            margin-bottom: 1rem;
            border: 1px solid #e0e0e0;
            background-color: #ffffff;
        }

        .data-table td {
            padding: 0.75rem 1rem;
            border: none;
            border-bottom: 1px solid #e0e0e0;
            position: relative;
            padding-left: 35%;
        }

        .data-table td::before {
            content: attr(data-label);
            position: absolute;
            left: 1rem;
            width: 30%;
            font-weight: 600;
            color: #525252;
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.32px;
        }

        .data-table td:last-child {
            border-bottom: none;
        }
    }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #525252;
}

.empty-state h3 {
    font-size: 1.125rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}


.btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border: 1px solid #6f6f6f;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 400;
    border-radius: 0;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.11s cubic-bezier(0.2, 0, 0.38, 0.9);
}

.btn-secondary:hover {
    background-color: #393939;
    border-color: #6f6f6f;
}

/* Main content */
.main-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Form container */
.form-container {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    padding: 2rem;
}

.form-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.form-header h2 {
    font-size: 1.5rem;
    font-weight: 400;
    margin: 0 0 0.5rem 0;
    color: #161616;
}

.form-header p {
    font-size: 0.875rem;
    color: #525252;
    margin: 0;
}

/* Alert messages */
.alert {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-left: 3px solid;
    font-size: 0.875rem;
}

.alert-success {
    background-color: #defbe6;
    border-left-color: #24a148;
    color: #0e6027;
}

.alert-error {
    background-color: #fff1f1;
    border-left-color: #da1e28;
    color: #750e13;
}

/* Form styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: #161616;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.32px;
}

.form-label.required::after {
    content: ' *';
    color: #da1e28;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-family: inherit;
    color: #161616;
    background-color: #f4f4f4;
    border: none;
    border-bottom: 1px solid #8d8d8d;
    outline: none;
    transition: all 0.11s cubic-bezier(0.2, 0, 0.38, 0.9);
}

.form-input:focus {
    background-color: #ffffff;
    border-bottom-color: #0f62fe;
    border-bottom-width: 2px;
}

.form-input:invalid {
    border-bottom-color: #da1e28;
}

.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-family: inherit;
    color: #161616;
    background-color: #f4f4f4;
    border: none;
    border-bottom: 1px solid #8d8d8d;
    outline: none;
    cursor: pointer;
    transition: all 0.11s cubic-bezier(0.2, 0, 0.38, 0.9);
}

.form-select:focus {
    background-color: #ffffff;
    border-bottom-color: #0f62fe;
    border-bottom-width: 2px;
}

/* Form grid for responsive layout */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* Button styles */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.btn-primary {
    background-color: #0f62fe;
    color: #ffffff;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 400;
    border-radius: 0;
    cursor: pointer;
    transition: background-color 0.11s cubic-bezier(0.2, 0, 0.38, 0.9);
    min-width: 120px;
}

.btn-primary:hover {
    background-color: #0353e9;
}

.btn-primary:focus {
    outline: 2px solid #0f62fe;
    outline-offset: -2px;
}

.btn-tertiary {
    background-color: transparent;
    color: #0f62fe;
    border: 1px solid #0f62fe;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 400;
    border-radius: 0;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.11s cubic-bezier(0.2, 0, 0.38, 0.9);
    min-width: 120px;
    text-align: center;
}

.btn-tertiary:hover {
    background-color: #0f62fe;
    color: #ffffff;
}

/* Helper text */
.helper-text {
    font-size: 0.75rem;
    color: #6f6f6f;
    margin-top: 0.25rem;
}

.helper-text.error {
    color: #da1e28;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }

    .form-container {
        padding: 1.5rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-tertiary {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

/* Loading state */
.btn-primary:disabled {
    background-color: #c6c6c6;
    color: #8d8d8d;
    cursor: not-allowed;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}