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

:root {
    --primary-color: #1a365d;
    --secondary-color: #2563eb;
    --accent-color: #dc2626;
    --success-color: #059669;
    --warning-color: #f59e0b;
    --light-bg: #f8fafc;
    --border-color: #cbd5e1;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-dark);
    min-height: 100vh;
    padding: 10px;
    font-weight: 400;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

header h1 {
    font-size: 2.8em;
    margin-bottom: 10px;
    font-weight: 900;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.btn-light {
    background: white;
    color: var(--primary-color);
    border: 2px solid transparent;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 1;
}

.btn-light:hover {
    background: #f1f5f9;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    background: linear-gradient(to bottom, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 2px solid var(--border-color);
    gap: 0;
    padding: 0 10px;
}

.tab-btn {
    flex: 1;
    min-width: 150px;
    padding: 18px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1.05em;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.tab-btn::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--secondary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.tab-btn:hover {
    background: rgba(37, 99, 235, 0.08);
    color: var(--secondary-color);
}

.tab-btn:hover::before {
    width: 80%;
}

.tab-btn.active {
    border-bottom-color: var(--secondary-color);
    color: var(--secondary-color);
    background: rgba(52, 152, 219, 0.05);
}

.tab-content {
    display: none;
    padding: 30px;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card h2 {
    color: var(--primary-color);
    margin-bottom: 24px;
    font-size: 2em;
    font-weight: 800;
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 12px;
    display: inline-block;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

input,
select,
textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1em;
    font-family: 'Cairo', sans-serif;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    background: #fafbfc;
    transform: translateY(-1px);
}

textarea {
    resize: vertical;
    font-family: inherit;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 1.05em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    margin-top: 10px;
    font-family: 'Cairo', sans-serif;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.5);
}

.btn-danger {
    background: var(--accent-color);
    color: white;
    padding: 8px 15px;
    width: auto;
    font-size: 0.9em;
    margin-top: 0;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-secondary {
    background: var(--text-light);
    color: white;
    width: auto;
    padding: 8px 15px;
    margin-top: 0;
}

.message {
    margin-top: 20px;
    padding: 18px 24px;
    border-radius: 10px;
    display: none;
    font-weight: 600;
    font-size: 1.05em;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 2px solid #6ee7b7;
    border-right: 5px solid #059669;
    display: block;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

.message.error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 2px solid #fca5a5;
    border-right: 5px solid #dc2626;
    display: block;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.records-container,
.report-container {
    margin-top: 30px;
}

.record-item,
.report-item {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 20px;
    margin-bottom: 16px;
    border-radius: 12px;
    border-right: 5px solid var(--secondary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.record-item:hover,
.report-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(-4px);
    border-right-width: 7px;
}

.record-item div,
.report-item div {
    flex: 1;
}

.record-item strong,
.report-item strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 5px;
}

.record-item span,
.report-item span {
    color: var(--text-light);
    font-size: 0.9em;
}

.record-amount {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--success-color);
    text-align: center;
    min-width: 100px;
}

.record-actions {
    display: flex;
    gap: 10px;
}

.report-summary {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    padding: 32px;
    border-radius: 16px;
    margin-bottom: 24px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(5, 150, 105, 0.3);
    position: relative;
    overflow: hidden;
}

.report-summary::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.report-summary h3 {
    font-size: 1.4em;
    margin-bottom: 16px;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.report-summary .total {
    font-size: 3.2em;
    font-weight: 900;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

.empty-state p {
    font-size: 1.1em;
    margin-top: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }

    .tabs {
        flex-direction: column;
    }

    .tab-btn {
        min-width: 100%;
        border-bottom: none;
        border-right: 3px solid transparent;
    }

    .tab-btn.active {
        border-bottom: none;
        border-right-color: var(--secondary-color);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .tab-content {
        padding: 15px;
    }

    .card {
        padding: 15px;
    }

    .record-item,
    .report-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .record-amount {
        width: 100%;
        margin-top: 10px;
        text-align: left;
    }

    .record-actions {
        width: 100%;
        margin-top: 10px;
    }

    .btn {
        padding: 10px 15px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 20px;
    }

    header h1 {
        font-size: 1.5em;
    }

    header p {
        font-size: 1em;
    }

    .tab-btn {
        padding: 12px 10px;
        font-size: 0.9em;
    }

    .card h2 {
        font-size: 1.4em;
    }

    .message {
        font-size: 0.9em;
    }

    input,
    select,
    textarea {
        padding: 10px;
    }

    label {
        font-size: 0.9em;
    }
}

/* تنسيقات قسم التحقق من الموظف */
#employeeVerificationSection h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2c3e50;
    font-size: 1.2em;
    margin-bottom: 15px;
}

#employeeInfoDisplay {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-right: 4px solid #27ae60;
    padding: 15px;
    border-radius: 5px;
    margin-top: 15px;
}

#employeeInfoDisplay p {
    margin: 8px 0;
    color: #155724;
}

#employeeInfoDisplay p strong {
    color: #155724;
    font-weight: 700;
}

#employeeInfoDisplay p:last-child {
    color: #27ae60;
    font-weight: bold;
    font-size: 1.1em;
}

.btn-secondary {
    background: #7f8c8d;
    color: white;
    width: auto;
    padding: 8px 15px;
    margin-top: 0;
}

.btn-secondary:hover {
    background: #6c7a7d;
    transform: translateY(-2px);
}

/* نافذة منبثقة */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: white;
    padding: 24px 28px;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.6em;
    font-weight: 800;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 2em;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

#editForm {
    padding: 20px;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.modal-footer .btn {
    width: auto;
    padding: 10px 20px;
    margin: 0;
}

/* تنسيق زر طباعة PDF */
#printPdfBtn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.5) !important;
}

#printPdfBtn:active {
    transform: translateY(-1px);
}

/* تحسين responsive لأزرار التقارير */
@media (max-width: 768px) {
    #printPdfBtn {
        min-width: 100% !important;
    }
}

