/* CSS Variables for theming */
:root {
    --primary-color: #3b82f6;
    --primary-color-light: #dbeafe;
    --accent-color: #10b981;
    --accent-color-light: #d1fae5;
    --danger-color: #ef4444;
    --danger-color-light: #fee2e2;
    --warning-color: #f59e0b;
    --warning-color-light: #fef3c7;
    --success-color: #22c55e;
    --success-color-light: #dcfce7;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-navbar: #ffffff;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    --border-color: #e2e8f0;
    --border-radius: 12px;
    --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);
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-family-arabic: 'Cairo', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark theme variables */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;
    --bg-navbar: #1e293b;
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    --border-color: #334155;
    
    --primary-color-light: #1e3a8a;
    --accent-color-light: #065f46;
    --warning-color-light: #92400e;
    --success-color-light: #166534;
    --danger-color-light: #991b1b;
}

/* RTL Support */
[dir="rtl"] {
    --font-family: var(--font-family-arabic);
}

/* Loading Screen Styles */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
    overflow: hidden;
}

.loading-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    animation: grainMove 20s linear infinite;
}

.loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loading-container {
    text-align: center;
    color: white;
    max-width: 400px;
    padding: 2rem;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.loading-logo {
    margin-bottom: 3rem;
    animation: logoFloat 2s ease-in-out infinite;
}

.logo-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #ffffff;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
    animation: iconGlow 2s ease-in-out infinite alternate;
}

.logo-text {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0 0 0.5rem 0;
}

.logo-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.loading-animation {
    margin-bottom: 3rem;
}

.loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top: 3px solid #ffffff;
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.spinner-ring:nth-child(1) {
    animation-delay: 0s;
}

.spinner-ring:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 10px;
    left: 10px;
    border-top-color: rgba(255, 255, 255, 0.8);
    animation-delay: 0.2s;
}

.spinner-ring:nth-child(3) {
    width: 40px;
    height: 40px;
    top: 20px;
    left: 20px;
    border-top-color: rgba(255, 255, 255, 0.6);
    animation-delay: 0.4s;
}

.loading-text {
    font-size: 1.2rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.loading-dots {
    display: flex;
    gap: 0.25rem;
}

.loading-dots span {
    width: 6px;
    height: 6px;
    background-color: #ffffff;
    border-radius: 50%;
    animation: dotsPulse 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: 0s; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

.loading-progress {
    margin-bottom: 3rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    position: relative;
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffffff, #f0f0f0);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.progress-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.loading-features {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    opacity: 0;
    animation: featureFadeIn 0.6s ease-out forwards;
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-item:nth-child(1) { animation-delay: 0.5s; }
.feature-item:nth-child(2) { animation-delay: 0.7s; }
.feature-item:nth-child(3) { animation-delay: 0.9s; }

.feature-item i {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
}

.loading-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.loading-footer p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    text-align: center;
}

/* Loading Animations */
@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes dotsPulse {
    0%, 80%, 100% { 
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% { 
        transform: scale(1.2);
        opacity: 1;
    }
}

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

@keyframes grainMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(100px, 100px); }
}

@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

@keyframes iconGlow {
    0% { filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3)); }
    100% { filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.6)); }
}

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

.progress-fill {
    background: linear-gradient(90deg, #ffffff, #f0f0f0, #ffffff);
    background-size: 200px 100%;
    animation: shimmer 2s infinite;
}

/* RTL Support for Loading Screen */
[dir="rtl"] .loading-features {
    flex-direction: row-reverse;
}

[dir="rtl"] .loading-text {
    flex-direction: row-reverse;
}

/* Responsive Loading Screen */
@media (max-width: 768px) {
    .loading-container {
        padding: 1rem;
        max-width: 300px;
    }
    
    .logo-icon {
        font-size: 3rem;
    }
    
    .logo-text {
        font-size: 1.5rem;
    }
    
    .logo-subtitle {
        font-size: 0.8rem;
    }
    
    .loading-spinner {
        width: 60px;
        height: 60px;
    }
    
    .spinner-ring:nth-child(2) {
        width: 45px;
        height: 45px;
        top: 7.5px;
        left: 7.5px;
    }
    
    .spinner-ring:nth-child(3) {
        width: 30px;
        height: 30px;
        top: 15px;
        left: 15px;
    }
    
    .loading-features {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .feature-item {
        flex-direction: row;
        gap: 0.75rem;
    }
    
    .loading-footer {
        margin-top: 1.5rem;
    }
}

@media (max-width: 480px) {
    .loading-container {
        padding: 0.75rem;
        max-width: 280px;
    }
    
    .logo-icon {
        font-size: 2.5rem;
    }
    
    .logo-text {
        font-size: 1.25rem;
    }
    
    .logo-subtitle {
        font-size: 0.75rem;
    }
    
    .loading-spinner {
        width: 50px;
        height: 50px;
    }
    
    .spinner-ring:nth-child(2) {
        width: 37.5px;
        height: 37.5px;
        top: 6.25px;
        left: 6.25px;
    }
    
    .spinner-ring:nth-child(3) {
        width: 25px;
        height: 25px;
        top: 12.5px;
        left: 12.5px;
    }
}

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

/* Main content entrance animation */
.main-content {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.main-content.loaded {
    opacity: 1;
    transform: translateY(0);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* Navigation */
.navbar {
    background-color: var(--bg-navbar);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-brand i {
    font-size: 2rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 500;
}

.nav-link:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

.nav-link i {
    font-size: 1.1rem;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.language-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.language-toggle:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    width: 24px;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.content-section {
    display: none;
}

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

.section-header {
    margin-bottom: 2rem;
    text-align: center;
}

.section-header h1 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}



.stat-card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.stat-card.highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
}

.stat-card.highlight .stat-content h3,
.stat-card.highlight .stat-content p {
    color: white;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.stat-card.highlight .stat-icon {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.stat-content h3 {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

/* Forms */
.form-container {
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.modern-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input[readonly] {
    background-color: var(--bg-tertiary);
    color: var(--text-muted);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    justify-content: center;
    min-width: 120px;
}

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

.btn-primary:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--border-color);
}

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

 .btn-danger:hover {
     background-color: #dc2626;
 }

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

 .btn-warning:hover {
     background-color: #d97706;
 }

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

 .btn-success:hover {
     background-color: #059669;
     transform: translateY(-1px);
 }

/* Tables */
.table-container {
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

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

.modern-table th,
.modern-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.modern-table th {
    background-color: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modern-table tr:hover {
    background-color: var(--bg-secondary);
}

.modern-table td {
    color: var(--text-secondary);
}

/* Action buttons in tables */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.btn-sm {
    padding: 0.5rem;
    min-width: auto;
    font-size: 0.875rem;
    border-radius: 6px;
}

.btn-sm i {
    font-size: 0.75rem;
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.summary-card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    text-align: center;
}

.summary-card h3 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.summary-card p {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

/* Recent Activity */
.recent-activity {
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.activity-content h4 {
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.activity-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Work Schedule Section Styles */
.schedule-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.overview-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

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

.overview-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}

.overview-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.overview-number {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Weekly Schedule Section */
.weekly-schedule-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.weekly-schedule-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.weekly-day-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: var(--transition);
}

.weekly-day-card.work-day {
    background: var(--primary-color-light);
    border-color: var(--primary-color);
}

.weekly-day-card.weekend {
    background: var(--accent-color-light);
    border-color: var(--accent-color);
}

.weekly-day-card.holiday {
    background: var(--warning-color-light);
    border-color: var(--warning-color);
}

.weekly-day-card {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

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

.day-notes {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: var(--bg-primary);
    border-radius: 4px;
    border-left: 3px solid var(--primary-color);
    text-align: left;
    max-height: 3rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.day-edit-hint {
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: var(--text-secondary);
    opacity: 0;
    transition: opacity 0.3s ease;
    background: var(--bg-primary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
}

.weekly-day-card:hover .day-edit-hint {
    opacity: 1;
}

.day-edit-hint i {
    margin-right: 0.25rem;
    color: var(--primary-color);
}

.day-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.day-hours {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.day-status {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-top: 0.5rem;
    display: inline-block;
}

.day-status.work {
    background: var(--primary-color);
    color: white;
}

.day-status.off {
    background: var(--text-secondary);
    color: white;
}

.day-status.holiday {
    background: var(--warning-color);
    color: white;
}

/* Holidays Section */
.holidays-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

/* Day Edit Modal */
.day-edit-modal {
    max-width: 500px;
}

.day-edit-modal .form-group {
    margin-bottom: 1rem;
}

.day-edit-modal .form-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.day-edit-modal textarea {
    resize: vertical;
    min-height: 80px;
}

/* Monthly Calendar Styles */
.monthly-schedule-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.schedule-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.calendar-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.current-month {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 150px;
    text-align: center;
}

.schedule-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.calendar-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.calendar-day-header {
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    min-height: 400px;
}

.calendar-day {
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem;
    min-height: 80px;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
}

.calendar-day:hover {
    background: var(--bg-secondary);
    transform: scale(1.02);
}

.calendar-day.other-month {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: default;
}

.calendar-day.other-month:hover {
    transform: none;
    background: var(--bg-tertiary);
}

.calendar-day.today {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    font-weight: 600;
}

.calendar-day.today .calendar-day-number {
    color: white;
}

.calendar-day.work-day {
    background: var(--primary-color-light);
    border-left: 4px solid var(--primary-color);
}

.calendar-day.holiday-day {
    background: var(--warning-color-light);
    border-left: 4px solid var(--warning-color);
}

.calendar-day.off-day {
    background: var(--accent-color-light);
    border-left: 4px solid var(--accent-color);
}

.calendar-day-number {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.calendar-day-time {
    font-size: 0.7rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.25rem;
    background: var(--bg-primary);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    border: 1px solid var(--primary-color);
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-day-notes {
    font-size: 0.7rem;
    color: var(--text-secondary);
    background: var(--bg-primary);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    margin-bottom: 0.25rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-left: 2px solid var(--primary-color);
}

.calendar-day-type {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-weight: 600;
    text-align: center;
    min-width: 20px;
}

.calendar-day-type.work {
    background: var(--primary-color);
    color: white;
}

.calendar-day-type.holiday {
    background: var(--warning-color);
    color: white;
}

.calendar-day-type.off {
    background: var(--accent-color);
    color: white;
}

/* RTL Support for Calendar */
[dir="rtl"] .calendar-day {
    border-right: none;
    border-left: 1px solid var(--border-color);
}

[dir="rtl"] .calendar-day:last-child {
    border-left: none;
}

[dir="rtl"] .calendar-day.work-day,
[dir="rtl"] .calendar-day.holiday-day,
[dir="rtl"] .calendar-day.off-day {
    border-left: none;
    border-right: 4px solid;
}

[dir="rtl"] .calendar-day.work-day {
    border-right-color: var(--primary-color);
}

[dir="rtl"] .calendar-day.holiday-day {
    border-right-color: var(--warning-color);
}

[dir="rtl"] .calendar-day.off-day {
    border-right-color: var(--accent-color);
}

[dir="rtl"] .calendar-day-notes {
    border-left: none;
    border-right: 2px solid var(--primary-color);
}

[dir="rtl"] .calendar-day-time {
    border-left: none;
    border-right: 1px solid var(--primary-color);
}

.holidays-list {
    margin-top: 1.5rem;
}

.holiday-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.holiday-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.holiday-info {
    flex: 1;
}

.holiday-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.holiday-dates {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.holiday-type {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
}

.holiday-type.public {
    background: var(--primary-color);
    color: white;
}

.holiday-type.personal {
    background: var(--accent-color);
    color: white;
}

.holiday-type.sick {
    background: var(--danger-color);
    color: white;
}

.holiday-type.vacation {
    background: var(--warning-color);
    color: white;
}

.holiday-actions {
    display: flex;
    gap: 0.5rem;
}

/* Schedule Modal Styles */
.schedule-modal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

.schedule-days {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.schedule-day-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
}

.day-header {
    margin-bottom: 1rem;
}

.day-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
}

.day-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.day-hours {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.day-hours .form-group {
    margin: 0;
}

/* Holiday Modal Styles */
.holiday-modal .modal-body {
    max-height: 60vh;
    overflow-y: auto;
}

/* Responsive Design for Schedule */
@media (max-width: 768px) {
    .weekly-schedule-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .day-hours {
        grid-template-columns: 1fr;
    }
    
    .holiday-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .holiday-actions {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .weekly-schedule-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .schedule-overview {
        grid-template-columns: 1fr;
    }
}

.schedule-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.calendar-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.current-month {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 150px;
    text-align: center;
}

.schedule-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.calendar-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.calendar-day-header {
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    min-height: 400px;
}

.calendar-day {
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem;
    min-height: 80px;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.calendar-day:hover {
    background: var(--bg-secondary);
}

.calendar-day.other-month {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.calendar-day.today {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    font-weight: 600;
}

.calendar-day.has-appointments {
    background: rgba(59, 130, 246, 0.1);
}

.calendar-day-number {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.calendar-day-appointments {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.appointment-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-color);
    margin: 0 auto;
}

.appointment-dot.urgent {
    background: var(--danger-color);
}

.appointment-dot.high {
    background: var(--warning-color);
}

.appointment-dot.medium {
    background: var(--accent-color);
}

.appointment-dot.low {
    background: var(--text-muted);
}

.appointments-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.section-subheader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-subheader h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.appointments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.appointment-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    transition: var(--transition);
    cursor: pointer;
}

.appointment-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.appointment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.appointment-title {
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    font-size: 1rem;
}

.appointment-time {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.appointment-details {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.appointment-category {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.appointment-priority {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.appointment-priority.urgent {
    background: var(--danger-color);
    color: white;
}

.appointment-priority.high {
    background: var(--warning-color);
    color: white;
}

.appointment-priority.medium {
    background: var(--accent-color);
    color: white;
}

.appointment-priority.low {
    background: var(--text-muted);
    color: white;
}

.appointment-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.appointment-status.scheduled {
    background: var(--primary-color);
    color: white;
}

.appointment-status.in-progress {
    background: var(--warning-color);
    color: white;
}

.appointment-status.completed {
    background: var(--success-color);
    color: white;
}

.appointment-status.cancelled {
    background: var(--danger-color);
    color: white;
}

.appointment-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
}

.appointment-location {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.appointment-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.appointment-actions button {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    border-radius: 4px;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 4px;
}

/* Appointment Modal Styles */
.appointment-modal {
    max-width: 600px;
    width: 90%;
}

.appointment-modal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.1rem;
    margin: 0;
}

/* Responsive Design for Schedule */
@media (max-width: 768px) {
    .schedule-overview {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .schedule-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .calendar-controls {
        justify-content: center;
    }
    
    .schedule-actions {
        justify-content: center;
    }
    
    .calendar-day {
        min-height: 60px;
        padding: 0.25rem;
    }
    
    .calendar-day-number {
        font-size: 0.8rem;
    }
    
    .calendar-day-notes {
        font-size: 0.6rem;
        padding: 0.15rem 0.3rem;
    }
    
    .calendar-day-time {
        font-size: 0.6rem;
        padding: 0.15rem 0.3rem;
    }
    
    .calendar-day-type {
        font-size: 0.6rem;
        padding: 0.15rem 0.3rem;
    }
    
    .current-month {
        font-size: 1.25rem;
        min-width: 120px;
    }
    
    .section-subheader {
        flex-direction: column;
        align-items: stretch;
    }
    
    .appointment-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .appointment-details {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .schedule-overview {
        grid-template-columns: 1fr;
    }
    
    .calendar-day {
        min-height: 50px;
    }
    
    .calendar-day-header {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    .calendar-day-number {
        font-size: 0.7rem;
    }
    
    .calendar-day-notes {
        font-size: 0.5rem;
        padding: 0.1rem 0.2rem;
    }
    
    .calendar-day-time {
        font-size: 0.5rem;
        padding: 0.1rem 0.2rem;
    }
    
    .calendar-day-type {
        font-size: 0.5rem;
        padding: 0.1rem 0.2rem;
        min-width: 16px;
    }
    
    .current-month {
        font-size: 1rem;
        min-width: 100px;
    }
    
    .schedule-controls {
        gap: 0.5rem;
    }
    
    .calendar-controls {
        gap: 0.5rem;
    }
    
    .schedule-actions {
        gap: 0.5rem;
    }
}

/* RTL Support for Calendar */
[dir="rtl"] .calendar-day {
    border-right: none;
    border-left: 1px solid var(--border-color);
}

[dir="rtl"] .calendar-day:last-child {
    border-left: none;
}

[dir="rtl"] .appointment-item:hover {
    transform: translateX(-4px);
}

[dir="rtl"] .overview-card {
    flex-direction: row-reverse;
}

/* Settings */
.settings-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.settings-section {
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.settings-section h2 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.data-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Modal */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-container.active,
#edit-modal.active {
    display: flex;
}

#edit-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal {
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

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

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--bg-navbar);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        padding: 1rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        width: 100%;
        justify-content: flex-start;
    }

    .menu-toggle {
        display: flex;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }



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

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .table-container {
        overflow-x: auto;
    }

    .modern-table {
        min-width: 600px;
    }

    .summary-cards {
        grid-template-columns: 1fr;
    }

    .data-actions {
        flex-direction: column;
    }

    .main-content {
        padding: 1rem;
    }

    .form-container,
    .settings-section {
        padding: 1.5rem;
    }
    
    .modal {
        max-width: 95%;
        width: 95%;
    }
    
    .modal-body {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 0.5rem;
    }

    .brand-text {
        display: none;
    }



    .section-header h1 {
        font-size: 2rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }
}

/* RTL Specific Styles */
[dir="rtl"] .nav-link {
    flex-direction: row-reverse;
}

/* Auth (Login) Page */
.auth-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 1rem;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 2rem;
}

.auth-brand {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    margin: 0 auto 0.75rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.25);
    font-size: 1.5rem;
}

.auth-title {
    margin: 0 0 0.25rem 0;
}

.auth-subtitle {
    margin: 0;
    color: var(--text-secondary);
}

.auth-form {
    margin-top: 1rem;
}

.input-with-icon {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.5rem 0.75rem;
    background: var(--bg-primary);
}

.input-with-icon i {
    color: var(--text-muted);
}

.input-with-icon input {
    border: none;
    outline: none;
    width: 100%;
    background: transparent;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
}

.toggle-password {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
}

.input-error {
    color: var(--danger-color);
    font-size: 0.8rem;
    min-height: 1rem;
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.remember-me {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    user-select: none;
}

.auth-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.auth-submit {
    width: 100%;
}

.auth-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: var(--text-muted);
    margin: 1rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    height: 1px;
    width: 100%;
    background: var(--border-color);
}

.auth-lang {
    width: 100%;
    margin-top: 0.25rem;
}

.auth-footer {
    margin-top: 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Logout button in navbar */
.logout-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.logout-button:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

[dir="rtl"] .input-with-icon {
    flex-direction: row-reverse;
}

[dir="rtl"] .auth-row {
    flex-direction: row-reverse;
}

/* Auth background decorative layer */
.auth-wrapper { perspective: 1000px; }
.auth-body { position: relative; overflow: hidden; }
.auth-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}
.auth-bg .bg-circle {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.35;
    animation: blobFloat 18s ease-in-out infinite;
}
.auth-bg .bg-circle:nth-child(1) {
    top: -80px; left: -80px;
    background: radial-gradient(closest-side, #8b5cf6, transparent 70%);
}
.auth-bg .bg-circle:nth-child(2) {
    bottom: -100px; right: -120px;
    background: radial-gradient(closest-side, #10b981, transparent 70%);
    animation-delay: 4s;
}
.auth-bg .bg-circle:nth-child(3) {
    top: 40%; left: -120px;
    background: radial-gradient(closest-side, #3b82f6, transparent 70%);
    animation-delay: 8s;
}
.auth-bg .bg-circle:nth-child(4) {
    bottom: 10%; right: 20%;
    background: radial-gradient(closest-side, #f59e0b, transparent 70%);
    animation-delay: 12s;
}

@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, -30px) scale(1.1); }
}

/* Auth card enhancements */
.auth-card {
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    animation: cardPop 600ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(16px) saturate(120%);
}

[data-theme="dark"] .auth-card {
    background: rgba(30, 41, 59, 0.7);
}

.auth-card::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(59,130,246,0.6), rgba(16,185,129,0.6));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    pointer-events: none;
}

@keyframes cardPop {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-icon {
    position: relative;
}
.auth-icon::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 16px;
    background: radial-gradient(closest-side, rgba(59,130,246,0.35), transparent 70%);
    filter: blur(10px);
    z-index: -1;
    animation: pulseGlow 2.2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.06); opacity: 1; }
}

/* Inputs focus glow */
.input-with-icon:focus-within {
    box-shadow: 0 0 0 3px rgba(59,130,246,0.12), 0 8px 24px rgba(59,130,246,0.12);
    border-color: rgba(59,130,246,0.6);
}
.input-with-icon input::placeholder { color: var(--text-muted); }

/* Button loading spinner */
.auth-submit { position: relative; overflow: hidden; }
.auth-submit.loading { opacity: 0.85; pointer-events: none; }
.auth-submit.loading::after {
    content: '';
    position: absolute;
    right: 14px;
    width: 18px; height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.7);
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

/* Shake on error */
.shake { animation: shakeX 420ms cubic-bezier(.36,.07,.19,.97) both; }
@keyframes shakeX {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(2px); }
    30%, 50%, 70% { transform: translateX(-4px); }
    40%, 60% { transform: translateX(4px); }
}

/* Link hover underline animation */
.auth-link { position: relative; }
.auth-link::after {
    content: '';
    position: absolute;
    left: 0; bottom: -2px;
    width: 0%; height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.25s ease;
}
.auth-link:hover::after { width: 100%; }

[dir="rtl"] .btn {
    flex-direction: row-reverse;
}

[dir="rtl"] .stat-card {
    flex-direction: row-reverse;
}

[dir="rtl"] .activity-item {
    flex-direction: row-reverse;
    border-left: none;
    border-right: 4px solid var(--primary-color);
}

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

[dir="rtl"] .form-actions {
    justify-content: flex-end;
}

[dir="rtl"] .modal-header {
    flex-direction: row-reverse;
}

/* Font Size Adjustments */
[data-font-size="small"] {
    font-size: 14px;
}

[data-font-size="large"] {
    font-size: 18px;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

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

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.hidden { display: none; }
.visible { display: block; }

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-pending {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.status-completed {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

/* Category Badges */
.category-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    font-weight: 500;
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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



