/* Modern UI Stylesheet - Amair EG */

:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --success: #48bb78;
    --danger: #f56565;
    --warning: #ed8936;
    --info: #4299e1;
    --light: #f7fafc;
    --dark: #2d3748;
    --gray-100: #f7fafc;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e0;
    --gray-400: #a0aec0;
    --gray-500: #718096;
    --gray-600: #4a5568;
    --gray-700: #2d3748;
    --gray-800: #1a202c;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.12);
    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--gray-100);
    color: var(--gray-700);
    line-height: 1.6;
}

/* Modern Container */
.modern-container {
    max-width: 1600px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 2rem;
    border-radius: var(--radius-lg);
    color: white;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

.page-header h1 {
    font-size: 2rem;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-header .subtitle {
    opacity: 0.9;
    font-size: 1rem;
}

/* Modern Card */
.modern-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

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

.modern-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-200);
}

.modern-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Modern Buttons */
.modern-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.modern-btn-primary {
    background: var(--primary);
    color: white;
}

.modern-btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.modern-btn-success {
    background: var(--success);
    color: white;
}

.modern-btn-success:hover {
    background: #38a169;
}

.modern-btn-danger {
    background: var(--danger);
    color: white;
}

.modern-btn-danger:hover {
    background: #e53e3e;
}

.modern-btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.modern-btn-secondary:hover {
    background: var(--gray-300);
}

.modern-btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.modern-btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Modern Table */
.modern-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.modern-table thead {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.modern-table th {
    padding: 1rem;
    text-align: right;
    font-weight: 600;
    white-space: nowrap;
}

.modern-table td {
    padding: 1rem;
    text-align: right;
    border-bottom: 1px solid var(--gray-200);
}

.modern-table tbody tr {
    transition: var(--transition);
}

.modern-table tbody tr:hover {
    background: var(--gray-100);
}

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

/* Modern Grid */
.modern-grid {
    display: grid;
    gap: 1.5rem;
}

.modern-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.modern-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.modern-grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Modern Form */
.modern-form-group {
    margin-bottom: 1.5rem;
}

.modern-form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--gray-700);
}

.modern-form-input,
.modern-form-select,
.modern-form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.modern-form-input:focus,
.modern-form-select:focus,
.modern-form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modern-form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Modern Badge */
.modern-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.modern-badge-success {
    background: #c6f6d5;
    color: #22543d;
}

.modern-badge-warning {
    background: #feebc8;
    color: #7c2d12;
}

.modern-badge-danger {
    background: #fed7d7;
    color: #742a2a;
}

.modern-badge-info {
    background: #bee3f8;
    color: #2c5282;
}

.modern-badge-primary {
    background: #e0e7ff;
    color: #3730a3;
}

/* Modern Alert */
.modern-alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modern-alert-success {
    background: #c6f6d5;
    color: #22543d;
    border-left: 4px solid var(--success);
}

.modern-alert-error {
    background: #fed7d7;
    color: #742a2a;
    border-left: 4px solid var(--danger);
}

.modern-alert-warning {
    background: #feebc8;
    color: #7c2d12;
    border-left: 4px solid var(--warning);
}

.modern-alert-info {
    background: #bee3f8;
    color: #2c5282;
    border-left: 4px solid var(--info);
}

/* Modern Stat Card */
.modern-stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.modern-stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.modern-stat-card-icon.primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.modern-stat-card-icon.success {
    background: var(--success);
    color: white;
}

.modern-stat-card-icon.danger {
    background: var(--danger);
    color: white;
}

.modern-stat-card-label {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}

.modern-stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
}

/* Modern Modal */
.modern-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modern-modal-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modern-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-200);
}

.modern-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

.modern-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-400);
    transition: var(--transition);
}

.modern-modal-close:hover {
    color: var(--gray-700);
}

/* Empty State */
.modern-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray-500);
}

.modern-empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.modern-empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--gray-600);
}

/* Loading Spinner */
.modern-loading {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Action Buttons Group */
.modern-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
    .modern-container {
        padding: 0 1rem;
    }
    
    .page-header {
        padding: 1.5rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .modern-card {
        padding: 1rem;
    }
    
    .modern-table th,
    .modern-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .modern-grid-2,
    .modern-grid-3,
    .modern-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* RTL Support */
[dir="rtl"] .modern-table th,
[dir="rtl"] .modern-table td {
    text-align: right;
}

[dir="rtl"] .modern-alert {
    border-left: none;
    border-right: 4px solid;
}

/* Print Styles */
@media print {
    .modern-btn,
    .modern-actions,
    .page-header {
        display: none !important;
    }
    
    .modern-card {
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }
}

