/* === Reset i zmienne === */
:root {
    --bg: #f9fafc;
    --form-bg: #ffffff;
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --border: #e5e7eb;
    --text: #111827;
    --muted: #6b7280;
    --input-bg: #f3f4f6;
    --radius: 14px;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

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

html, body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    color: var(--text);
    padding: 4rem 2rem;
    line-height: 1.6;
    background: linear-gradient(270deg, #fdfbfb, #ebedee, #dfe9f3);
    background-size: 600% 600%;
    animation: gradientBackground 15s ease infinite;
}

@keyframes gradientBackground {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

h1, h2 {
    font-weight: 600;
    margin-bottom: 1.2rem;
}

/* === Wrapper & Layout === */
.invoice-wrapper {
    max-width: 720px;
    width: 100%;
    margin: auto;
    background: var(--form-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 3rem;
}

.invoice-header {
    text-align: center;
    margin-bottom: 2rem;
}

.subtitle {
    font-size: 1rem;
    color: var(--muted);
}

.section-block {
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
    letter-spacing: -0.5px;
}

/* === Form structure === */
.invoice-form .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
    width: 100%;
}

.invoice-form label {
    font-size: 0.95rem;
    color: var(--muted);
    margin-bottom: 0.4rem;
}

.invoice-form input,
.invoice-form select,
.invoice-form textarea {
    padding: 0.9rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--input-bg);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

.invoice-form input:focus,
.invoice-form select:focus,
.invoice-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background-color: #fff;
}

.invoice-form textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    width: 100%;
}

.form-row .form-group {
    flex: 1 1 100%;
    min-width: 0;
}

.checkbox {
    display: flex;
    align-items: center;
}

.checkbox label {
    margin-bottom: 0;
    font-weight: 500;
}

/* === Button === */
.submit-button {
    display: block;
    width: 100%;
    padding: 1rem 1.2rem;
    background-color: var(--primary);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
}

.submit-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

.submit-button:active {
    transform: scale(0.98);
}

.form-footer {
    margin-top: 2.5rem;
}

/* === Responsive === */
@media (max-width: 768px) {
    body {
        padding: 2rem 1rem;
    }

    .invoice-wrapper {
        padding: 2rem 1.2rem;
    }

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

    .form-row .form-group {
        flex: 1 1 100%;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.4rem;
    }
    h2 {
        font-size: 1.2rem;
    }
}