* {
    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;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 600px;
}

.auth-box, .form-box {
    background: white;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

h1 {
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

input[type="text"],
input[type="password"],
input[type="file"],
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: Arial, sans-serif;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="file"]:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
}

textarea {
    resize: vertical;
}

small {
    display: block;
    color: #999;
    font-size: 12px;
    margin-top: 5px;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #667eea;
    color: white;
    width: 100%;
}

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

.btn-secondary {
    background: #e0e0e0;
    color: #333;
    margin-top: 10px;
}

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

.button-group {
    display: flex;
    gap: 10px;
    flex-direction: column;
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 5px;
    margin-top: 15px;
    border: 1px solid #f5c6cb;
}

.success {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 5px;
    margin-top: 15px;
    border: 1px solid #c3e6cb;
}

.footer-links {
    text-align: center;
    margin-top: 20px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-size: 14px;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* ADMIN */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: white;
    padding: 20px;
    border-radius: 10px;
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: white;
    padding: 10px;
    border-radius: 10px;
}

.tab-button {
    padding: 10px 20px;
    border: none;
    background: #f0f0f0;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.tab-button.active {
    background: #667eea;
    color: white;
}

.tab-content {
    display: none;
    background: white;
    padding: 20px;
    border-radius: 10px;
}

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

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.admin-table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.admin-table tr:hover {
    background: #f9f9f9;
}

.badge {
    background: #ffc107;
    color: #333;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.lista-incidencias,
.lista-viviendas {
    max-height: 600px;
    overflow-y: auto;
}

@media (max-width: 600px) {
    .auth-box, .form-box {
        padding: 20px;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .admin-table {
        font-size: 12px;
    }
}
