* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    min-height: 100vh;
}

/* LOGIN - OPTIMIZADO MOBILE */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 15px;
}

.login-box {
    background: white;
    padding: 25px 20px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    max-width: 400px;
    width: 100%;
}

.login-logo {
    text-align: center;
    margin-bottom: 15px;
}

.login-logo img {
    max-width: 200px;
    height: auto;
}

.login-box p {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
    font-size: 15px;
    font-weight: 500;
}

/* FORM GROUPS */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.form-group label i {
    color: #dc2626;
    margin-right: 5px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    -webkit-appearance: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #dc2626;
}

textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

/* BUTTONS */
.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-logout {
    padding: 10px 16px;
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

.btn-logout:hover {
    background: #ee5a6f;
}

.btn-logout i {
    margin-right: 5px;
}

.btn-generate {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 25px;
    transition: all 0.3s;
    -webkit-tap-highlight-color: transparent;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46,204,113,0.3);
}

.btn-generate i {
    margin-right: 8px;
}

/* DASHBOARD - MOBILE OPTIMIZED */
.dashboard {
    display: none;
    padding: 15px;
    max-width: 1400px;
    margin: 0 auto;
}

.header {
    background: white;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.header-left img {
    height: 50px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.user-info span {
    color: #666;
    font-weight: 600;
    font-size: 14px;
}

.user-whatsapp {
    color: #25d366 !important;
    font-size: 12px !important;
}

/* FORM CONTAINER */
.form-container {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.section-title {
    color: #2c3e50;
    font-size: 19px;
    margin-bottom: 18px;
    padding-bottom: 8px;
    border-bottom: 3px solid #dc2626;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    color: #dc2626;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 20px;
}

/* PHOTO UPLOAD */
.photo-upload {
    margin-bottom: 20px;
}

.photo-upload-btn {
    display: inline-block;
    padding: 12px 20px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    -webkit-tap-highlight-color: transparent;
}

.photo-upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.photo-upload-btn i {
    margin-right: 6px;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.photo-item {
    position: relative;
    aspect-ratio: 1;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* CHECKBOX */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.checkbox-group input[type="checkbox"] {
    width: 22px;
    height: 22px;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-group label {
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}

/* FINANCING INFO */
.financing-info {
    background: #fef3c7;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #dc2626;
}

.financing-info p {
    color: #92400e;
    font-size: 13px;
    margin: 0;
    line-height: 1.5;
}

.financing-info i {
    margin-right: 5px;
}

/* UTILITIES */
.hidden {
    display: none !important;
}

/* RESPONSIVE - TABLET Y DESKTOP */
@media (min-width: 768px) {
    .dashboard {
        padding: 20px;
    }
    
    .header {
        padding: 20px 30px;
    }
    
    .header-left img {
        height: 70px;
    }
    
    .form-container {
        padding: 30px;
    }
    
    .section-title {
        font-size: 22px;
    }
    
    .form-row {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .user-info {
        flex-wrap: nowrap;
    }
}

/* MOBILE FIXES */
@media (max-width: 480px) {
    .header {
        flex-direction: column;
        text-align: center;
    }
    
    .user-info {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-logout {
        width: 100%;
    }
    
    .photo-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* SMOOTH SCROLLING */
html {
    scroll-behavior: smooth;
}

/* TOUCH FEEDBACK */
button, .photo-upload-btn, .checkbox-group label {
    -webkit-tap-highlight-color: rgba(0,0,0,0.1);
}