/* ════════════════════════════════════════ */
/* style.css - أنماط مخصصة إضافية          */
/* ════════════════════════════════════════ */

/* ── استيراد خط Tajawal ── */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&display=swap');

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

/* ── تدرج الـ Sidebar ── */
.sidebar-gradient {
    background: linear-gradient(180deg, #1e3a5f 0%, #152d4a 50%, #0f2035 100%);
}

/* ── أنيميشن 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: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 30%, #1e3a5f 60%, #152d4a 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(56, 189, 248, 0.1) 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(139, 92, 246, 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(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

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

.input-field:focus {
    border-color: #1e3a5f;
    box-shadow: 0 0 0 4px rgba(30, 58, 95, 0.1);
    outline: none;
}

.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 #dbe3ee;
    background: #ffffff;
    color: #1e3a5f;
    transition: all 0.2s ease;
    cursor: pointer;
}

.speech-trigger:hover:not(:disabled) {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.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;
    border-radius: 1rem;
}

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

.data-table thead th {
    background: #f8fafc;
    padding: 0.875rem 1.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    text-align: right;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.data-table tbody td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    font-size: 0.875rem;
}

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

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

.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: #f8fbff;
}

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

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

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

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

.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, #1e3a5f, #2d5a87);
    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-primary:hover {
    background: linear-gradient(135deg, #152d4a, #1e3a5f);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(30, 58, 95, 0.3);
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    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-secondary:hover {
    background: #e2e8f0;
}

.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, #10b981, #059669);
    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-success:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 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 #f1f5f9;
    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(0, 0, 0, 0.08);
}

.stat-card.blue::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.stat-card.green::before { background: linear-gradient(90deg, #10b981, #34d399); }
.stat-card.purple::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.stat-card.orange::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

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

.modal-content {
    background: white;
    border-radius: 1.25rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 32rem;
    max-height: 90vh;
    overflow-y: auto;
    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: #cbd5e1;
    margin: 0 auto 1rem;
}

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

.empty-state p {
    color: #94a3b8;
    font-size: 0.875rem;
}

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

.spinner-dark {
    border-color: rgba(30, 58, 95, 0.2);
    border-top-color: #1e3a5f;
}

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

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

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

.section-header {
    background: #f8fafc;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    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: #f1f5f9;
}

.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 #dbe3ee;
    background: #ffffff;
    color: #1e3a5f;
    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: #94a3b8;
    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(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    z-index: 9996;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.file-card:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* ── Print Styles ── */
.signature-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.45rem 0.8rem;
    border-radius: 9999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    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: #cbd5e1;
    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(15, 23, 42, 0.18);
    transition: transform 0.2s ease;
}

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

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

.signature-switch-text {
    color: #334155;
    font-size: 0.88rem;
    font-weight: 700;
}
.print-only {
    display: none;
}

/* ════════════════════════════════════════════════════════════ */
/* Premium Print Styles – Quotation Document                  */
/* ════════════════════════════════════════════════════════════ */

/* ── Top decorative bar ── */
.print-topbar {
    margin-bottom: 0;
}
.print-topbar-inner {
    background: #0f1b2d;
    color: #ffffff;
    padding: 0.5rem 1.5rem;
    border-radius: 0.75rem 0.75rem 0 0;
    text-align: center;
}
.print-topbar-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.9;
}

/* ── Hero header ── */
.quotation-print-header {
    margin-bottom: 1.5rem;
}

.quotation-print-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: 1.25rem;
    align-items: stretch;
    border: 2px solid #0f1b2d;
    border-top: none;
    border-radius: 0 0 0.75rem 0.75rem;
    padding: 1.5rem 1.75rem 1.25rem;
    background: linear-gradient(160deg, #f8fbff 0%, #ffffff 60%, #f0f4f8 100%);
    position: relative;
    overflow: hidden;
}

/* Subtle watermark pattern */
.quotation-print-hero::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 130px;
    height: 130px;
    border: 20px solid rgba(15, 27, 45, 0.025);
    border-radius: 50%;
    pointer-events: none;
}

.quotation-print-hero::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: 50%;
    width: 200px;
    height: 200px;
    border: 25px solid rgba(15, 27, 45, 0.015);
    border-radius: 50%;
    pointer-events: none;
}

.print-hero-content {
    position: relative;
    z-index: 1;
}

.print-hero-tag {
    display: inline-block;
    background: linear-gradient(135deg, #0f1b2d, #1e3a5f);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 0.25rem 0.85rem;
    border-radius: 0.35rem;
    margin-bottom: 0.75rem;
}

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

.quotation-print-company-sub {
    color: #475569;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    margin-top: 0.15rem;
}

.quotation-print-description {
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.7;
    max-width: 30rem;
}

/* ── Document info box ── */
.print-hero-docinfo {
    display: flex;
    align-items: stretch;
}

.quotation-print-docbox {
    border: 1.5px solid #d1d9e6;
    border-radius: 0.65rem;
    background: #ffffff;
    padding: 0.85rem 1rem;
    width: 100%;
    box-shadow: 0 1px 3px rgba(15, 27, 45, 0.04);
}

.print-docbox-title {
    font-size: 0.6rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.65rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid #e8edf3;
}

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

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

.quotation-print-docrow span {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 500;
}

.quotation-print-docrow strong {
    color: #0f1b2d;
    font-size: 0.88rem;
    font-weight: 800;
}

/* ── Summary cards ── */
.quotation-print-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin-top: 0.75rem;
    border: 1.5px solid #d1d9e6;
    border-radius: 0.65rem;
    overflow: hidden;
    background: #ffffff;
}

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

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

.print-summary-icon {
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.45rem;
    background: #f1f5f9;
    color: #475569;
}

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

.print-summary-total .print-summary-icon {
    background: #0f1b2d;
    color: #ffffff;
}

.quotation-print-summary-item > div:last-child {
    min-width: 0;
}

.quotation-print-summary-item span {
    color: #94a3b8;
    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: #0f1b2d;
    font-size: 0.88rem;
    font-weight: 800;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Approval / Signature block ── */
.quotation-print-approval {
    margin: 1.75rem 0 0 0;
    break-inside: avoid;
    page-break-inside: avoid;
}

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

.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: #0f1b2d;
    margin-bottom: 2rem;
}

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

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

/* ── Print footer ── */
.print-footer {
    margin-top: 1.5rem;
    text-align: center;
}

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

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

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

@media print {
    html,
    body {
        background: #ffffff !important;
    }

    body {
        color: #0f172a !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;
    }

    /* منع انقسام صف واحد عبر صفحتين */
    .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;
    }

    /* ── Section cards (print) ── */
    #sectionsContainer > div {
        box-shadow: none !important;
        border: 1.5px solid #d1d9e6 !important;
        border-radius: 0.65rem !important;
        margin-bottom: 0.85rem !important;
        overflow: hidden;
    }

    .quotation-section .section-header {
        background: #f0f4f8 !important;
        border-bottom: 1.5px solid #d1d9e6 !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 print styles ── */
    .table-container {
        overflow: visible !important;
    }

    .data-table {
        width: 100%;
        border-collapse: collapse;
    }

    .data-table thead {
        display: table-header-group;
    }

    .data-table th {
        background: #0f1b2d !important;
        color: #ffffff !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 #eaeef3 !important;
        font-size: 0.75rem !important;
        color: #1e293b !important;
        vertical-align: top;
    }

    .data-table tbody tr:nth-child(even) td {
        background: #f7f9fb !important;
    }

    .data-table tbody tr:last-child td {
        border-bottom: 2px solid #d1d9e6 !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;
    }

    /* ── Section total row in print ── */
    .quotation-section-total {
        color: #0f1b2d !important;
    }

    /* ── Grand total bar (print) ── */
    #grandTotalBar {
        background: #0f1b2d !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(255,255,255,0.7) !important;
        font-size: 0.82rem !important;
    }

    #grandTotalBar p:last-child {
        color: #ffffff !important;
        font-size: 1.45rem !important;
        font-weight: 800 !important;
    }

    /* ── Notes section in print ── */
    #sectionsContainer > div[class*="border-amber"] {
        border-color: #d4a853 !important;
        border-width: 1.5px !important;
    }

    /* ── Work description mode ── */
    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;
    }
}
