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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    direction: rtl;
    color: #333;
    margin: 0;
    padding: 0;
}

/* מסך התחברות */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.login-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.login-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 400px;
    text-align: center;
    animation: slideInUp 0.6s ease-out;
}

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

.login-header h1 {
    color: #2c3e50;
    font-size: 2.2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.login-header p {
    color: #7f8c8d;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    text-align: right;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 1rem;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.login-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    font-size: 0.9rem;
    margin-top: 10px;
}

/* מסך ראשי */
.main-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow-y: auto;
    z-index: 999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.main-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    text-align: center;
}

.header h1 {
    color: #2c3e50;
    font-size: 2.2rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.date-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}


#currentDate {
    font-size: 1.1rem;
    color: #7f8c8d;
    font-weight: 500;
}

.refresh-btn {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

.reported-section,
.unreported-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.reported-section h2 {
    color: #27ae60;
    font-size: 1.5rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.unreported-section h2 {
    color: #e74c3c;
    font-size: 1.5rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.count {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
}

.label {
    font-size: 1rem;
    color: #7f8c8d;
    font-weight: 500;
}

.list-container {
    max-height: 400px;
    overflow-y: auto;
    border-radius: 10px;
}

.student-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.location-section {
    margin-bottom: 20px;
}

.location-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 1.1rem;
}

.location-header.home {
    background: linear-gradient(135deg, #e8f5e8, #d4edda);
    color: #155724;
    border: 2px solid #c3e6cb;
}

.location-header.yeshiva {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #0d47a1;
    border: 2px solid #90caf9;
}

.location-icon {
    font-size: 1.3rem;
}

.location-title {
    flex: 1;
}

.location-count {
    background: rgba(255, 255, 255, 0.8);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 700;
}

.location-students {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-right: 15px;
}

.student-item {
    background: white;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-right: 4px solid;
    margin-bottom: 12px;
    position: relative;
}

.student-item.reported {
    border-right-color: #27ae60;
}

.student-item.reported.home {
    border-right-color: #28a745;
    background: linear-gradient(135deg, #f8fff8, #e8f5e8);
}

.student-item.reported.yeshiva {
    border-right-color: #007bff;
    background: linear-gradient(135deg, #f8f9ff, #e3f2fd);
}

.student-item.unreported {
    border-right-color: #e74c3c;
}


.student-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.student-info {
    margin-bottom: 12px;
    text-align: right;
}

.student-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
}

.student-id {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-weight: 500;
}

.report-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.location {
    background: #ecf0f1;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #2c3e50;
}

.time {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-weight: 500;
}

.edit-badge {
    background: #f39c12;
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
}

.student-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    gap: 15px;
}

.status-badge {
    background: #e74c3c;
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 600;
    flex-shrink: 0;
}

.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 10px;
    font-weight: 600;
    z-index: 1000;
    max-width: 300px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.message.success-message {
    background: #27ae60;
    color: white;
}

.message.error-message {
    background: #e74c3c;
    color: white;
}

.message.info-message {
    background: #3498db;
    color: white;
}

.message.hidden {
    display: none;
}

.no-data {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
    font-size: 1.1rem;
    font-style: italic;
}

.loading {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
    font-size: 1.1rem;
}


.list-container::-webkit-scrollbar {
    width: 8px;
}

.list-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.list-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.list-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.report-buttons {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.report-btn {
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-shrink: 0;
}

.home-btn {
    background: linear-gradient(45deg, #28a745, #20c997);
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.3);
}

.home-btn:hover {
    background: linear-gradient(45deg, #218838, #1ea085);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(40, 167, 69, 0.4);
}

.yeshiva-btn {
    background: linear-gradient(45deg, #6f42c1, #8e44ad);
    box-shadow: 0 2px 6px rgba(111, 66, 193, 0.3);
}

.yeshiva-btn:hover {
    background: linear-gradient(45deg, #5a32a3, #7d3c98);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(111, 66, 193, 0.4);
}

.report-btn:active {
    transform: translateY(0);
}




@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .date-info {
        flex-direction: column;
        text-align: center;
    }
    
    .student-item {
        padding: 12px;
    }
    
    .report-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .option-cards {
        flex-direction: column;
        align-items: center;
    }
    
    .option-card {
        width: 100%;
        max-width: 200px;
    }
}
