:root {
    --primary-color: #2c3e50;
    --primary-hover: #1a252f;
    --background-color: #f3f4f6;
    --surface-color: #ffffff;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --radius: 0.5rem;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
    padding: 1rem;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 1.75rem;
}

h2 {
    font-size: 1.25rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    margin-top: 2rem;
    color: var(--text-color);
}

.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"],
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.2s;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.col {
    flex: 1;
    min-width: 200px;
}

.line-item {
    background-color: #f9fafb;
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    position: relative;
}

.line-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.item-total {
    font-weight: bold;
    color: var(--primary-color);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 100%;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: white;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    margin-top: 1rem;
}

.btn-secondary:hover {
    background-color: #f9fafb;
}

.btn-danger {
    background-color: #ef4444;
    color: white;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    width: auto;
}

.totals-section {
    margin-top: 2rem;
    background-color: #f9fafb;
    padding: 1.5rem;
    border-radius: var(--radius);
    text-align: right;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.total-final {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    border-top: 2px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 1rem;
}

@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }

    body {
        padding: 0.5rem;
    }
}