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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

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

/* Header */
header {
    background: #2c3e50;
    color: white;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

header h1 {
    margin-bottom: 0.5rem;
}

/* Navegación */
nav ul {
    list-style: none;
    display: flex;
    background: #34495e;
}

nav ul li {
    margin: 0;
}

nav ul li a {
    display: block;
    padding: 1rem;
    color: white;
    text-decoration: none;
    transition: background 0.3s;
}

nav ul li a:hover,
nav ul li a.active {
    background: #1abc9c;
}

/* Main content */
main {
    margin-bottom: 2rem;
}

/* Formularios */
.auth-form {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.btn {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.3s;
}

.btn:hover {
    background: #2980b9;
}

.btn-danger {
    background: #e74c3c;
}

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

.btn-success {
    background: #2ecc71;
}

.btn-success:hover {
    background: #27ae60;
}

/* Tablas */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    background: white;
}

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

table th {
    background: #f2f2f2;
    font-weight: bold;
}

table tr:hover {
    background: #f5f5f5;
}

/* Mensajes */
.error {
    background: #f8d7da;
    color: #721c24;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.success {
    background: #d4edda;
    color: #155724;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* Hero section */
.hero {
    text-align: center;
    padding: 2rem 0;
}

.hero h2 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.features {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.feature {
    flex: 1;
    min-width: 250px;
    margin: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Stats */
.stats {
    margin-bottom: 2rem;
}

.stat-cards {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

.stat-card {
    flex: 1;
    min-width: 200px;
    margin: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
}

/* Quick actions */
.quick-actions {
    margin-bottom: 2rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
    }
    
    .features,
    .stat-cards {
        flex-direction: column;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons a {
        text-align: center;
    }
}

/* Estilos para las funcionalidades JavaScript */
.error-message {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.error {
    border-color: #e74c3c !important;
}

.character-counter {
    text-align: right;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    color: #7f8c8d;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem;
    border-radius: 5px;
    color: white;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.notification.show {
    transform: translateX(0);
}

.notification-info { background: #3498db; }
.notification-success { background: #27ae60; }
.notification-warning { background: #f39c12; }
.notification-error { background: #e74c3c; }

.close-notification {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    float: right;
    margin-left: 1rem;
    line-height: 1;
}

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

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 5px;
    max-width: 600px;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    color: #7f8c8d;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.image-preview {
    margin-top: 1rem;
    max-width: 200px;
    border: 2px dashed #ddd;
    padding: 1rem;
    text-align: center;
}

.image-preview img {
    max-width: 100%;
    border-radius: 5px;
}

.toggle-password {
    cursor: pointer;
    margin-left: -30px;
    background: none;
    border: none;
    color: #7f8c8d;
    position: relative;
    z-index: 2;
}

.live-counter {
    transition: transform 0.3s ease;
    display: inline-block;
}

/* Estados para equipos y pedidos */
.status-ingresado { background: #fff3cd; color: #856404; }
.status-en_reparacion { background: #d1ecf1; color: #0c5460; }
.status-reparado { background: #d4edda; color: #155724; }
.status-entregado { background: #e2e3e5; color: #383d41; }

.status-pendiente { background: #fff3cd; color: #856404; }
.status-aprobado { background: #d1ecf1; color: #0c5460; }
.status-rechazado { background: #f8d7da; color: #721c24; }
.status-completado { background: #d4edda; color: #155724; }

/* Filtros avanzados */
.advanced-filters {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    border: 1px solid #dee2e6;
}

.filter-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

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

/* Responsive */
@media (max-width: 768px) {
    .notification {
        left: 10px;
        right: 10px;
        max-width: none;
    }
    
    .modal-content {
        margin: 10% 10px;
        padding: 1rem;
    }
    
    .filter-row {
        flex-direction: column;
    }
    
    .filter-group {
        min-width: 100%;
    }
}


/* ===== HEADER STYLES ===== */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #34495e;
}

.logo h1 {
    margin: 0;
    color: #1abc9c;
    font-size: 1.8rem;
}

.logo h1 i {
    margin-right: 0.5rem;
}

.logo p {
    margin: 0.25rem 0 0 0;
    color: #bdc3c7;
    font-size: 0.9rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-welcome {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ecf0f1;
}

.user-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.badge-admin { background: #e74c3c; color: white; }
.badge-tecnico { background: #f39c12; color: white; }
.badge-cliente { background: #3498db; color: white; }

.logout-btn {
    color: #ecf0f1;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid #34495e;
    border-radius: 4px;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: #e74c3c;
    border-color: #e74c3c;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid #1abc9c;
    color: #1abc9c;
}

.btn-outline:hover {
    background: #1abc9c;
    color: white;
}

.main-nav {
    background: #34495e;
    margin-top: 1rem;
    border-radius: 5px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.main-nav li {
    position: relative;
}

.main-nav a {
    display: block;
    padding: 1rem 1.5rem;
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
    background: #2c3e50;
    border-bottom-color: #1abc9c;
}

.main-nav a i {
    margin-right: 0.5rem;
    width: 16px;
    text-align: center;
}

/* Submenu para admin */
.admin-menu .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #2c3e50;
    min-width: 200px;
    z-index: 1000;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.admin-menu .submenu li {
    border-bottom: 1px solid #34495e;
}

.admin-menu .submenu li:last-child {
    border-bottom: none;
}

.admin-menu .submenu a {
    padding: 0.75rem 1.5rem;
    border-bottom: none;
    font-size: 0.9rem;
}

.admin-menu .submenu a:hover {
    background: #1abc9c;
}

/* Breadcrumb */
.breadcrumb {
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    border-radius: 5px;
    margin: 1rem 0;
}

.breadcrumb ul {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    color: #6c757d;
}

.breadcrumb li:not(:last-child)::after {
    content: ">";
    margin: 0 0.5rem;
    color: #adb5bd;
}

.breadcrumb a {
    color: #3498db;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Alertas */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

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

.alert i {
    margin-right: 0.5rem;
}

.close-alert {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: inherit;
}

/* ===== FOOTER STYLES ===== */
footer {
    background: #2c3e50;
    color: #ecf0f1;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.footer-section h3 {
    color: #1abc9c;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section h3 i {
    margin-right: 0.5rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #1abc9c;
}

.footer-section a i {
    margin-right: 0.5rem;
    width: 16px;
}

.contact-info p {
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
}

.contact-info i {
    margin-right: 0.5rem;
    width: 16px;
    color: #1abc9c;
}

.business-hours li {
    padding: 0.25rem 0;
    border-bottom: 1px solid #34495e;
}

.business-hours li:last-child {
    border-bottom: none;
}

.social-links h4 {
    margin: 1rem 0 0.5rem 0;
    color: #bdc3c7;
}

.social-icons {
    display: flex;
    gap: 0.5rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #34495e;
    border-radius: 50%;
    transition: all 0.3s;
}

.social-link:hover {
    background: #1abc9c;
    transform: translateY(-2px);
}

.footer-bottom {
    background: #34495e;
    padding: 1rem 0;
    border-top: 1px solid #2c3e50;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 1rem;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: #1abc9c;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .user-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .main-nav ul {
        flex-direction: column;
    }
    
    .main-nav a {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #2c3e50;
    }
    
    .admin-menu .submenu {
        position: static;
        width: 100%;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    .breadcrumb ul {
        flex-wrap: wrap;
    }
}

/* Estilos para la sección de desbloqueo */
.desbloqueo-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.desbloqueo-info {
    margin-bottom: 20px;
}

.info-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.info-card ul {
    list-style: none;
    padding: 0;
}

.info-card li {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.info-card li:last-child {
    border-bottom: none;
}

.desbloqueo-form {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

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

.form-row .form-group {
    flex: 1;
}

.historial-desbloqueos {
    background: white;
    padding: 20px;
    border-radius: 8px;
}

/* Estados */
.status-pendiente {
    color: #ffc107;
    font-weight: bold;
}

.status-procesando {
    color: #17a2b8;
    font-weight: bold;
}

.status-completado {
    color: #28a745;
    font-weight: bold;
}

.status-error {
    color: #dc3545;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}