/* إعدادات عامة */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light Mode Colors */
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-header: #ffffff;
    --bg-login: #3d7c5d;
    --text-primary: #333;
    --text-secondary: #7f8c8d;
    --text-light: #ffffff;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    
    /* Accent Colors */
    --color-blue: #3498db;
    --color-green: #27ae60;
    --color-red: #e74c3c;
    --color-purple: #8e44ad;
    --color-orange: #e67e22;
    --color-yellow: #f39c12;
    --color-gray: #95a5a6;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

body.dark-mode {
    /* Dark Mode Colors */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-card: #2d2d2d;
    --bg-header: #2d2d2d;
    --bg-login: #2d4a3e;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --text-light: #ffffff;
    --border-color: #404040;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(-100%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-100%) scale(0.8);
    }
}

body {
    font-family: 'Segoe UI', 'Tahoma', 'Arial', sans-serif;
    background: var(--bg-primary);
    min-height: 100vh;
    direction: rtl;
    position: relative;
    overflow-x: hidden;
    color: var(--text-primary);
    transition: background var(--transition-normal), color var(--transition-normal);
}

/* الشاشات */
.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* شاشة تسجيل الدخول */
.login-container {
    max-width: 480px;
    margin: 80px auto;
    background: var(--bg-login);
    padding: 50px 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    animation: slideUp 0.5s ease-out;
    position: relative;
    z-index: 1;
    transition: all var(--transition-normal);
}

.logo {
    text-align: center;
    margin-bottom: 32px;
}

.logo h1 {
    font-size: 32px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0;
    text-transform: none;
    font-family: 'Segoe UI', sans-serif;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: #ffffff;
    font-size: 14px;
    letter-spacing: 0;
    text-transform: none;
    font-family: 'Segoe UI', sans-serif;
}

.form-control {
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', sans-serif;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-control:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.2);
}

.form-control:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23ffffff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
    padding-left: 40px;
}

select.form-control option {
    background: #2c3e50;
    color: #ffffff;
    padding: 10px;
}

/* الأزرار - Apple Style */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-primary {
    background: #ffffff;
    border: none;
    color: #3d7c5d;
    width: 100%;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    font-family: 'Segoe UI', sans-serif;
    font-size: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover:not(:disabled) {
    background: #f0f0f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary:active:not(:disabled) {
    background: #e8e8e8;
    transform: translateY(1px);
}

.btn-secondary {
    background: #3498db;
    border: none;
    color: #ffffff;
    letter-spacing: 0;
    text-transform: none;
    font-family: 'Segoe UI', sans-serif;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
}

.btn-secondary:hover:not(:disabled) {
    background: #2980b9;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.btn-secondary:active:not(:disabled) {
    background: #2471a3;
    transform: translateY(1px);
}

.btn-danger {
    background: #e74c3c;
    border: none;
    color: #ffffff;
    width: 100%;
    font-size: 15px;
    padding: 14px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    font-family: 'Segoe UI', sans-serif;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.btn-danger:hover:not(:disabled) {
    background: #c0392b;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

.btn-danger:active:not(:disabled) {
    background: #a93226;
    transform: translateY(1px);
}

/* الهيدر */
.header {
    background: var(--bg-header);
    padding: 16px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 10;
    transition: all var(--transition-normal);
}

.user-info {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0;
    text-transform: none;
    font-family: 'Segoe UI', sans-serif;
    transition: color var(--transition-normal);
}

.header-actions {
    display: flex;
    gap: 12px;
}

/* الحاوية */
.container {
    max-width: 1200px;
    margin: 32px auto;
    padding: 0 24px;
}

/* بطاقات الإحصائيات */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    padding: 0;
    border-radius: 12px;
    border-top: 4px solid var(--color-purple);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: all var(--transition-normal);
    overflow: hidden;
}

.stat-card:nth-child(1) {
    border-top-color: #8e44ad;
}

.stat-card:nth-child(2) {
    border-top-color: #f39c12;
}

.stat-card:nth-child(3) {
    border-top-color: #27ae60;
}

.stat-card:nth-child(4) {
    border-top-color: #95a5a6;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px) scale(1.02);
}

.stat-icon {
    font-size: 32px;
    padding: 16px 0 8px 0;
    text-align: center;
}

.stat-content {
    background: var(--bg-secondary);
    padding: 16px 20px;
    text-align: center;
    transition: background var(--transition-normal);
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    font-family: 'Segoe UI', sans-serif;
    transition: color var(--transition-normal);
}

.stat-value {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Segoe UI', sans-serif;
    transition: color var(--transition-normal);
}

/* بطاقة تفاصيل وقت كل نوع بريك */
.break-type-details-card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    border-top: 4px solid var(--color-blue);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    animation: slideUp 0.3s ease-out;
}

.break-type-details-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

.break-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.break-type-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.break-type-item:hover {
    background: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.break-type-icon {
    font-size: 32px;
    margin-left: 12px;
}

.break-type-info {
    flex: 1;
}

.break-type-name {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-weight: 500;
}

.break-type-time {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Segoe UI', sans-serif;
}

.break-type-time.warning {
    color: var(--color-orange);
}

.break-type-time.danger {
    color: var(--color-red);
}

/* بطاقة حالة طلب الاستئذان الخاص */
.pending-request-status-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    border-left: 4px solid var(--color-orange);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    animation: slideUp 0.3s ease-out;
}

.pending-request-status-card.rejected {
    border-left-color: var(--color-red);
}

.request-status-header {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.request-status-body {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.request-status-pending {
    color: var(--color-orange);
    font-weight: 500;
}

.request-status-rejected {
    color: var(--color-red);
    font-weight: 500;
}

/* بطاقة تفاصيل التجاوزات */
.violations-details-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    border-left: 4px solid var(--color-red);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    animation: slideUp 0.3s ease-out;
}

.violation-details {
    color: var(--color-red);
    font-size: 14px;
    line-height: 1.8;
    font-weight: 500;
}

.violations-details-card::before {
    content: '⚠️ تفاصيل التجاوزات';
    display: block;
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

/* بطاقة البريك الحالي */
.current-break-card {
    background: var(--bg-card);
    padding: 0;
    border-radius: 12px;
    margin-bottom: 24px;
    border-top: 4px solid var(--color-blue);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.current-break-card h3 {
    margin-bottom: 0;
    padding: 20px;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0;
    text-transform: none;
    font-family: 'Segoe UI', sans-serif;
    background: var(--bg-card);
    transition: all var(--transition-normal);
}

.current-break-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: 0;
    border: none;
    transition: background var(--transition-normal);
}

.break-type-display {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Segoe UI', sans-serif;
    transition: color var(--transition-normal);
}

.break-timer {
    font-size: 48px;
    font-weight: 700;
    color: var(--color-red);
    font-family: 'Segoe UI', sans-serif;
    transition: color var(--transition-normal);
}

.break-timer.warning {
    color: var(--color-orange);
}

.break-timer.danger {
    color: #e74c3c;
}

/* بطاقات البريكات */
.breaks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.break-card {
    background: var(--bg-card);
    padding: 0;
    border-radius: 12px;
    border-top: 4px solid var(--color-blue);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: all var(--transition-normal);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.break-card:nth-child(1) {
    border-top-color: #9b59b6;
}

.break-card:nth-child(2) {
    border-top-color: #27ae60;
}

.break-card:nth-child(3) {
    border-top-color: #e67e22;
}

.break-card:nth-child(4) {
    border-top-color: #e74c3c;
}

.break-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px) scale(1.02);
}

.break-icon {
    font-size: 40px;
    padding: 20px 0 12px 0;
    transition: transform 0.3s ease;
}

.break-card:hover .break-icon {
    transform: scale(1.08);
}

.break-card h3 {
    color: var(--text-primary);
    margin-bottom: 0;
    padding: 0 20px 16px 20px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    font-family: 'Segoe UI', sans-serif;
    transition: color var(--transition-normal);
}

.break-status {
    margin-bottom: 0;
    padding: 0 20px 12px 20px;
    min-height: 40px;
}

.break-card > .btn-break {
    margin-top: auto;
    border-radius: 0 0 8px 8px;
}

.status-indicator {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.status-indicator.available {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    font-family: 'Segoe UI', sans-serif;
    letter-spacing: 0;
}

.status-indicator.occupied {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    font-family: 'Segoe UI', sans-serif;
    letter-spacing: 0;
}

.occupied-info {
    margin-top: 8px;
    font-size: 12px;
    color: #6c757d;
    font-family: 'Segoe UI', sans-serif;
}

.btn-break {
    width: 100%;
    padding: 12px;
    background: #3498db;
    border: none;
    color: #ffffff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', sans-serif;
    letter-spacing: 0;
    text-transform: none;
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
}

.btn-break:hover:not(:disabled) {
    background: #2980b9;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
    transform: translateY(-1px);
}

.btn-break:active:not(:disabled) {
    background: #2471a3;
    transform: translateY(1px);
}

.btn-break:disabled {
    background: #bdc3c7;
    color: #7f8c8d;
    cursor: not-allowed;
    box-shadow: none;
}

/* طلبات الاستئذان المعلقة */
.pending-requests-container {
    background: var(--bg-card);
    padding: 28px;
    border-radius: 12px;
    margin-bottom: 24px;
    border-top: 4px solid var(--color-orange);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.no-requests {
    text-align: center;
    color: var(--text-secondary);
    padding: 28px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0;
    font-family: 'Segoe UI', sans-serif;
}

.pending-request-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    margin-bottom: 12px;
    border-radius: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-right: 4px solid var(--color-orange);
    transition: all var(--transition-normal);
    animation: slideInRight 0.3s ease-out;
}

.pending-request-item:hover {
    background: var(--bg-primary);
    border-color: var(--color-orange);
    transform: translateX(-2px);
    box-shadow: var(--shadow-sm);
}

.request-info {
    flex: 1;
}

.request-employee {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.request-time {
    font-size: 13px;
    color: var(--text-secondary);
}

.request-waiting {
    font-size: 12px;
    color: var(--color-orange);
    font-weight: 500;
    margin-top: 4px;
}

.request-actions {
    display: flex;
    gap: 8px;
}

.btn-approve {
    background: var(--color-green);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-approve:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-reject {
    background: var(--color-red);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-reject:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* إدارة البريكات */
.manage-breaks-container {
    background: var(--bg-card);
    padding: 28px;
    border-radius: 12px;
    margin-bottom: 24px;
    border-top: 4px solid var(--color-purple);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.manage-break-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.manage-break-item:hover {
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
}

.manage-break-info {
    flex: 1;
}

.manage-break-employee {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.manage-break-details {
    font-size: 13px;
    color: var(--text-secondary);
}

.manage-break-actions {
    display: flex;
    gap: 8px;
}

.btn-edit {
    background: var(--color-blue);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-edit:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-delete {
    background: var(--color-red);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-delete:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 2px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--color-red);
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
}

.modal-body p {
    margin-bottom: 16px;
    color: var(--text-primary);
    font-size: 15px;
}

.modal-body label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* البريكات النشطة */
.active-breaks-container {
    background: var(--bg-card);
    padding: 28px;
    border-radius: 12px;
    margin-bottom: 24px;
    border-top: 4px solid var(--color-blue);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.no-breaks {
    text-align: center;
    color: #7f8c8d;
    padding: 28px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0;
    font-family: 'Segoe UI', sans-serif;
}

.active-break-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.active-break-item:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    transform: translateX(-2px);
}

.active-break-item.normal {
    border-right: 4px solid #27ae60;
}

.active-break-item.warning {
    border-right: 4px solid #f39c12;
    background: #fff3cd;
}

.active-break-item.danger {
    border-right: 4px solid #e74c3c;
    background: #f8d7da;
}

.break-employee {
    font-weight: 600;
    font-size: 15px;
    color: #2c3e50;
    font-family: 'Segoe UI', sans-serif;
}

.break-type {
    font-size: 13px;
    color: #7f8c8d;
    font-family: 'Segoe UI', sans-serif;
}

.break-duration {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    font-family: 'Segoe UI', sans-serif;
}

/* الإحصائيات اليومية */
.daily-stats-container {
    background: #ffffff;
    padding: 28px;
    border-radius: 12px;
    border-top: 4px solid #3498db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow-x: auto;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
}

.stats-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.stats-table th,
.stats-table td {
    padding: 14px 18px;
    text-align: right;
    border-bottom: 1px solid #e9ecef;
}

.stats-table th {
    font-weight: 600;
    color: #2c3e50;
    font-size: 13px;
    letter-spacing: 0;
    text-transform: none;
    font-family: 'Segoe UI', sans-serif;
}

.stats-table td {
    color: #2c3e50;
    font-size: 14px;
    font-family: 'Segoe UI', sans-serif;
}

.stats-table tbody tr:hover {
    background: #f8f9fa;
}

.text-center {
    text-align: center !important;
}

.text-danger {
    color: #e74c3c;
    font-weight: 600;
}

.outgoing-info {
    color: #27ae60;
    font-weight: 500;
}

/* التبويبات */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: #ffffff;
    padding: 6px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: #7f8c8d;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    letter-spacing: 0;
    text-transform: none;
    font-family: 'Segoe UI', sans-serif;
}

.tab-btn.active {
    background: #3498db;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
}

.tab-btn:hover:not(.active) {
    background: #f8f9fa;
    color: #2c3e50;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* التقارير */
.report-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.report-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.report-table th {
    padding: 14px 18px;
    text-align: right;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
    color: #2c3e50;
    font-size: 13px;
    letter-spacing: 0;
    text-transform: none;
    font-family: 'Segoe UI', sans-serif;
}

.report-table td {
    padding: 14px 18px;
    text-align: right;
    border-bottom: 1px solid #e9ecef;
    color: #2c3e50;
    font-size: 14px;
    font-family: 'Segoe UI', sans-serif;
}

.report-table tbody tr:hover {
    background: #f8f9fa;
}

.break-details {
    font-size: 13px;
    color: #7f8c8d;
    font-family: 'Segoe UI', sans-serif;
}

/* العناوين */
h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    font-family: 'Segoe UI', sans-serif;
}

/* الإشعارات - Apple Style */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 14px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    min-width: 280px;
    max-width: 400px;
}

.notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.notification-icon {
    font-size: 20px;
}

.notification-success {
    background: rgba(212, 237, 218, 0.95);
    color: #0d7d3f;
    border: 1px solid rgba(13, 125, 63, 0.2);
}

.notification-error {
    background: rgba(255, 211, 208, 0.95);
    color: #c41e3a;
    border: 1px solid rgba(196, 30, 58, 0.2);
}

.notification-warning {
    background: rgba(255, 244, 230, 0.95);
    color: #cc7a00;
    border: 1px solid rgba(204, 122, 0, 0.2);
}

.notification-info {
    background: rgba(209, 236, 241, 0.95);
    color: #0071e3;
    border: 1px solid rgba(0, 113, 227, 0.2);
}

/* استجابة للشاشات الصغيرة */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    .stats-grid,
    .breaks-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .header {
        flex-direction: column;
        gap: 12px;
        padding: 12px 20px;
    }
    
    .header-actions {
        width: 100%;
        flex-direction: column;
        gap: 8px;
    }
    
    .header-actions .btn {
        width: 100%;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .notification {
        min-width: 280px;
        max-width: 90%;
    }
    
    .login-container {
        margin: 40px 16px;
        padding: 32px 24px;
    }
    
    .logo h1 {
        font-size: 24px;
    }
    
    .stat-card {
        min-height: auto;
    }
    
    .stat-icon {
        font-size: 28px;
        padding: 12px 0 6px 0;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .break-card {
        min-height: auto;
    }
    
    .break-icon {
        font-size: 36px;
        padding: 16px 0 10px 0;
    }
    
    .break-card h3 {
        font-size: 15px;
    }
    
    .current-break-card h3 {
        font-size: 16px;
        padding: 16px;
    }
    
    .current-break-info {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
    }
    
    .break-timer {
        font-size: 40px;
    }
    
    .break-type-display {
        font-size: 18px;
    }
    
    .active-breaks-container,
    .daily-stats-container {
        padding: 20px;
    }
    
    .stats-table,
    .report-table {
        font-size: 13px;
    }
    
    .stats-table th,
    .stats-table td,
    .report-table th,
    .report-table td {
        padding: 10px 12px;
    }
    
    .tabs {
        flex-direction: column;
        gap: 6px;
    }
    
    .tab-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    h2 {
        font-size: 18px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .btn-break {
        padding: 10px;
        font-size: 13px;
    }
}

/* شاشات صغيرة جداً */
@media (max-width: 480px) {
    .login-container {
        margin: 20px 12px;
        padding: 24px 20px;
    }
    
    .logo h1 {
        font-size: 20px;
    }
    
    .container {
        padding: 0 12px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .break-timer {
        font-size: 32px;
    }
    
    .stats-table,
    .report-table {
        font-size: 12px;
    }
    
    .stats-table th,
    .stats-table td,
    .report-table th,
    .report-table td {
        padding: 8px 10px;
    }
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all var(--transition-normal);
    z-index: 1000;
}

.dark-mode-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: var(--shadow-lg);
}

.dark-mode-toggle:active {
    transform: scale(0.95);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
}

.toast {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toastIn 0.3s ease-out;
    border-left: 4px solid var(--color-blue);
    transition: all var(--transition-normal);
}

.toast.toast-out {
    animation: toastOut 0.3s ease-out;
}

.toast.success {
    border-left-color: var(--color-green);
}

.toast.error {
    border-left-color: var(--color-red);
}

.toast.warning {
    border-left-color: var(--color-orange);
}

.toast.info {
    border-left-color: var(--color-blue);
}

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.toast-message {
    font-size: 13px;
    color: var(--text-secondary);
}

.toast-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.toast-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Loading States */
.loading-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: 10000;
    animation: fadeIn 0.2s ease-out;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--bg-secondary);
    border-top-color: var(--color-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-text {
    position: absolute;
    margin-top: 100px;
    color: var(--text-light);
    font-size: 16px;
    font-weight: 500;
}

.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-secondary) 25%,
        var(--bg-primary) 50%,
        var(--bg-secondary) 75%
    );
    background-size: 200% 100%;
    animation: pulse 1.5s ease-in-out infinite;
    border-radius: 8px;
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 12px;
}

.skeleton-card {
    height: 120px;
    border-radius: 12px;
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

*:focus-visible {
    outline: 2px solid var(--color-blue);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--color-blue);
    outline-offset: 2px;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background: var(--color-blue);
    color: var(--text-light);
}

/* Improved Transitions */
.stat-card,
.break-card,
.current-break-card,
.active-breaks-container,
.daily-stats-container,
.btn,
.header,
.login-container {
    will-change: transform;
}

/* Mobile Toast */
@media (max-width: 768px) {
    .toast-container {
        right: 12px;
        left: 12px;
        max-width: none;
    }
    
    .dark-mode-toggle {
        bottom: 16px;
        left: 16px;
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
}
