/* ============================================
   نظام الأرشفة الإلكترونية - الأنماط الرئيسية
   ============================================ */

:root {
    --primary: #2c3e50;
    --primary-dark: #1a4a6e;
    --secondary: #1e293b;
    --secondary-light: #334155;
    --background: #f5f7fa;
    --cards: #ffffff;
    --success: #27ae60;
    --success-dark: #219a52;
    --warning: #f39c12;
    --warning-dark: #e67e22;
    --danger: #e74c3c;
    --danger-dark: #c0392b;
    --info: #3498db;
    --info-dark: #2980b9;
    --gray-light: #f1f5f9;
    --gray-border: #e2e8f0;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --transition-sidebar: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-dark);
    line-height: 1.5;
    overflow-x: hidden;
}

/* ============================================
   الشريط الجانبي
   ============================================ */

.app-layout {
    display: flex;
    min-height: 100vh;
    background: var(--background);
}

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--secondary) 0%, var(--secondary-light) 100%);
    color: white;
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    transition: all var(--transition-sidebar);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .sidebar-header h2,
.sidebar.collapsed .sidebar-header p,
.sidebar.collapsed .nav-btn span,
.sidebar.collapsed .user-info .user-name,
.sidebar.collapsed .user-info .user-role {
    display: none;
}

.sidebar.collapsed .nav-btn {
    justify-content: center;
    padding: 12px;
}

.sidebar.collapsed .nav-btn .nav-icon {
    margin: 0;
    font-size: 1.5rem;
}

.sidebar-toggle {
    position: absolute;
    left: 12px;
    top: 20px;
    background: var(--warning);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--secondary);
    font-size: 1.2rem;
    transition: all 0.2s ease;
    z-index: 10;
}

.sidebar-toggle:hover {
    transform: scale(1.05);
    background: var(--warning-dark);
    color: white;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 20px;
}

.sidebar-header h2 {
    font-size: 1.2rem;
    margin: 0 0 5px 0;
    color: white;
}

.sidebar-header p {
    font-size: 0.7rem;
    opacity: 0.8;
    margin: 0;
}

.user-info {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.2);
    margin: 10px 15px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 45px;
    height: 45px;
    background: var(--warning);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.user-details {
    flex: 1;
    overflow: hidden;
}

.user-name {
    font-weight: bold;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.7rem;
    opacity: 0.8;
}

.logout-sidebar-btn {
    background: var(--danger);
    border: none;
    padding: 10px 15px;
    border-radius: var(--radius-md);
    color: white;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    width: calc(100% - 30px);
    margin: 15px;
    font-weight: 600;
}

.logout-sidebar-btn:hover {
    background: var(--danger-dark);
    transform: translateY(-1px);
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 12px;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: right;
    font-size: 0.9rem;
}

.nav-btn .nav-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.nav-btn span {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-btn:hover {
    background: var(--primary);
    transform: translateX(-3px);
}

.nav-btn.active {
    background: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ============================================
   المحتوى الرئيسي
   ============================================ */

.main-container {
    flex: 1;
    margin-right: var(--sidebar-width);
    transition: margin-right var(--transition-sidebar);
    min-height: 100vh;
    background: var(--background);
}

.main-container.expanded {
    margin-right: var(--sidebar-collapsed-width);
}

.top-header {
    background: linear-gradient(135deg, var(--secondary), var(--primary-dark));
    color: white;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    position: sticky;
    top: 0;
    z-index: 99;
    box-shadow: var(--shadow-md);
}

.header-title h1 {
    font-size: 1.5rem;
    margin: 0;
}

.header-title p {
    font-size: 0.8rem;
    opacity: 0.9;
    margin: 5px 0 0;
}

.logo-area img {
    max-height: 50px;
    background: white;
    padding: 5px;
    border-radius: var(--radius-md);
}

.main-content {
    padding: 25px;
}

.section-card {
    background: var(--cards);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid var(--gray-border);
    display: none;
    transition: all var(--transition-normal);
}

.section-card.active-section {
    display: block;
}

.section-title {
    font-size: 1.7rem;
    font-weight: 700;
    border-right: 6px solid var(--warning);
    padding-right: 15px;
    margin-bottom: 20px;
    color: var(--secondary);
    letter-spacing: -0.3px;
}

/* ============================================
   أنماط العملاء
   ============================================ */

.customers-header {
    background: white;
    border-radius: var(--radius-xl);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.customers-header h2 {
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.customers-header p {
    color: var(--text-muted);
}

.search-container-customers {
    background: white;
    padding: 20px;
    border-radius: var(--radius-xl);
    margin-bottom: 25px;
    box-shadow: var(--shadow-md);
}

.search-box-customers {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 14px 20px;
    border: 2px solid var(--gray-border);
    border-radius: 50px;
    font-size: 16px;
    font-family: 'Tajawal', sans-serif;
    transition: all var(--transition-fast);
    display: block;
}

.search-box-customers:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

.action-buttons-customers {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
    font-family: 'Tajawal', sans-serif;
    font-size: 0.9rem;
}

.btn i {
    font-size: 1rem;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: var(--success-dark);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: var(--danger-dark);
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-warning:hover {
    background: var(--warning-dark);
}

.btn-secondary {
    background: var(--secondary-light);
    color: white;
}

.btn-secondary:hover {
    background: var(--secondary);
}

.btn-generate {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.btn-export {
    background: var(--success);
    color: white;
}

.btn-export:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.customers-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.customer-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 20px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border-right: 4px solid var(--primary);
    cursor: pointer;
}

.customer-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.customer-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.customer-name i {
    color: var(--primary);
    font-size: 1.2rem;
}

.customer-company {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.customer-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.customer-tax {
    background: var(--gray-light);
    padding: 4px 10px;
    border-radius: 20px;
    font-family: monospace;
}

.customer-actions-card {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: flex-end;
}

.action-btn {
    padding: 6px 14px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all var(--transition-fast);
    font-family: 'Tajawal', sans-serif;
}

.action-btn.edit {
    background: var(--warning);
    color: white;
}

.action-btn.delete {
    background: var(--danger);
    color: white;
}

.action-btn.details {
    background: var(--primary);
    color: white;
}

.action-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.no-results-customers {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px;
    background: white;
    border-radius: var(--radius-xl);
    color: var(--text-muted);
}

.no-results-customers i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--danger);
}

/* ============================================
   أنماط تفاصيل العميل
   ============================================ */

.back-to-list {
    margin-bottom: 20px;
}

.customer-details-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-md);
}

.customer-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gray-border);
}

.customer-details-header h3 {
    color: var(--primary);
    font-size: 1.5rem;
}

.customer-tax-badge {
    background: var(--gray-light);
    padding: 8px 16px;
    border-radius: 30px;
    font-family: monospace;
    font-size: 0.9rem;
}

.details-tabs-container {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin: 20px 0;
}

.details-tabs-header {
    display: flex;
    flex-wrap: wrap;
    background: var(--primary);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow: hidden;
}

.details-tab-btn {
    padding: 10px 14px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-fast);
    font-family: 'Tajawal', sans-serif;
    font-size: 0.8rem;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
}

.details-tab-btn:hover {
    color: white;
    background: rgba(255,255,255,0.1);
}

.details-tab-btn.active {
    color: white;
    background: rgba(255,255,255,0.15);
    border-bottom-color: var(--warning);
}

.details-tab-content {
    padding: 20px;
    display: none;
    background: var(--cards);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    border: 1px solid var(--gray-border);
    border-top: none;
}

.details-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-border);
    flex-wrap: wrap;
    gap: 8px;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: bold;
    color: var(--primary);
    width: 35%;
    min-width: 160px;
}

.detail-value {
    width: 60%;
    text-align: left;
    word-break: break-word;
    color: var(--text-dark);
}

.customer-actions-footer {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* ============================================
   أنماط النماذج والجداول
   ============================================ */

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
    background: var(--gray-light);
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-border);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--secondary);
}

.input-group input,
.input-group select,
.input-group textarea {
    padding: 10px 14px;
    border: 1px solid var(--gray-border);
    border-radius: var(--radius-md);
    font-family: inherit;
    background: var(--cards);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    outline: none;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.2);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--cards);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.data-table th,
.data-table td {
    border: 1px solid var(--gray-border);
    padding: 12px 8px;
    text-align: center;
    font-size: 0.85rem;
    vertical-align: middle;
    word-break: break-word;
}

.data-table th {
    background: var(--gray-light);
    color: var(--secondary);
    font-weight: 700;
}

.data-table tr:hover td {
    background: rgba(44, 62, 80, 0.03);
}

.attachments-container {
    grid-column: span 2;
    background: var(--cards);
    border: 1px solid var(--gray-border);
    border-radius: var(--radius-lg);
    padding: 15px;
    margin-top: 10px;
}

.attachment-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    background: var(--gray-light);
    padding: 10px;
    border-radius: var(--radius-md);
}

.search-row {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 20px;
    background: var(--gray-light);
    padding: 15px;
    border-radius: var(--radius-lg);
}

.search-row input {
    flex: 2;
    padding: 10px 14px;
    border: 1px solid var(--gray-border);
    border-radius: var(--radius-md);
    font-family: inherit;
    background: var(--cards);
}

/* ============================================
   أنماط المودالات
   ============================================ */

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--cards);
    margin: auto;
    padding: 25px;
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 10001;
    border: 1px solid var(--gray-border);
}

.modal-content.flow-modal-large {
    max-width: 1400px !important;
    width: 95% !important;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--warning);
    padding-bottom: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.modal-header h3 {
    color: var(--primary);
}

.modal-header .close,
[class*="close-"]:not(button) {
    cursor: pointer;
    font-size: 28px;
    font-weight: bold;
    color: #94a3b8;
    transition: all 0.2s;
    line-height: 1;
}

.modal-header .close:hover,
[class*="close-"]:hover:not(button) {
    color: var(--danger) !important;
    transform: scale(1.15);
}

.form-section {
    background: var(--gray-light);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 20px;
    border: 1px solid var(--gray-border);
}

.form-section h4 {
    color: var(--secondary);
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--warning);
    font-size: 1.1rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.action-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* ============================================
   أنماط شاشة تسجيل الدخول - تم التعديل
   ============================================ */

#loginScreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #1d4ed8 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.login-container {
    width: 100%;
    max-width: 480px;
    margin: 20px;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 32px;
    padding: 40px 35px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.login-logo span {
    font-size: 42px;
}

.login-header h2 {
    font-size: 28px;
    color: var(--secondary);
    margin: 0 0 8px 0;
}

.login-header p {
    color: var(--text-muted);
    font-size: 14px;
}

.login-form .input-field {
    margin-bottom: 25px;
    position: relative;
}

.login-form .input-field input {
    width: 100%;
    padding: 16px 50px 16px 20px;
    border: 2px solid var(--gray-border);
    border-radius: 16px;
    font-size: 16px;
    font-family: inherit;
    background: var(--cards);
    box-sizing: border-box;
}

.login-form .input-field input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(44, 62, 80, 0.15);
}

.login-form .input-field .input-icon {
    position: absolute;
    left: 16px;
    right: auto;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--text-muted);
}

.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-error {
    background: #fef2f2;
    color: var(--danger);
    padding: 12px 16px;
    border-radius: 12px;
    margin-top: 20px;
    font-size: 13px;
    text-align: center;
    display: none;
}

.login-error.show {
    display: block;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-border);
    color: var(--text-muted);
    font-size: 12px;
}

.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: -1;
}

.bg-shapes .shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    animation: float 20s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(180deg); }
}

/* ============================================
   أنماط لوحة التحكم والتقارير
   ============================================ */

.stats-grid-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, var(--cards), var(--gray-light));
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-border);
    transition: all var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.stat-icon {
    font-size: 48px;
    color: var(--primary);
}

.stat-info h3 {
    font-size: 28px;
    margin: 0;
    color: var(--secondary);
}

.stat-info p {
    margin: 5px 0 0;
    color: var(--text-muted);
    font-size: 14px;
}

.stat-info small {
    font-size: 12px;
    color: var(--success);
}

.charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-box {
    background: var(--cards);
    border-radius: var(--radius-lg);
    padding: 15px;
    border: 1px solid var(--gray-border);
    box-shadow: var(--shadow-sm);
}

.chart-box h4 {
    margin-bottom: 15px;
    color: var(--secondary);
}

.control-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--gray-border);
    padding-bottom: 10px;
}

.control-tab {
    background: var(--gray-light);
    border: none;
    padding: 10px 20px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-fast);
    color: var(--secondary);
}

.control-tab:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
}

.control-tab.active {
    background: var(--primary);
    color: white;
}

.control-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.control-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.reports-toolbar,
.user-perf-toolbar {
    background: linear-gradient(135deg, var(--gray-light) 0%, var(--cards) 100%);
    padding: 20px 25px;
    border-radius: var(--radius-lg);
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
    margin-bottom: 25px;
    border: 1px solid var(--gray-border);
}

.report-control-group,
.perf-control-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.report-control-group label,
.perf-control-group label {
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--secondary);
}

.reports-toolbar select,
.reports-toolbar input,
.user-perf-toolbar select,
.user-perf-toolbar input {
    padding: 10px 15px;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-border);
    background: var(--cards);
    font-family: inherit;
    font-size: 0.9rem;
    min-width: 150px;
}

.report-content {
    background: var(--cards);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--gray-border);
    min-height: 400px;
}

.footer {
    background: var(--secondary);
    color: white;
    text-align: center;
    padding: 15px;
    margin-top: 30px;
    border-radius: var(--radius-lg);
    font-size: 0.8rem;
}

/* ============================================
   أنماط إدارة المستخدمين
   ============================================ */

.users-management-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.users-table-advanced {
    width: 100%;
    border-collapse: collapse;
    background: var(--cards);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.users-table-advanced th,
.users-table-advanced td {
    border: 1px solid var(--gray-border);
    padding: 12px;
    text-align: center;
}

.users-table-advanced th {
    background: var(--gray-light);
    font-weight: bold;
}

.permissions-grid-advanced {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin: 20px 0;
    padding: 20px;
    background: var(--gray-light);
    border-radius: var(--radius-lg);
}

.backup-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.backup-list {
    background: var(--cards);
    border-radius: var(--radius-lg);
    padding: 15px;
    border: 1px solid var(--gray-border);
}

.backup-files-list {
    max-height: 300px;
    overflow-y: auto;
}

.backup-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid var(--gray-border);
}

.audit-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    align-items: flex-end;
}

.audit-filters input,
.audit-filters select {
    padding: 10px 15px;
    border: 1px solid var(--gray-border);
    border-radius: var(--radius-md);
    min-width: 150px;
}

.audit-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.audit-stat-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-weight: bold;
}

.audit-table {
    width: 100%;
    border-collapse: collapse;
}

.audit-table th,
.audit-table td {
    border: 1px solid var(--gray-border);
    padding: 10px;
    text-align: center;
    font-size: 13px;
}

.audit-table th {
    background: var(--gray-light);
}

.settings-section {
    background: var(--gray-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 25px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.alerts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.alerts-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 30px;
}

.alert-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid var(--gray-border);
    background: var(--cards);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
}

.alert-item.unread {
    background: #fef9e6;
    border-right: 3px solid var(--warning);
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.alert-message {
    color: var(--text-muted);
    font-size: 13px;
}

.maintenance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.maintenance-card {
    background: var(--gray-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--gray-border);
}

.flow-steps-table {
    width: 100%;
    overflow-x: auto;
    margin-top: 15px;
}

.flow-steps-table table {
    min-width: 800px;
    width: 100%;
}

.activity-timeline {
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    border-bottom: 1px solid var(--gray-border);
}

.activity-icon {
    font-size: 20px;
}

.activity-details {
    flex: 1;
}

.activity-details strong {
    display: block;
    font-size: 0.85rem;
}

.activity-details small {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ============================================
   أنماط السند
   ============================================ */

.receipt-card {
    width: 148mm;
    height: 210mm;
    background-color: var(--cards);
    border: 2px solid var(--secondary);
    border-radius: var(--radius-md);
    padding: 15px 20px;
    position: relative;
    box-shadow: var(--shadow-md);
    box-sizing: border-box;
    margin: 0 auto;
    font-family: 'Tajawal', 'Segoe UI', sans-serif;
}

.receipt-card .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    background: transparent;
    padding: 0;
}

.receipt-card .logo {
    color: var(--primary);
    font-size: 18px;
    font-weight: bold;
}

.receipt-card .title {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    color: var(--primary);
    flex-grow: 1;
}

.receipt-card .divider {
    border-top: 1px dashed var(--warning);
    margin: 10px 0;
}

.receipt-card .data-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.receipt-card .data-row {
    display: flex;
    border-bottom: 1px solid var(--gray-border);
    padding-bottom: 6px;
}

.receipt-card .data-label {
    font-weight: bold;
    color: var(--primary);
    width: 100px;
    flex-shrink: 0;
}

.receipt-card .data-value {
    color: var(--text-dark);
    flex-grow: 1;
    word-break: break-word;
}

.receipt-card .signatures {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
    padding: 0 10px;
}

.receipt-card .sig-box {
    text-align: center;
    color: var(--text-dark);
    width: 45%;
}

.receipt-card .sig-line {
    border-top: 1px dotted var(--text-muted);
    margin-top: 30px;
}

.receipt-card .footer-meta {
    position: absolute;
    bottom: 12px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-muted);
    direction: ltr;
}

/* ============================================
   أنماط مركز التقارير المتقدم
   ============================================ */

.reports-tabs-container {
    background: var(--cards);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    border: 1px solid var(--gray-border);
}

.reports-tabs-header {
    display: flex;
    flex-wrap: wrap;
    background: var(--primary);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow: hidden;
    gap: 2px;
    padding: 4px 4px 0 4px;
}

.report-tab-btn {
    padding: 12px 20px;
    background: rgba(255,255,255,0.08);
    border: none;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-fast);
    font-family: 'Tajawal', sans-serif;
    font-size: 0.85rem;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    border-bottom: 3px solid transparent;
    flex: 1;
    min-width: 120px;
    text-align: center;
}

.report-tab-btn:hover {
    color: white;
    background: rgba(255,255,255,0.15);
}

.report-tab-btn.active {
    color: white;
    background: rgba(255,255,255,0.2);
    border-bottom-color: var(--warning);
}

.report-tab-btn i {
    margin-left: 8px;
}

.report-tab-content {
    display: none;
    padding: 20px;
    background: var(--cards);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    border: 1px solid var(--gray-border);
    border-top: none;
    animation: fadeIn 0.3s ease;
}

.report-tab-content.active {
    display: block;
}

.report-select,
.report-date {
    padding: 10px 15px;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-border);
    background: var(--cards);
    font-family: inherit;
    font-size: 0.9rem;
    min-width: 140px;
    width: 100%;
}

.report-select:focus,
.report-date:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.15);
}

.report-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    color: var(--text-muted);
}

.report-placeholder i {
    margin-bottom: 15px;
}

.report-placeholder p {
    font-size: 1.1rem;
}

/* أنماط التقارير المطبوعة */
.report-paper {
    background: white;
    padding: 30px;
    border-radius: var(--radius-md);
    font-family: 'Tajawal', sans-serif;
}

.report-paper .report-header {
    text-align: center;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.report-paper .report-header h2 {
    color: var(--primary);
    margin: 0;
    font-size: 1.5rem;
}

.report-paper .report-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 5px 0 0;
}

.report-paper .report-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.report-paper .report-summary {
    background: var(--gray-light);
    border-radius: var(--radius-md);
    padding: 15px 20px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.report-paper .report-summary-item {
    text-align: center;
}

.report-paper .report-summary-item .number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    display: block;
}

.report-paper .report-summary-item .label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.report-paper table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 0.85rem;
}

.report-paper table th,
.report-paper table td {
    border: 1px solid var(--gray-border);
    padding: 10px 12px;
    text-align: center;
}

.report-paper table th {
    background: var(--primary);
    color: white;
    font-weight: 700;
}

.report-paper table tr:nth-child(even) {
    background: var(--gray-light);
}

.report-paper table tr:hover {
    background: rgba(44, 62, 80, 0.05);
}

.report-paper .report-footer {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid var(--gray-border);
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.report-paper .report-footer .signature {
    text-align: center;
}

.report-paper .report-footer .signature .line {
    border-top: 1px solid var(--gray-border);
    width: 150px;
    margin: 10px auto 0;
}

/* أنماط التنبيهات في التقارير */
.report-alert-warning {
    background: #fef9e6;
    border-right: 4px solid var(--warning);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin: 10px 0;
}

.report-alert-danger {
    background: #fef2f2;
    border-right: 4px solid var(--danger);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin: 10px 0;
}

.report-alert-success {
    background: #f0fdf4;
    border-right: 4px solid var(--success);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin: 10px 0;
}

/* ============================================
   أنماط الاستجابة للأجهزة المختلفة
   ============================================ */

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(100%);
        box-shadow: none;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
    }
    
    .main-container {
        margin-right: 0 !important;
    }
    
    .mobile-menu-btn {
        display: block;
        background: var(--warning);
        border: none;
        padding: 8px 15px;
        border-radius: var(--radius-md);
        color: var(--secondary);
        font-weight: bold;
        cursor: pointer;
    }
    
    .customers-grid-container {
        grid-template-columns: 1fr;
    }
    
    .detail-label,
    .detail-value {
        width: 100%;
    }
    
    .details-tabs-header {
        flex-wrap: wrap;
        border-radius: var(--radius-md);
    }
    
    .details-tab-btn {
        flex: 1 0 auto;
        font-size: 0.7rem;
        padding: 8px 10px;
    }
    
    .charts-row {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .attachments-container {
        grid-column: span 1;
    }
    
    .data-table {
        font-size: 0.7rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 6px 3px;
    }
    
    .modal-content {
        width: 95%;
        padding: 15px;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .report-tab-btn {
        font-size: 0.7rem;
        padding: 8px 12px;
        min-width: 80px;
    }
    
    .report-tab-btn i {
        margin-left: 4px;
    }
    
    .reports-toolbar {
        padding: 15px;
        gap: 10px;
    }
    
    .report-control-group {
        min-width: 100%;
    }
    
    .report-paper .report-summary {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .report-paper table {
        font-size: 0.7rem;
    }
    
    .report-paper table th,
    .report-paper table td {
        padding: 6px 8px;
    }

    /* تحسينات responsive إضافية للجداول والمحتوى */
    .users-table-advanced th,
    .users-table-advanced td {
        padding: 6px 4px;
        font-size: 0.7rem;
    }

    .users-table-advanced td button {
        font-size: 0.65rem;
        padding: 3px 6px !important;
    }

    .users-management-header {
        flex-direction: column;
        align-items: stretch;
    }

    .users-management-header .search-box {
        width: 100%;
    }

    .users-table-container {
        overflow-x: auto;
    }

    .permissions-grid-advanced {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 12px;
    }

    .backup-actions {
        flex-direction: column;
    }

    .backup-actions button {
        width: 100%;
    }

    .control-tabs {
        flex-wrap: wrap;
        gap: 4px;
    }

    .control-tab-btn {
        font-size: 0.7rem;
        padding: 8px 10px;
        flex: 1 0 auto;
        min-width: 70px;
    }

    .action-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .action-buttons button {
        width: 100%;
    }

    .modal-header h3 {
        font-size: 1rem;
    }

    .search-box {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box input,
    .search-box select {
        width: 100%;
    }

    .flow-steps-table {
        overflow-x: auto;
    }

    .flow-modal-large .modal-content {
        max-width: 100%;
    }

    .details-header {
        flex-direction: column;
        text-align: center;
    }

    .top-header {
        padding: 8px 12px;
    }

    .top-header .header-title {
        font-size: 0.8rem;
    }

    .cards-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stats-card {
        padding: 12px;
    }

    .stats-card .stat-number {
        font-size: 1.3rem;
    }

    .tab-content {
        padding: 12px;
    }

    .task-card {
        flex-direction: column;
    }

    .task-card .task-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }

    .permissions-grid-advanced {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 10px;
        width: 98%;
    }

    .users-table-advanced th,
    .users-table-advanced td {
        padding: 4px 2px;
        font-size: 0.6rem;
    }

    .users-table-advanced td button {
        font-size: 0.6rem;
        padding: 2px 4px !important;
    }

    .data-table {
        font-size: 0.6rem;
    }

    .data-table th,
    .data-table td {
        padding: 4px 2px;
    }

    .section-title {
        font-size: 1.1rem;
    }

    .search-box input,
    .search-box select,
    .search-box button {
        font-size: 0.75rem;
    }

    .control-tab-btn {
        font-size: 0.65rem;
        padding: 6px 8px;
        min-width: 60px;
    }

    .details-tab-btn {
        font-size: 0.6rem;
        padding: 6px 6px;
    }

    .top-header .header-title {
        font-size: 0.7rem;
    }
}

@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none;
    }
    
    .mobile-overlay {
        display: none !important;
    }
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    display: none;
}

/* ============================================
   أنماط الطباعة
   ============================================ */

@media print {
    .sidebar,
    .top-header,
    .nav-btn,
    .action-buttons,
    .search-container-customers,
    .back-to-list,
    .control-tabs,
    .reports-toolbar,
    .user-perf-toolbar,
    button,
    .modal,
    .footer,
    .sidebar-nav,
    .logout-sidebar-btn,
    .mobile-menu-btn,
    .customer-actions-card,
    .customer-actions-footer {
        display: none !important;
    }
    
    .main-container {
        margin-right: 0 !important;
    }
    
    .section-card {
        display: block !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    body.printing-receipt .section-card {
        display: none !important;
    }
    
    .customers-grid-container {
        display: block !important;
    }
    
    .customer-card {
        break-inside: avoid;
        page-break-inside: avoid;
        margin-bottom: 20px;
    }
    
    body {
        background: white;
        padding: 0;
        margin: 0;
    }
    
    /* أنماط التقارير للطباعة */
    .reports-tabs-header,
    .reports-toolbar,
    .report-tab-btn,
    .report-tab-content .reports-toolbar,
    .report-tab-content .btn,
    .report-tab-content button {
        display: none !important;
    }
    
    .report-tab-content {
        display: block !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
    }
    
    .report-tab-content.active {
        display: block !important;
    }
    
    .report-paper {
        padding: 15px !important;
        border: none !important;
    }
    
    .report-paper table th {
        background: #1a4a6e !important;
        color: white !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    .report-paper table tr:nth-child(even) {
        background: #f1f5f9 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    .report-paper .report-summary {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    .report-paper .report-header {
        border-bottom-color: #1a4a6e !important;
    }
    
    .report-alert-warning,
    .report-alert-danger,
    .report-alert-success {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* أنماط تقارير الأداء للطباعة */
    .report-paper .report-summary-item .number {
        font-size: 2rem !important;
    }

    .report-paper table th {
        background: #1a4a6e !important;
        color: white !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .report-paper table tr:nth-child(even) {
        background: #f1f5f9 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .report-paper table td {
        padding: 6px 8px !important;
        font-size: 0.75rem !important;
    }

    .report-paper .report-summary {
        background: #f8fafc !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .report-paper .report-header {
        border-bottom-color: #1a4a6e !important;
    }

    #userPerfReportContent .report-paper {
        padding: 20px !important;
        border: none !important;
    }

    .report-paper [style*="background:"] {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* --- سند الاستلام --- */
    @page {
        size: A4 portrait;
        margin: 0;
    }

    body.printing-receipt #printReceiptModal {
        display: flex !important;
        position: absolute !important;
        top: 0;
        left: 0;
        width: 100% !important;
        height: 100% !important;
        background: none !important;
        backdrop-filter: none !important;
        justify-content: center;
        align-items: center;
        padding: 0;
        margin: 0;
    }

    body.printing-receipt #printReceiptModal .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        overflow: visible !important;
        background: white !important;
        border-radius: 0 !important;
    }

    body.printing-receipt #printReceiptModal .modal-header,
    body.printing-receipt #doPrintReceipt,
    body.printing-receipt #printReceiptModal .close-receipt {
        display: none !important;
    }

    body.printing-receipt #receiptContent {
        padding: 0 !important;
        margin: 0 !important;
    }

    body.printing-receipt #receiptContent .receipt-card {
        width: 100% !important;
        max-width: none !important;
        height: auto !important;
        border: none !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 10px 8px !important;
        border-radius: 0 !important;
        background: white !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    body.printing-receipt #receiptContent .receipt-card .header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 2px;
    }

    body.printing-receipt #receiptContent .receipt-card .logo {
        color: #1a4a6e;
        font-size: 13px;
        font-weight: bold;
    }

    body.printing-receipt #receiptContent .receipt-card .title {
        text-align: center;
        font-size: 15px;
        font-weight: bold;
        color: #1a4a6e;
        flex-grow: 1;
    }

    body.printing-receipt #receiptContent .receipt-card .divider {
        border-top: 1px dashed #f39c12;
        margin: 4px 0;
    }

    body.printing-receipt #receiptContent .receipt-card .data-grid {
        display: flex;
        flex-direction: column;
        gap: 3px;
        margin: 4px 0;
    }

    body.printing-receipt #receiptContent .receipt-card .data-row {
        display: flex;
        border-bottom: 1px solid #e2e8f0;
        padding-bottom: 2px;
    }

    body.printing-receipt #receiptContent .receipt-card .data-label {
        font-weight: bold;
        color: #1a4a6e;
        width: 70px;
        flex-shrink: 0;
        font-size: 10px;
    }

    body.printing-receipt #receiptContent .receipt-card .data-value {
        color: #0f172a;
        flex-grow: 1;
        font-size: 10px;
        word-break: break-word;
    }

    body.printing-receipt #receiptContent .receipt-card .signatures {
        display: flex;
        justify-content: space-between;
        margin-top: 6px;
        padding: 0 3px;
    }

    body.printing-receipt #receiptContent .receipt-card .sig-box {
        text-align: center;
        width: 45%;
        font-size: 9px;
        color: #0f172a;
    }

    body.printing-receipt #receiptContent .receipt-card .sig-line {
        border-top: 1px dotted #64748b;
        margin-top: 10px;
    }

    body.printing-receipt #receiptContent .receipt-card .footer-meta {
        margin-top: 6px;
        display: flex;
        justify-content: space-between;
        font-size: 7px;
        color: #64748b;
        direction: ltr;
    }
}