* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f6f8;
    color: #1f2937;
}

.page {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 16px;
}

.card {
    background: #ffffff;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    margin-bottom: 24px;
}

.header,
.invoice-top,
.actions,
.summary {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

h1,
h2,
p {
    margin-top: 0;
}

.header p {
    color: #6b7280;
    margin-bottom: 0;
}

.price-box {
    background: #eef2ff;
    color: #3730a3;
    padding: 12px 16px;
    border-radius: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.grid.two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.field.grow {
    flex: 1;
}

label {
    font-size: 14px;
    font-weight: 700;
}

input,
select {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 9px;
    padding: 12px;
    font-size: 15px;
}

.store-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 12px;
    background: #fafafa;
}

button {
    border: none;
    background: #111827;
    color: #ffffff;
    padding: 12px 18px;
    border-radius: 9px;
    cursor: pointer;
    font-weight: 700;
}

button.secondary {
    background: #e5e7eb;
    color: #111827;
}

.remove-btn {
    background: #fee2e2;
    color: #991b1b;
}

.invoice {
    background: #ffffff;
}

.invoice-to {
    text-align: right;
}

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

th,
td {
    border-bottom: 1px solid #e5e7eb;
    padding: 12px;
    text-align: left;
}

th {
    background: #f9fafb;
    font-size: 14px;
}

.summary {
    margin-top: 22px;
    align-items: stretch;
}

.summary div {
    flex: 1;
    background: #f9fafb;
    border-radius: 12px;
    padding: 16px;
}

.summary span {
    display: block;
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 6px;
}

.summary strong {
    font-size: 20px;
}

.rules {
    margin-top: 20px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    padding: 14px;
    border-radius: 10px;
}

.rules p {
    margin-bottom: 0;
}

.print-btn {
    margin-top: 20px;
}

@media (max-width: 768px) {
    .grid.two,
    .summary {
        display: block;
    }

    .field,
    .summary div {
        margin-bottom: 12px;
    }

    .header,
    .invoice-top,
    .actions,
    .store-row {
        flex-direction: column;
        align-items: stretch;
    }

    .invoice-to {
        text-align: left;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media print {
    body {
        background: #ffffff;
    }

    .page {
        max-width: none;
        margin: 0;
        padding: 0;
    }

    .card {
        box-shadow: none;
        border-radius: 0;
    }

    .no-print {
        display: none !important;
    }
}
