* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tahoma', 'Arial', sans-serif;
}

body {
    background: #f5f5f5;
    direction: rtl;
    text-align: right;
}

/* صفحه لاگین */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
}

.login-box h2 {
    text-align: center;
    color: #666;
    font-size: 18px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    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: 60px;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-login:hover {
    transform: scale(1.02);
}

.btn-login:active {
    transform: scale(0.98);
}

.error-msg {
    color: #f44336;
    margin-top: 10px;
    text-align: center;
}

/* نقشه */
#map {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* دکمه‌های کنترلی */
.map-controls {
    position: fixed;
    bottom: 30px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ctrl-btn {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: none;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ctrl-btn:hover {
    transform: scale(1.1);
}

.ctrl-btn:active {
    transform: scale(0.9);
}

/* فرم تمام صفحه */
.fullscreen-form {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
}

.form-content {
    background: white;
    width: 95%;
    max-width: 600px;
    max-height: 95vh;
    border-radius: 20px;
    padding: 25px;
    overflow-y: auto;
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.3s ease;
    position: relative;
}

.close-form {
    position: sticky;
    top: 0;
    float: left;
    background: #f44336;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    margin-bottom: 15px;
    z-index: 10;
}

.form-content h2 {
    color: #333;
    margin-bottom: 20px;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
}

.btn-secondary {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}

/* بخش عکس‌ها */
.photos-section {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 10px;
}

.photo-group {
    margin-bottom: 15px;
}

.photo-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #555;
}

.photo-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.photo-preview .photo-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #ddd;
}

.photo-preview.small .photo-item {
    width: 80px;
    height: 80px;
}

.photo-preview.large .photo-item {
    width: 200px;
    height: 200px;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.delete-photo {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #f44336;
    color: white;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
}

/* شیرآلات */
.valves-section {
    margin: 20px 0;
    padding: 15px;
    background: #f0f7ff;
    border-radius: 10px;
}

.valve-icon {
    transition: transform 0.2s;
}

.valve-icon:hover {
    transform: scale(1.2);
}

/* ریسپانسیو */
@media (max-width: 600px) {
    .form-content {
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
        padding: 20px;
    }

    .ctrl-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .photo-preview.large .photo-item {
        width: 150px;
        height: 150px;
    }
}