/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0d1b5e 0%, #1a3a8a 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    overflow: hidden;
}

/* Header */
header {
    background: linear-gradient(135deg, #1a3a8a 0%, #0d1b5e 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header .logo {
    max-width: 250px;
    height: auto;
    margin-bottom: 15px;
}

header h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

header p {
    opacity: 0.9;
    font-size: 16px;
}

/* Formulario */
form {
    padding: 30px;
}

fieldset {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
}

legend {
    font-weight: bold;
    color: #0d1b5e;
    font-size: 18px;
    padding: 0 10px;
}

.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

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

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

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #1b8c2e;
    box-shadow: 0 0 0 3px rgba(27, 140, 46, 0.2);
}

input[type="file"] {
    padding: 10px;
    background: #f8f8f8;
}

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

textarea {
    resize: vertical;
    min-height: 80px;
}

select {
    cursor: pointer;
    background: white;
}

/* Info box */
.info-box {
    background: #f0f7ff;
    border-left: 4px solid #0d1b5e;
    padding: 15px 20px;
    border-radius: 0 8px 8px 0;
    margin-top: 15px;
}

.info-box h4 {
    color: #0d1b5e;
    margin-bottom: 10px;
}

.info-box ul {
    margin-left: 20px;
    margin-bottom: 10px;
}

.info-box li {
    margin-bottom: 5px;
    color: #444;
}

/* Términos */
.terminos {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
}

.terminos label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: normal;
    cursor: pointer;
}

.terminos input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
}

/* Botón submit */
.btn-submit {
    display: block;
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #1b8c2e 0%, #158f24 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 20px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(27, 140, 46, 0.4);
}

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

/* Mensajes */
.mensaje {
    padding: 20px;
    margin: 20px 30px;
    border-radius: 10px;
    font-weight: 500;
    text-align: center;
}

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

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

/* Footer */
footer {
    background: #f5f5f5;
    padding: 20px 30px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

footer p {
    margin-bottom: 5px;
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    
    .container {
        border-radius: 15px;
    }
    
    header {
        padding: 20px;
    }
    
    header h1 {
        font-size: 22px;
    }
    
    form {
        padding: 20px;
    }
    
    fieldset {
        padding: 15px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-row .form-group {
        min-width: 100%;
    }
}

/* ==================== */
/* ESTILOS PANEL ADMIN */
/* ==================== */

.admin-container {
    max-width: 1200px;
}

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

.admin-header h1 {
    margin-bottom: 0;
}

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

.btn-primary {
    background: #0d1b5e;
    color: white;
}

.btn-primary:hover {
    background: #1a3a8a;
}

.btn-success {
    background: #1b8c2e;
    color: white;
}

.btn-success:hover {
    background: #158f24;
}

.btn-danger {
    background: #c62828;
    color: white;
}

.btn-danger:hover {
    background: #a52222;
}

.btn-secondary {
    background: #666;
    color: white;
}

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

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

/* Tabla */
.table-container {
    overflow-x: auto;
    margin: 20px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: #0d1b5e;
    color: white;
    font-weight: 600;
    white-space: nowrap;
}

tr:hover {
    background: #f8f8f8;
}

/* Estados */
.estado {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.estado-pendiente {
    background: #fff3cd;
    color: #856404;
}

.estado-contactado {
    background: #cce5ff;
    color: #004085;
}

.estado-instalado {
    background: #d4edda;
    color: #155724;
}

.estado-cancelado {
    background: #f8d7da;
    color: #721c24;
}

/* Login */
.login-container {
    max-width: 400px;
}

.login-container form {
    padding: 30px;
}

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

/* Detalle solicitud */
.detalle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

.detalle-card {
    background: #f8f8f8;
    padding: 20px;
    border-radius: 10px;
}

.detalle-card h3 {
    color: #0d1b5e;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0d1b5e;
}

.detalle-item {
    margin-bottom: 12px;
}

.detalle-item strong {
    display: block;
    color: #666;
    font-size: 13px;
    margin-bottom: 3px;
}

.detalle-item span {
    color: #333;
    font-size: 15px;
}

.dni-images {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.dni-images a {
    display: block;
}

.dni-images img {
    max-width: 200px;
    border-radius: 8px;
    border: 2px solid #ddd;
    transition: transform 0.3s;
}

.dni-images img:hover {
    transform: scale(1.05);
}

/* Filtros */
.filtros {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 10px;
    margin-bottom: 20px;
}

.filtros select,
.filtros input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

/* Acciones */
.acciones {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 20px;
    background: #f0f7ff;
    border-radius: 10px;
    margin-top: 20px;
}

.acciones select {
    padding: 10px 15px;
    border: 2px solid #0d1b5e;
    border-radius: 6px;
    font-size: 14px;
}

/* Notas */
.notas-section {
    margin-top: 20px;
    padding: 20px;
}

.notas-section textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    min-height: 100px;
}
