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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Segoe UI Hebrew', 'Noto Sans Hebrew', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

/* RTL Support */
html[dir="rtl"], body[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .form-group input[dir="rtl"],
html[dir="rtl"] .form-group textarea[dir="rtl"] {
    text-align: right;
}

html[dir="rtl"] .form-group input[dir="ltr"],
html[dir="rtl"] .form-group input[type="date"],
html[dir="rtl"] .form-group input[type="time"],
html[dir="rtl"] .form-group input[type="password"] {
    text-align: left;
    direction: ltr;
}

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

/* Login Box */
.login-box, .form-box {
    background: white;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    margin: 50px auto;
}

/* Success Screen */
.success-screen {
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.success-screen h1 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 32px;
}

.success-screen h2 {
    color: #4caf50;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 500;
}

.success-screen p {
    color: #666;
    font-size: 18px;
    margin-bottom: 30px;
    line-height: 1.6;
}

.success-screen .btn {
    margin-top: 20px;
}

.login-box h1, .form-box h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 10px;
}

.login-box h2 {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-weight: 400;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

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

.form-group small {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 14px;
}

.form-group input[type="file"] {
    padding: 8px;
    border: 2px dashed #e0e0e0;
    border-radius: 5px;
    background: #f9f9f9;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    width: 100%;
    margin-top: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-small {
    padding: 6px 12px;
    font-size: 14px;
    width: auto;
    margin: 0 5px;
}

/* Messages */
.message {
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

/* Dashboard */
.dashboard-header {
    background: white;
    border-radius: 10px;
    padding: 20px 30px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.dashboard-header h1 {
    color: #667eea;
    margin: 0;
}

.filters {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.filter-group input,
.filter-group select {
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #667eea;
}

.filters .btn {
    margin-top: 0;
    height: fit-content;
}

/* Incidents List */
.incidents-list {
    display: grid;
    gap: 15px;
}

.incident-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    cursor: pointer;
}

.incident-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.incident-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.incident-id {
    font-size: 18px;
    font-weight: bold;
    color: #667eea;
}

.incident-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-resolved {
    background: #d4edda;
    color: #155724;
}

.status-dealt_with {
    background: #d1ecf1;
    color: #0c5460;
}

.status-escalation {
    background: #f8d7da;
    color: #721c24;
}

.incident-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
    font-size: 14px;
}

.incident-info-item {
    color: #666;
}

.incident-info-item strong {
    color: #333;
    display: block;
    margin-bottom: 3px;
}

.incident-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

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

.loading {
    text-align: center;
    padding: 40px;
    color: white;
    font-size: 18px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal-content {
    background-color: white;
    margin: 50px auto;
    padding: 30px;
    border-radius: 10px;
    max-width: 800px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

html[dir="rtl"] .close {
    right: auto;
    left: 20px;
}

.close:hover {
    color: #000;
}

.modal-body h2 {
    color: #667eea;
    margin-bottom: 20px;
}

.modal-detail {
    margin-bottom: 20px;
}

.modal-detail label {
    font-weight: 600;
    color: #555;
    display: block;
    margin-bottom: 5px;
}

.modal-detail p {
    color: #333;
    margin-bottom: 15px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 5px;
}

.modal-detail img {
    max-width: 100%;
    border-radius: 5px;
    margin-top: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .login-box, .form-box {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .filters {
        grid-template-columns: 1fr;
    }
    
    .incident-info {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 20px;
        padding: 20px;
    }
}

