@import url("../variables-personal.css");


.container {
    background: white;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 10em auto;
    border-radius: 1rem;
}

.input-section {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

input[type="text"], input[type="number"] {
    padding: 14px;
    border: 1px solid var(--color-line);
    border-radius: 1rem;
    font-size: 16px;
    flex: 1;
    min-width: 150px;
    -webkit-appearance: none;
    appearance: none;
}

input[type="text"]:focus, input[type="number"]:focus {
    outline: none;
    border-color: var(--color-add);
}

button {
    padding: 14px 20px;
    background-color: var(--color-add);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
    min-height: 50px;
}

button:hover {
    background-color: var(--color-add-highlight);
}

.remove-btn {
    background-color: var(--color-error);
    padding: 8px 12px;
    font-size: 14px;
    min-height: auto;
}

.remove-btn:hover {
    background-color: var(--color-error-highlight);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 16px;
}

th, td {
    padding: 15px 8px;
    text-align: left;
    border-bottom: 1px solid var(--color-line);
    word-wrap: break-word;
}

thead tr {
    background-color: var(--color-table-head-bg);
    font-weight: bold;
    color: var(--color-body-text);
    font-size: 16px;
}

tbody tr {
    background-color: var(--color-table-body-bg);
}

tfoot tr:first-child {
    background-color: var(--color-table-foot-bg);
    font-weight: bold;
}

tfoot tr:not(:first-child) {
    background-color: var(--color-table-head-bg);
    font-weight: bold;
}

tr:hover {
    background-color: #f8f9fa;
}

.right {
    text-align: right;
}

.amount {
    font-size: 16px;
}

.empty-state {
    text-align: center;
    color: var(--color-body-text);
    font-style: italic;
    padding: 40px;
}

.error {
    border-color: var(--color-error) !important;
}

.error-message {
    color: var(--color-error);
    font-size: 14px;
    margin-top: 5px;
}

@media (max-width: 768px) {
    body {
        padding: 5px;
        font-size: 18px;
    }

    .container {
        padding: 15px;
    }

    h1 {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }

    .input-section {
        flex-direction: column;
        gap: 12px;
    }

    input[type="text"], input[type="number"] {
        padding: 16px;
        font-size: 18px;
        min-width: 100%;
        box-sizing: border-box;
    }

    button {
        padding: 16px 20px;
        font-size: 18px;
        min-height: 55px;
        width: 100%;
    }

    table {
        font-size: 16px;
        overflow-x: auto;
        white-space: nowrap;
    }

    th, td {
        padding: 12px 6px;
        min-width: 80px;
    }

    th:first-child, td:first-child {
        min-width: 120px;
    }

    .remove-btn {
        padding: 10px 14px;
        font-size: 14px;
        white-space: nowrap;
    }

    .empty-state {
        white-space: normal;
        padding: 25px 10px;
    }
}