* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "DM Sans", sans-serif;
    background: linear-gradient(135deg, #041E42 0%, #08316B 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 20px;
    padding: 30px 20px;
}

header h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

header p {
    font-size: 18px;
    opacity: 0.9;
}

.loading {
    text-align: center;
    color: white;
    font-size: 20px;
    padding: 60px 20px;
}

.error {
    background: white;
    color: #e74c3c;
    padding: 20px;
    border-radius: 12px;
    margin: 20px auto;
    max-width: 600px;
    text-align: center;
    font-weight: 600;
}

.search-container {
    max-width: 600px;
    margin: 0 auto 30px;
}

#searchInput {
    width: 100%;
    padding: 14px 18px;
    border-radius: 12px;
    border: none;
    font-size: 16px;
    outline: none;
}

.logoOdella{
    width: 150px;
    height: auto;
    margin: 0 auto 10px;
    display: block;
}

/* Grid de contactos */
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.contact-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #041E42, #08316B);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.contact-card:hover::before {
    transform: scaleX(1);
}

.contact-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #041E42 0%, #08316B 100%);
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    font-weight: 700;
}

.contact-name {
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
    text-align: center;
}

.contact-position {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 4px;
    text-align: center;
}

.contact-company {
    font-size: 14px;
    color: #95a5a6;
    text-align: center;
    font-weight: 500;
}

/* Página de detalle */
.detail-page {
    display: none;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.detail-container {
    background: white;
    border-radius: 24px;
    padding: 30px 40px;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.detail-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 0;
}

.detail-logo {
    width: 140px;
    display: block;
    margin: 0 auto 18px;
}

.detail-avatar {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #041E42 0%, #08316B 100%);
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
    font-weight: 700;
}

.detail-name {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.detail-position {
    font-size: 18px;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.detail-company {
    font-size: 16px;
    color: #95a5a6;
    font-weight: 500;
}

.detail-content {
    max-width: 600px;
    margin: 20px auto 0;
}

.detail-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.info-icon {
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.info-text {
    flex: 1;
}

.info-label {
    font-size: 12px;
    color: #95a5a6;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
}

.info-value {
    font-size: 15px;
    color: #2c3e50;
    word-break: break-word;
}

.qr-section { display:none; }
.qr-wrapper { display:none; }
#qrcode { display:none; }
.qr-controls { display:none; }
.control-group { display:none; }
.control-label { display:none; }
.control-input { display:none; }
.color-inputs { display:none; }
.checkbox-group { display:none; }

.action-buttons {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 600px;
    margin: 20px auto 0;
}

.btn {
    flex: 1;
    background: linear-gradient(135deg, #041E42 0%, #08316B 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn:hover { transform: translateY(-3px); }
.btn-secondary {
    background: white;
    color: #041E42;
    border: 2px solid #041E42;
}

.btn-secondary:hover { background: #041E42; color: white; }

@media (max-width: 768px) {
    .detail-container {
        padding: 20px;
    }

    header h1 { font-size: 32px; }
    .contacts-grid { grid-template-columns: 1fr; }
}