/**
 * Attendance Report Styles
 * أنماط تقرير الحضور والالتزام
 * 
 * @package ArcheryPlayerManagement
 * @subpackage Reports/Styles
 * @version 1.0.0
 */

/* ========================================================================
   CSS Variables and Root Configurations
   المتغيرات الأساسية والإعدادات الجذرية
   ======================================================================== */

:root {
    /* Color Palette - نظام الألوان */
    --apm-primary: #667eea;
    --apm-primary-light: #8fa4f3;
    --apm-primary-dark: #4c63d2;
    --apm-secondary: #764ba2;
    --apm-accent: #f093fb;
    
    /* Status Colors - ألوان الحالات */
    --apm-success: #28a745;
    --apm-success-light: #d4edda;
    --apm-warning: #ffc107;
    --apm-warning-light: #fff3cd;
    --apm-danger: #dc3545;
    --apm-danger-light: #f8d7da;
    --apm-info: #17a2b8;
    --apm-info-light: #d1ecf1;
    
    /* Neutral Colors - الألوان المحايدة */
    --apm-white: #ffffff;
    --apm-light: #f8f9fa;
    --apm-lighter: #e9ecef;
    --apm-gray: #6c757d;
    --apm-dark: #495057;
    --apm-darker: #343a40;
    --apm-black: #212529;
    
    /* Typography - النصوص */
    --apm-font-family: 'Segoe UI', 'Cairo', Tahoma, Geneva, Verdana, sans-serif;
    --apm-font-size-base: 14px;
    --apm-font-size-lg: 16px;
    --apm-font-size-xl: 18px;
    --apm-font-size-xxl: 24px;
    --apm-font-size-sm: 12px;
    --apm-font-size-xs: 10px;
    
    /* Spacing - المسافات */
    --apm-spacing-xs: 0.25rem;
    --apm-spacing-sm: 0.5rem;
    --apm-spacing-md: 1rem;
    --apm-spacing-lg: 1.5rem;
    --apm-spacing-xl: 2rem;
    --apm-spacing-xxl: 3rem;
    
    /* Border Radius - الانحناءات */
    --apm-radius-sm: 4px;
    --apm-radius-md: 6px;
    --apm-radius-lg: 8px;
    --apm-radius-xl: 12px;
    --apm-radius-round: 50%;
    
    /* Shadows - الظلال */
    --apm-shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --apm-shadow-md: 0 4px 8px rgba(0,0,0,0.12);
    --apm-shadow-lg: 0 8px 16px rgba(0,0,0,0.15);
    --apm-shadow-xl: 0 12px 24px rgba(0,0,0,0.18);
    
    /* Transitions - الانتقالات */
    --apm-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --apm-transition-fast: all 0.15s ease;
    --apm-transition-slow: all 0.5s ease;
}

/* ========================================================================
   Base Container and Layout
   الحاوي الأساسي والتخطيط
   ======================================================================== */

.apm-attendance-report-container {
    max-width: 1400px;
    margin: 0 auto var(--apm-spacing-xl);
    font-family: var(--apm-font-family);
    font-size: var(--apm-font-size-base);
    background: var(--apm-white);
    border-radius: var(--apm-radius-xl);
    overflow: hidden;
    box-shadow: var(--apm-shadow-xl);
    position: relative;
}

.apm-attendance-report-container * {
    box-sizing: border-box;
}

/* ========================================================================
   Header Section
   قسم الرأس
   ======================================================================== */

.apm-report-header {
    background: linear-gradient(135deg, var(--apm-primary) 0%, var(--apm-secondary) 100%);
    color: var(--apm-white);
    padding: var(--apm-spacing-xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.apm-report-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    opacity: 0.1;
}

.apm-header-content {
    position: relative;
    z-index: 2;
}

.apm-report-title {
    margin: 0 0 var(--apm-spacing-sm);
    font-size: var(--apm-font-size-xxl);
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.apm-report-subtitle {
    margin: 0;
    font-size: var(--apm-font-size-lg);
    opacity: 0.95;
    font-weight: 400;
}

/* ========================================================================
   Filter Panel
   لوحة التصفية
   ======================================================================== */

.apm-filter-panel {
    background: var(--apm-white);
    padding: var(--apm-spacing-xl);
    border-bottom: 2px solid var(--apm-lighter);
}

.apm-filter-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--apm-spacing-lg);
    align-items: end;
}

.apm-filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--apm-spacing-sm);
}

.apm-filter-group label {
    font-weight: 600;
    color: var(--apm-dark);
    font-size: var(--apm-font-size-sm);
    display: flex;
    align-items: center;
    gap: var(--apm-spacing-xs);
}

/* Form Elements */
.apm-select, 
.apm-input {
    width: 100%;
    padding: var(--apm-spacing-md);
    border: 2px solid var(--apm-lighter);
    border-radius: var(--apm-radius-md);
    font-size: var(--apm-font-size-base);
    font-family: var(--apm-font-family);
    background: var(--apm-white);
    transition: var(--apm-transition);
    outline: none;
}

.apm-select:focus, 
.apm-input:focus {
    border-color: var(--apm-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.apm-select:hover,
.apm-input:hover {
    border-color: var(--apm-primary-light);
}

/* Buttons */
.apm-btn {
    padding: var(--apm-spacing-md) var(--apm-spacing-lg);
    border: none;
    border-radius: var(--apm-radius-md);
    font-weight: 600;
    font-size: var(--apm-font-size-base);
    font-family: var(--apm-font-family);
    cursor: pointer;
    transition: var(--apm-transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--apm-spacing-sm);
    min-height: 44px;
    justify-content: center;
    position: relative;
    overflow: hidden;
    user-select: none;
}

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

.apm-btn:hover::before {
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
    margin-top: -150px;
    margin-left: -150px;
}

.apm-btn > * {
    position: relative;
    z-index: 1;
}

.apm-btn-primary {
    background: linear-gradient(135deg, var(--apm-primary) 0%, var(--apm-primary-dark) 100%);
    color: var(--apm-white);
}

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

.apm-btn-secondary {
    background: var(--apm-gray);
    color: var(--apm-white);
}

.apm-btn-secondary:hover {
    background: var(--apm-dark);
    transform: translateY(-1px);
}

.apm-btn-tertiary {
    background: var(--apm-info);
    color: var(--apm-white);
}

.apm-btn-tertiary:hover {
    background: #138496;
    transform: translateY(-1px);
}

.apm-btn-hidden {
    display: none !important;
}

.apm-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Single Player Info */
.apm-single-player-info {
    padding: var(--apm-spacing-md);
    background: var(--apm-info-light);
    border: 2px solid var(--apm-info);
    border-radius: var(--apm-radius-md);
    color: var(--apm-darker);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--apm-spacing-sm);
}

/* ========================================================================
   Loading States
   حالات التحميل
   ======================================================================== */

.apm-loading {
    text-align: center;
    padding: var(--apm-spacing-xxl);
    background: var(--apm-white);
    border-radius: var(--apm-radius-lg);
    margin: var(--apm-spacing-lg);
}

.apm-loading-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--apm-spacing-lg);
    position: relative;
}

.apm-loading-spinner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 4px solid var(--apm-lighter);
    border-top: 4px solid var(--apm-primary);
    border-radius: 50%;
    animation: apm-spin 1s linear infinite;
}

@keyframes apm-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.apm-loading-text {
    color: var(--apm-gray);
    font-weight: 500;
    font-size: var(--apm-font-size-lg);
}

.apm-state-hidden {
    display: none !important;
}

/* ========================================================================
   Initial Welcome State
   حالة الترحيب الأولى
   ======================================================================== */

.apm-initial-message {
    text-align: center;
    padding: var(--apm-spacing-xxl);
    background: var(--apm-white);
    color: var(--apm-gray);
}

.apm-message-icon {
    font-size: 4rem;
    margin-bottom: var(--apm-spacing-lg);
    opacity: 0.8;
}

.apm-initial-message h3 {
    color: var(--apm-dark);
    margin: 0 0 var(--apm-spacing-md);
    font-size: var(--apm-font-size-xl);
    font-weight: 600;
}

.apm-initial-message p {
    margin: 0 0 var(--apm-spacing-xl);
    font-size: var(--apm-font-size-lg);
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.apm-message-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--apm-spacing-md);
    margin-top: var(--apm-spacing-xl);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.apm-message-features span {
    background: var(--apm-info-light);
    padding: var(--apm-spacing-md) var(--apm-spacing-lg);
    border-radius: var(--apm-radius-xl);
    font-size: var(--apm-font-size-sm);
    color: #004085;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--apm-spacing-sm);
    transition: var(--apm-transition);
}

.apm-message-features span:hover {
    transform: translateY(-2px);
    box-shadow: var(--apm-shadow-md);
}

/* ========================================================================
   Report Content Area
   منطقة محتوى التقرير
   ======================================================================== */

.apm-report-content {
    background: var(--apm-white);
    min-height: 400px;
    padding: var(--apm-spacing-xl);
}

/* Metrics Grid */
.apm-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--apm-spacing-lg);
    margin-bottom: var(--apm-spacing-xl);
}

.apm-metric-card {
    background: var(--apm-white);
    border: 2px solid var(--apm-lighter);
    border-radius: var(--apm-radius-lg);
    padding: var(--apm-spacing-lg);
    text-align: center;
    transition: var(--apm-transition);
    position: relative;
    overflow: hidden;
}

.apm-metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--apm-primary);
}

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

.apm-metric-card.apm-metric-primary::before {
    background: var(--apm-primary);
}

.apm-metric-card.apm-metric-success::before {
    background: var(--apm-success);
}

.apm-metric-card.apm-metric-warning::before {
    background: var(--apm-warning);
}

.apm-metric-card.apm-metric-danger::before {
    background: var(--apm-danger);
}

.apm-metric-card.apm-metric-info::before {
    background: var(--apm-info);
}

.apm-metric-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--apm-dark);
    margin-bottom: var(--apm-spacing-sm);
    line-height: 1;
}

.apm-metric-label {
    color: var(--apm-gray);
    font-size: var(--apm-font-size-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Progress Bars */
.apm-metric-progress {
    margin-top: var(--apm-spacing-md);
    height: 8px;
    background: var(--apm-lighter);
    border-radius: var(--apm-radius-sm);
    overflow: hidden;
}

.apm-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--apm-primary), var(--apm-primary-light));
    border-radius: var(--apm-radius-sm);
    transition: width 1s ease;
    position: relative;
}

.apm-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: apm-shimmer 2s infinite;
}

@keyframes apm-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ========================================================================
   Sessions Table
   جدول الجلسات
   ======================================================================== */

.apm-sessions-section {
    margin-top: var(--apm-spacing-xl);
    border-top: 2px solid var(--apm-lighter);
    padding-top: var(--apm-spacing-xl);
}

.apm-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--apm-spacing-lg);
}

.apm-section-header h3 {
    margin: 0;
    font-size: var(--apm-font-size-xl);
    color: var(--apm-dark);
    font-weight: 600;
}

.apm-table-wrapper {
    background: var(--apm-white);
    border: 2px solid var(--apm-lighter);
    border-radius: var(--apm-radius-lg);
    overflow: hidden;
    box-shadow: var(--apm-shadow-sm);
}

.apm-sessions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--apm-font-size-sm);
}

.apm-sessions-table th {
    background: var(--apm-light);
    color: var(--apm-dark);
    padding: var(--apm-spacing-md);
    text-align: right;
    font-weight: 600;
    border-bottom: 2px solid var(--apm-lighter);
    position: sticky;
    top: 0;
    z-index: 10;
}

.apm-sessions-table td {
    padding: var(--apm-spacing-md);
    border-bottom: 1px solid var(--apm-lighter);
    vertical-align: middle;
}

.apm-session-row:hover {
    background: var(--apm-light);
}

.apm-session-row:nth-child(even) {
    background: rgba(248, 249, 250, 0.5);
}

/* Status Badges */
.apm-status-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--apm-spacing-xs);
    padding: var(--apm-spacing-xs) var(--apm-spacing-sm);
    border-radius: var(--apm-radius-xl);
    font-size: var(--apm-font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
}

.apm-status-completed {
    background: var(--apm-success-light);
    color: var(--apm-success);
}

.apm-status-partial {
    background: var(--apm-warning-light);
    color: var(--apm-warning);
}

.apm-status-absent {
    background: var(--apm-danger-light);
    color: var(--apm-danger);
}

/* ========================================================================
   Error States
   حالات الأخطاء
   ======================================================================== */

.apm-error {
    background: var(--apm-danger-light);
    border: 2px solid var(--apm-danger);
    color: #721c24;
    padding: var(--apm-spacing-lg);
    border-radius: var(--apm-radius-md);
    margin: var(--apm-spacing-md);
    display: flex;
    align-items: center;
    gap: var(--apm-spacing-md);
}

.apm-error::before {
    content: '⚠️';
    font-size: var(--apm-font-size-xl);
}

/* ========================================================================
   Responsive Design
   التصميم المتجاوب
   ======================================================================== */

@media (max-width: 1200px) {
    .apm-filter-row {
        grid-template-columns: 1fr 1fr 1fr;
    }
    
    .apm-metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .apm-attendance-report-container {
        margin: 0 var(--apm-spacing-md);
        border-radius: var(--apm-radius-md);
    }
    
    .apm-filter-row {
        grid-template-columns: 1fr;
        gap: var(--apm-spacing-md);
    }
    
    .apm-metrics-grid {
        grid-template-columns: 1fr;
        gap: var(--apm-spacing-md);
    }
    
    .apm-report-header {
        padding: var(--apm-spacing-lg);
    }
    
    .apm-report-title {
        font-size: var(--apm-font-size-xl);
    }
    
    .apm-message-features {
        grid-template-columns: 1fr;
    }
    
    .apm-section-header {
        flex-direction: column;
        align-items: stretch;
        gap: var(--apm-spacing-md);
    }
    
    .apm-table-wrapper {
        overflow-x: auto;
    }
    
    .apm-sessions-table {
        min-width: 600px;
    }
}

@media (max-width: 480px) {
    .apm-filter-panel {
        padding: var(--apm-spacing-md);
    }
    
    .apm-initial-message {
        padding: var(--apm-spacing-lg);
    }
    
    .apm-message-icon {
        font-size: 3rem;
    }
    
    .apm-metric-value {
        font-size: 2.5rem;
    }
    
    .apm-btn {
        padding: var(--apm-spacing-sm) var(--apm-spacing-md);
        font-size: var(--apm-font-size-sm);
    }
}

/* ========================================================================
   RTL Support (Arabic)
   دعم الاتجاه من اليمين لليسار
   ======================================================================== */

[dir="rtl"] .apm-attendance-report-container,
.apm-attendance-report-container[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .apm-sessions-table th,
.apm-attendance-report-container[dir="rtl"] .apm-sessions-table th {
    text-align: right;
}

[dir="rtl"] .apm-date-separator,
.apm-attendance-report-container[dir="rtl"] .apm-date-separator {
    transform: scaleX(-1);
}

/* ========================================================================
   Print Styles for Separated Print Windows
   أنماط الطباعة للنوافذ المنفصلة
   ======================================================================== */

/* Print Document Base Styles */
.apm-print-document {
    font-family: 'Arial', 'Tahoma', sans-serif;
    font-size: 12px;
    line-height: 1.4;
    color: #333;
    background: white;
    margin: 0;
    padding: 0;
}

.apm-print-document.apm-ar {
    direction: rtl;
    text-align: right;
}

.apm-print-document.apm-en {
    direction: ltr;
    text-align: left;
}

/* Print-Only Elements */
.print-only {
    display: block !important;
}

@media screen {
    .print-only {
        display: none !important;
    }
}

/* Header Styles for Print */
.apm-print-document .report-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 2px solid #eee;
    page-break-inside: avoid;
}

.apm-print-document .header-logo {
    flex-shrink: 0;
    margin-right: 20px;
}

.apm-print-document.apm-ar .header-logo {
    margin-right: 0;
    margin-left: 20px;
}

.apm-print-document .header-logo img {
    max-width: 80px;
    max-height: 80px;
    object-fit: contain;
}

.apm-print-document .header-content {
    flex: 1;
}

.apm-print-document .header-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.apm-print-document .header-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 5px;
}

.apm-print-document .duration-info {
    font-size: 11px;
    color: #999;
    margin-left: 10px;
}

.apm-print-document.apm-ar .duration-info {
    margin-left: 0;
    margin-right: 10px;
}

.apm-print-document .header-team {
    font-size: 14px;
    color: #444;
    margin-top: 5px;
}

/* Player Info Section */
.apm-print-document .player-info-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    page-break-inside: avoid;
}

.apm-print-document .info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.apm-print-document .info-row .label {
    font-weight: bold;
    color: #495057;
}

/* Metrics Grid for Print */
.apm-print-document .metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
    page-break-inside: avoid;
}

.apm-print-document .secondary-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
    page-break-inside: avoid;
}

.apm-print-document .metric-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.apm-print-document .metric-card .value {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 5px;
    line-height: 1;
}

.apm-print-document .metric-card .label {
    font-size: 9px;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Metric Card Colors */
.apm-print-document .metric-card.primary { border-color: #667eea; }
.apm-print-document .metric-card.primary .value { color: #667eea; }

.apm-print-document .metric-card.success { border-color: #28a745; }
.apm-print-document .metric-card.success .value { color: #28a745; }

.apm-print-document .metric-card.warning { border-color: #ffc107; }
.apm-print-document .metric-card.warning .value { color: #ffc107; }

.apm-print-document .metric-card.info { border-color: #17a2b8; }
.apm-print-document .metric-card.info .value { color: #17a2b8; }

.apm-print-document .metric-card.performance { border-color: #6f42c1; }
.apm-print-document .metric-card.performance .value { color: #6f42c1; }

/* Sessions Table for Print */
.apm-print-document .sessions-section {
    margin-top: 30px;
    page-break-before: auto;
}

.apm-print-document .sessions-section h3 {
    color: #495057;
    font-size: 16px;
    margin-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
}

.apm-print-document .sessions-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 11px;
    page-break-inside: auto;
}

.apm-print-document .sessions-table th,
.apm-print-document .sessions-table td {
    border: 1px solid #dee2e6;
    padding: 8px 6px;
    text-align: center;
}

.apm-print-document .sessions-table th {
    background: #f8f9fa;
    font-weight: bold;
    color: #495057;
    font-size: 10px;
}

.apm-print-document .sessions-table tr.completed td {
    background: #d4f6d4;
}

.apm-print-document .sessions-table tr.partial td {
    background: #fff3cd;
}

.apm-print-document .sessions-table tr.absent td {
    background: #f8d7da;
}

.apm-print-document .sessions-table .status-completed { 
    color: #155724; 
    font-weight: bold; 
}

.apm-print-document .sessions-table .status-partial { 
    color: #856404; 
    font-weight: bold; 
}

.apm-print-document .sessions-table .status-absent { 
    color: #721c24; 
    font-weight: bold; 
}

/* No Sessions State */
.apm-print-document .no-sessions {
    margin-top: 30px;
    padding: 30px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
}

.apm-print-document .no-sessions h3 {
    color: #495057;
    font-size: 16px;
    margin-bottom: 10px;
}

.apm-print-document .no-sessions p {
    color: #6c757d;
    font-size: 14px;
}

/* Footer Styles for Print */
.apm-print-document .report-footer {
    border-top: 2px solid #eee;
    padding: 20px 0;
    margin-top: 40px;
    font-size: 11px;
    color: #666;
    page-break-inside: avoid;
}

.apm-print-document .footer-content {
    text-align: center;
}

.apm-print-document .footer-content p {
    margin-bottom: 8px;
}

.apm-print-document .footer-system {
    font-weight: bold;
    color: #333;
    font-size: 12px;
}

.apm-print-document .footer-date {
    color: #888;
    font-style: italic;
}

@media print {
    .apm-filter-panel,
    .apm-loading,
    .apm-initial-message,
    .apm-btn,
    .apm-error {
        display: none !important;
    }
    
    .apm-attendance-report-container {
        box-shadow: none !important;
        border: none !important;
        margin: 0 !important;
        max-width: none !important;
        background: white !important;
    }
    
    .apm-report-header {
        background: var(--apm-primary) !important;
        color: white !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        page-break-inside: avoid;
    }
    
    .apm-report-content {
        background: white !important;
    }
    
    .apm-metric-card {
        border: 2px solid var(--apm-lighter) !important;
        page-break-inside: avoid;
        margin-bottom: var(--apm-spacing-md) !important;
    }
    
    .apm-metric-card::before {
        background: var(--apm-primary) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .apm-sessions-table {
        border: 2px solid var(--apm-lighter) !important;
    }
    
    .apm-sessions-table th {
        background: var(--apm-light) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .apm-status-badge {
        border: 1px solid currentColor !important;
    }
    
    /* Page Break Controls */
    .apm-metrics-grid {
        page-break-inside: avoid;
    }
    
    .apm-sessions-section {
        page-break-before: auto;
    }
    
    /* Ensure colors print correctly */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}

/* ========================================================================
   Dark Mode Support (Future Enhancement)
   دعم الوضع الليلي (تحسين مستقبلي)
   ======================================================================== */

@media (prefers-color-scheme: dark) {
    .apm-attendance-report-container.apm-dark-mode {
        --apm-white: #1a1a1a;
        --apm-light: #2d2d2d;
        --apm-lighter: #404040;
        --apm-gray: #a0a0a0;
        --apm-dark: #e0e0e0;
        --apm-darker: #f0f0f0;
        --apm-black: #ffffff;
    }
}

/* ========================================================================
   Accessibility Enhancements
   تحسينات إمكانية الوصول
   ======================================================================== */

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .apm-attendance-report-container {
        --apm-primary: #0000ff;
        --apm-success: #008000;
        --apm-warning: #ff8c00;
        --apm-danger: #dc143c;
        --apm-info: #008080;
    }
    
    .apm-btn {
        border: 2px solid currentColor;
    }
    
    .apm-metric-card {
        border-width: 3px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .apm-attendance-report-container *,
    .apm-attendance-report-container *::before,
    .apm-attendance-report-container *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus Management */
.apm-attendance-report-container *:focus {
    outline: 3px solid var(--apm-primary);
    outline-offset: 2px;
}

.apm-attendance-report-container *:focus:not(:focus-visible) {
    outline: none;
}

/* Screen Reader Only Content */
.apm-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}