/* ════════════════════════════════════════ */
/* style.css - الهوية البصرية لمحمد جبر للنجارة والديكور */
/* ════════════════════════════════════════ */

/* ── استيراد خطوط Alexandria & Amiri & Plus Jakarta Sans ── */
@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Alexandria:wght@200;300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600&display=swap');

* {
    font-family: 'Alexandria', sans-serif;
}

.font-brand {
    font-family: 'Amiri', serif;
}

.font-en {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* ── ألوان وتدرج الـ Sidebar (أخضر داكن ملكي مع رمال دافئة) ── */
.sidebar-gradient {
    background: linear-gradient(180deg, #163725 0%, #0e2418 60%, #08170f 100%) !important;
}

.mobile-top-header {
    background: linear-gradient(135deg, #163725 0%, #0e2418 100%) !important;
    color: #ffffff !important;
    border-bottom: 1px solid rgba(223, 215, 187, 0.25);
}

/* ── أنيميشن Toast ── */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translate(-50%, 0);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ── خلفية صفحات تسجيل الدخول والمصادقة ── */
.auth-bg {
    background: radial-gradient(circle at top right, #235339 0%, #163725 40%, #0e2418 100%);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.auth-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(236, 229, 204, 0.12) 0%, transparent 70%);
    animation: float 8s ease-in-out infinite;
}

.auth-bg::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(236, 229, 204, 0.08) 0%, transparent 70%);
    animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(30px, -30px) rotate(5deg); }
}

/* ── تأثير الزجاج ── */
.glass-card {
    background: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(223, 215, 187, 0.6);
}

/* ── تحسينات الإدخال ── */
.input-field {
    transition: all 0.3s ease;
    border: 1.5px solid #dfd7bb;
    background-color: #fdfbf7;
}

.input-field:focus {
    border-color: #163725;
    box-shadow: 0 0 0 4px rgba(22, 55, 37, 0.12);
    outline: none;
    background-color: #ffffff;
}

.speech-field-wrap {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    width: 100%;
}

.speech-field-wrap .input-field {
    flex: 1;
    min-width: 0;
}

.speech-trigger {
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.85rem;
    border: 1px solid #dfd7bb;
    background: #ffffff;
    color: #163725;
    transition: all 0.2s ease;
    cursor: pointer;
}

.speech-trigger:hover:not(:disabled) {
    background: #f7f4ea;
    border-color: #163725;
    color: #163725;
}

.speech-trigger:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.speech-trigger.is-listening {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.speech-trigger--label {
    width: 2.25rem;
    height: 2.25rem;
}

.auto-grow-textarea {
    resize: none;
    overflow: hidden;
    line-height: 1.6;
}

/* ── أنماط الجدول ── */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: right;
}

.data-table thead th {
    padding: 0.85rem 1.25rem;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #163725;
    color: #ece5cc;
    text-align: right;
    border-bottom: 2px solid #dfd7bb;
    white-space: nowrap;
}

.data-table thead th:first-child {
    border-top-right-radius: 0.75rem;
}

.data-table thead th:last-child {
    border-top-left-radius: 0.75rem;
}

.data-table tbody td {
    padding: 0.95rem 1.25rem;
    border-bottom: 1px solid #dfd7bb;
    color: #181b19;
    font-size: 0.85rem;
}

.data-table tbody tr {
    transition: all 0.2s ease;
}

.data-table tbody tr:hover {
    background: #fdfbf7;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr.clickable-row {
    cursor: pointer;
}

.data-table tbody tr.clickable-row td {
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.data-table tbody tr.clickable-row:hover td {
    background: #f7f4ea/60;
}

.data-table tbody tr.clickable-row:hover td:first-child {
    box-shadow: inset 3px 0 0 #163725;
}

.data-table tbody tr.clickable-row:focus-visible {
    outline: none;
}

.data-table tbody tr.clickable-row:focus-visible td {
    background: #f7f4ea;
}

.data-table tbody tr.clickable-row:focus-visible td:first-child {
    box-shadow: inset 3px 0 0 #163725;
}

.row-actions-cell {
    white-space: nowrap;
}

/* ── أزرار مخصصة (الهوية الملكية) ── */
.quotation-items-table {
    table-layout: fixed;
}

.quotation-items-table thead th,
.quotation-items-table tbody td {
    padding-right: 1rem;
    padding-left: 1rem;
}

.quotation-col-code {
    width: 6.5rem;
}

.quotation-col-unit,
.quotation-col-qty {
    width: 5rem;
}

.quotation-col-unit-price,
.quotation-col-total {
    width: 7.5rem;
}

.quotation-description-cell {
    white-space: normal;
    line-height: 1.9;
    word-break: break-word;
}

.quotation-nowrap-cell {
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #163725, #235339);
    color: #fdfbf7;
    padding: 0.625rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    box-shadow: 0 2px 8px rgba(22, 55, 37, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0e2418, #163725);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(22, 55, 37, 0.35);
    color: #ece5cc;
}

.btn-secondary {
    background: #f7f4ea;
    color: #163725;
    padding: 0.625rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid #dfd7bb;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.btn-secondary:hover {
    background: #ece5cc;
    border-color: #c4b891;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 0.625rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #163725, #235339);
    color: #ece5cc;
    padding: 0.625rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.btn-success:hover {
    background: linear-gradient(135deg, #0e2418, #163725);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(22, 55, 37, 0.3);
}

/* ── كروت الإحصائيات ── */
.stat-card {
    background: white;
    border-radius: 1.25rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #dfd7bb/50;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 3px;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(22, 55, 37, 0.08);
}

.stat-card.blue::before { background: linear-gradient(90deg, #163725, #235339); }
.stat-card.green::before { background: linear-gradient(90deg, #163725, #34d399); }
.stat-card.purple::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.stat-card.orange::before { background: linear-gradient(90deg, #c4b891, #ece5cc); }

/* ── Scrollbar مخصص ── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f7f4ea;
}

::-webkit-scrollbar-thumb {
    background: #dfd7bb;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c4b891;
}

/* ── Modal ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(14, 36, 24, 0.6);
    backdrop-filter: blur(6px);
    z-index: 9997;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: #fdfbf7;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(14, 36, 24, 0.35);
    width: 100%;
    max-width: 32rem;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid #dfd7bb;
    animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Empty State ── */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state svg {
    width: 4rem;
    height: 4rem;
    color: #dfd7bb;
    margin: 0 auto 1rem;
}

.empty-state h3 {
    color: #163725;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #626a64;
    font-size: 0.875rem;
}

/* ── Loading Spinner ── */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(236, 229, 204, 0.3);
    border-top-color: #ece5cc;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}

.spinner-dark {
    border-color: rgba(22, 55, 37, 0.2);
    border-top-color: #163725;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── قسم عرض الأسعار ── */
.quotation-section {
    border: 1.5px solid #dfd7bb;
    border-radius: 1.25rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
    transition: all 0.2s ease;
    background: #ffffff;
}

.quotation-section:hover {
    border-color: #163725;
}

.section-header {
    background: #f7f4ea;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #dfd7bb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-toggle {
    width: 100%;
    cursor: pointer;
    text-align: inherit;
    transition: background 0.2s ease;
    border: none;
    gap: 1rem;
}

.section-toggle:hover {
    background: #ece5cc/70;
}

.section-toggle-main {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
    text-align: right;
}

.section-toggle-icon {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    border: 1px solid #dfd7bb;
    background: #ffffff;
    color: #163725;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    flex-shrink: 0;
}

.section-title-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    min-width: 0;
}

.section-items-count {
    color: #626a64;
    font-size: 0.75rem;
    font-weight: 600;
}

.quotation-section-body {
    background: #ffffff;
}

.quotation-section.is-collapsed .section-header {
    border-bottom: none;
}

.quotation-section.is-collapsed .section-toggle-icon {
    transform: rotate(-90deg);
}

.quotation-section.is-collapsed .quotation-section-body {
    display: none;
}

/* ── تأثير النقر على الأزرار ── */
button:active:not(:disabled) {
    transform: scale(0.98);
}

/* ── تأثير تحميل ── */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(253, 251, 247, 0.85);
    backdrop-filter: blur(6px);
    z-index: 9996;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── File Card ── */
.file-card {
    background: #f7f4ea;
    border: 1px solid #dfd7bb;
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.file-card:hover {
    background: #ece5cc;
    border-color: #c4b891;
}

/* ── Print Styles ── */
.signature-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.45rem 0.8rem;
    border-radius: 9999px;
    background: #f7f4ea;
    border: 1px solid #dfd7bb;
    cursor: pointer;
    user-select: none;
}

.signature-switch-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.signature-switch-track {
    position: relative;
    width: 2.8rem;
    height: 1.6rem;
    border-radius: 9999px;
    background: #dfd7bb;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.signature-switch-track::after {
    content: '';
    position: absolute;
    top: 0.175rem;
    right: 0.18rem;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 9999px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(22, 55, 37, 0.18);
    transition: transform 0.2s ease;
}

.signature-switch-input:checked + .signature-switch-track {
    background: #163725;
}

.signature-switch-input:checked + .signature-switch-track::after {
    transform: translateX(-1.18rem);
}

.signature-switch-text {
    color: #163725;
    font-size: 0.82rem;
    font-weight: 700;
}

.print-only {
    display: none;
}

/* ════════════════════════════════════════════════════════════ */
/* Executive Brand Theme – Screen Components                  */
/* ════════════════════════════════════════════════════════════ */

/* Hero Document Card (بطاقة المستند الملكية بالأخضر والذهب) */
.brand-hero-card {
    background: linear-gradient(135deg, #163725 0%, #1c4730 45%, #0e2418 100%);
    border: 1px solid rgba(223, 215, 187, 0.4);
    border-radius: 1.25rem;
    padding: 1.75rem;
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(22, 55, 37, 0.15), 0 2px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.brand-hero-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(236, 229, 204, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.brand-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border-radius: 0.5rem;
    background: rgba(236, 229, 204, 0.15);
    border: 1px solid rgba(236, 229, 204, 0.3);
    color: #ece5cc;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    backdrop-filter: blur(4px);
}

.brand-hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.85rem;
    border-radius: 0.65rem;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(236, 229, 204, 0.15);
    color: #ece5cc;
    font-size: 0.78rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

.brand-hero-chip svg {
    color: #c4b891;
}

.brand-hero-total-box {
    text-align: left;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(236, 229, 204, 0.25);
    border-radius: 1rem;
    padding: 1rem 1.5rem;
    backdrop-filter: blur(8px);
}

.brand-hero-total-val {
    font-size: 2rem;
    font-weight: 800;
    color: #ece5cc;
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-family: 'Plus Jakarta Sans', 'Alexandria', sans-serif;
}

/* Actions Toolbar (شريط الإجراءات الفاخر) */
.brand-toolbar {
    background: #ffffff;
    border: 1px solid #dfd7bb;
    border-radius: 1.25rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 4px 15px rgba(22, 55, 37, 0.04);
    margin-bottom: 1.5rem;
}

/* Grand Total Card on Screen (بطاقة الإجمالي الكلي الموثوقة) */
.brand-grand-total-card {
    background: linear-gradient(135deg, #163725 0%, #1c4730 60%, #0e2418 100%) !important;
    border: 1.5px solid rgba(223, 215, 187, 0.4) !important;
    border-radius: 1.25rem !important;
    padding: 1.5rem 2rem !important;
    color: #ffffff !important;
    box-shadow: 0 10px 25px rgba(22, 55, 37, 0.2) !important;
    margin-top: 1.5rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.brand-grand-total-card .total-label {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: #ece5cc !important;
}

.brand-grand-total-card .total-amount {
    font-size: 2.25rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    font-family: 'Plus Jakarta Sans', 'Alexandria', sans-serif !important;
    letter-spacing: -0.02em !important;
}

/* ════════════════════════════════════════════════════════════ */
/* Luxury Brand Print Styles (Mohammad Jaber Decor)           */
/* ════════════════════════════════════════════════════════════ */

.quotation-print-header {
    margin-bottom: 1.25rem;
}

.print-topbar {
    height: 4px;
    background: #163725;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.quotation-print-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #163725;
}

.print-hero-brand {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.print-hero-logo {
    width: 4.5rem;
    height: 4.5rem;
    object-fit: contain;
    flex-shrink: 0;
}

.quotation-print-company {
    color: #163725;
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.15rem;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.quotation-print-company-sub {
    color: #626a64;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-family: 'Plus Jakarta Sans', sans-serif;
    margin-bottom: 0.25rem;
}

.print-hero-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    background: #163725;
    color: #ece5cc;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
}

.quotation-print-description {
    color: #626a64;
    font-size: 0.8rem;
    line-height: 1.6;
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #fdfbf7;
    border-right: 3px solid #163725;
    border-radius: 0.35rem;
}

.quotation-print-docbox {
    border: 1.5px solid #dfd7bb;
    border-radius: 0.65rem;
    background: #fdfbf7;
    padding: 0.75rem 1rem;
    min-width: 13rem;
    box-shadow: 0 1px 3px rgba(22, 55, 37, 0.04);
}

.print-docbox-title {
    font-size: 0.65rem;
    font-weight: 800;
    color: #163725;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 1.5px solid #dfd7bb;
}

.quotation-print-docrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.quotation-print-docrow + .quotation-print-docrow {
    margin-top: 0.45rem;
    padding-top: 0.45rem;
    border-top: 1px dashed #dfd7bb;
}

.quotation-print-docrow span {
    color: #626a64;
    font-size: 0.7rem;
    font-weight: 600;
}

.quotation-print-docrow strong {
    color: #163725;
    font-size: 0.82rem;
    font-weight: 800;
}

.quotation-print-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(min-content, 1fr));
    gap: 0;
    margin-top: 0.85rem;
    border: 1.5px solid #dfd7bb;
    border-radius: 0.65rem;
    overflow: clip;
    background: #ffffff;
}

.quotation-print-summary-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-left: 1px solid #dfd7bb;
}

.quotation-print-summary-item:last-child {
    border-left: none;
}

.print-summary-icon {
    justify-content: center;
    border-radius: 0.45rem;
    background: #f7f4ea;
    color: #163725;
}

.print-summary-icon svg {
    width: 1.1rem;
    height: 1.1rem;
}

.print-summary-total .print-summary-icon {
    background: #163725;
    color: #ece5cc;
}

.quotation-print-summary-item span {
    color: #626a64;
    font-size: 0.62rem;
    font-weight: 600;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.1rem;
}

.quotation-print-summary-item strong {
    color: #163725;
    font-size: 0.88rem;
    font-weight: 800;
    display: block;
    white-space: normal;
    word-break: break-word;
    line-height: 1.4;
}

.quotation-print-approval {
    margin: 1.75rem 0 0 0;
    break-inside: avoid;
    page-break-inside: avoid;
}

.quotation-approval-card {
    border: 1.5px solid #dfd7bb;
    border-radius: 0.65rem;
    padding: 1.25rem 1.5rem 1rem;
    background: #fdfbf7;
}

.approval-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}

.approval-col {
    text-align: center;
}

.approval-col-title {
    font-size: 0.75rem;
    font-weight: 800;
    color: #163725;
    margin-bottom: 2rem;
}

.approval-sig-line {
    border-bottom: 1.5px solid #c4b891;
    margin-bottom: 0.45rem;
}

.approval-sig-label {
    font-size: 0.65rem;
    color: #626a64;
    font-weight: 600;
}

.print-footer {
    margin-top: 1.5rem;
    text-align: center;
}

.print-footer-line {
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #163725 25%, #163725 75%, transparent 100%);
    margin-bottom: 0.6rem;
    opacity: 0.25;
}

.print-footer-text {
    font-size: 0.65rem;
    color: #626a64;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* ════════════════════════════════════════════════════════════ */
/* Mobile Responsive Styles                                   */
/* ════════════════════════════════════════════════════════════ */

@media screen and (max-width: 768px) {
    main.lg\:mr-72 {
        padding: 1rem !important;
        padding-top: 5rem !important;
    }

    .quotation-section .data-table thead {
        display: none;
    }

    .quotation-section .data-table,
    .quotation-section .data-table tbody {
        display: block;
        width: 100%;
    }

    .quotation-section .data-table tbody tr {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        padding: 0.85rem;
        margin-bottom: 0.65rem;
        background: #fdfbf7;
        border: 1px solid #dfd7bb;
        border-radius: 0.75rem;
        position: relative;
    }

    .quotation-section .data-table tbody tr:hover {
        background: #f7f4ea;
    }

    .quotation-section .data-table tbody td {
        display: flex;
        flex-direction: column;
        padding: 0.25rem 0 !important;
        border-bottom: none !important;
        font-size: 0.82rem;
    }

    .quotation-section .data-table tbody td::before {
        content: attr(data-label);
        font-size: 0.65rem;
        font-weight: 700;
        color: #626a64;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        margin-bottom: 0.2rem;
        display: block;
    }

    .quotation-section .data-table tbody td:nth-child(2) {
        grid-column: 1 / -1;
        order: -1;
    }

    .quotation-section .data-table tbody td:last-child {
        position: absolute;
        top: 0.5rem;
        left: 0.5rem;
        padding: 0 !important;
    }

    .quotation-section .data-table tbody td:last-child::before {
        display: none;
    }

    .quotation-section .data-table tbody td.item-total {
        font-size: 1rem !important;
        font-weight: 800;
        color: #163725;
    }
}

@page {
    size: A4;
    margin: 10mm 12mm;
}

@media print {
    html, body { background: #ffffff !important; }
    body { color: #181b19 !important; font-size: 11.5px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .no-print { display: none !important; }
    .print-only { display: block !important; }
    .print-approval-disabled { display: none !important; }
    .sidebar-gradient, header, #sidebarOverlay, #sidebarContainer, #quotationHeader { display: none !important; }
    main { margin: 0 !important; padding: 0 !important; }
    a { color: inherit !important; text-decoration: none !important; }
    .quotation-print-header, #grandTotalBar, .quotation-print-approval, .print-footer { break-inside: avoid; page-break-inside: avoid; }
    #sectionsContainer > div { break-inside: auto; page-break-inside: auto; box-shadow: none !important; border: 1.5px solid #dfd7bb !important; border-radius: 0.65rem !important; margin-bottom: 0.85rem !important; overflow: hidden; }
    .data-table tbody tr { break-inside: avoid; page-break-inside: avoid; }
    .quotation-section .section-header { break-inside: avoid; page-break-inside: avoid; break-after: avoid; page-break-after: avoid; background: #f7f4ea !important; border-bottom: 1.5px solid #dfd7bb !important; padding: 0.6rem 1rem !important; }
    .quotation-section-name { font-size: 0.82rem !important; }
    .quotation-section-total { font-size: 0.75rem !important; }
    .quotation-section-body { display: block !important; }
    .data-table thead { display: table-header-group !important; }
    .data-table tbody { display: table-row-group; }
    .quotation-section .section-toggle-icon { display: none !important; }
    .section-items-count { display: none !important; }
    .table-container { overflow: visible !important; }
    .data-table { width: 100%; border-collapse: collapse; }
    .data-table th { background: #163725 !important; color: #ece5cc !important; font-weight: 700 !important; white-space: nowrap; font-size: 0.68rem !important; padding: 0.5rem 0.5rem !important; border: none !important; letter-spacing: 0.02em; }
    .data-table th:first-child { border-radius: 0 0.35rem 0 0; }
    .data-table th:last-child { border-radius: 0.35rem 0 0 0; }
    .data-table td { padding: 0.55rem 0.5rem !important; border-bottom: 1px solid #dfd7bb !important; font-size: 0.75rem !important; color: #181b19 !important; vertical-align: top; }
    .data-table tbody tr:nth-child(even) td { background: #fdfbf7 !important; }
    .data-table tbody tr:last-child td { border-bottom: 2px solid #dfd7bb !important; }
    .quotation-items-table { table-layout: fixed; }
    .quotation-items-table th, .quotation-items-table td { padding-right: 0.4rem !important; padding-left: 0.4rem !important; }
    .quotation-col-code { width: 4.5rem; }
    .quotation-col-unit, .quotation-col-qty { width: 3.5rem; }
    .quotation-col-unit-price, .quotation-col-total { width: 6rem; }
    .quotation-description-cell { white-space: normal !important; line-height: 1.65 !important; }
    .quotation-section-total { color: #163725 !important; }
    #grandTotalBar { background: #163725 !important; border: none !important; border-radius: 0.65rem !important; box-shadow: none !important; padding: 0.85rem 1.5rem !important; margin-top: 1rem !important; }
    #grandTotalBar p:first-child { color: rgba(236,229,204,0.8) !important; font-size: 0.82rem !important; }
    #grandTotalBar p:last-child { color: #ffffff !important; font-size: 1.45rem !important; font-weight: 800 !important; }
    #sectionsContainer > div[class*="border-amber"] { border-color: #dfd7bb !important; border-width: 1.5px !important; }
    body.work-description-print-mode .quotation-col-unit, body.work-description-print-mode .quotation-col-qty, body.work-description-print-mode .quotation-col-total, body.work-description-print-mode .quotation-cell-unit, body.work-description-print-mode .quotation-cell-qty, body.work-description-print-mode .quotation-cell-total { display: none !important; }
    body.work-description-print-mode .quotation-col-code { width: 4.5rem; }
    body.work-description-print-mode .quotation-col-unit-price { width: 6rem; }
    body.work-description-print-mode .quotation-description-cell { padding-right: 0.2rem !important; padding-left: 0.2rem !important; }
}
