:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Assistant', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
}

.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-family: inherit;
}

button {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover {
    background: var(--primary-hover);
}

.nav-links {
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
}

.receipt-header-v2 {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.business-logo {
    max-width: 150px;
    max-height: 80px;
    object-fit: contain;
}

.business-details {
    text-align: left;
}

.business-details h1 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.business-details p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.receipt-title {
    text-align: center;
    margin-bottom: 2rem;
}

.receipt-title h2 {
    font-size: 1.25rem;
    color: var(--text-main);
}

.receipt-title p {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.receipt-footer {
    margin-top: 4rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.receipt-outer {
    border: 2px solid var(--border);
    position: relative;
}

/* RTL Specifics */
.business-details {
    text-align: left;
}

[dir="rtl"] .business-details {
    text-align: right;
}

.receipt-header {
    text-align: center;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.receipt-row {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.service-description {
    margin: 2rem 0;
    text-align: right;
}

.amount-box {
    margin-top: 2rem;
    background: #f1f5f9;
    padding: 1.5rem;
    border-radius: 0.75rem;
    text-align: center;
}

.amount-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th,
td {
    padding: 1rem;
    text-align: right;
    border-bottom: 1px solid var(--border);
}

th {
    background: #f8fafc;
}

@media print {
    @page {
        margin: 1cm;
    }

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

    body {
        background: white;
        margin: 0;
        padding: 0;
    }

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

    .container {
        margin: 0;
        max-width: 100%;
        width: 100%;
    }

    .receipt-outer {
        border: none;
    }
}