/* ============================================
   MI CARPETA - Portal certificado digital
   Estilo institucional premium (Bootstrap 5)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --azul-oscuro: #0f2b46;
    --azul-medio: #1e5fa6;
    --azul-accent: #3b82f6;
    --azul-claro: #eff6ff;
    --azul-gradient: linear-gradient(135deg, #0f2b46 0%, #1e5fa6 50%, #2563eb 100%);
    --gris-texto: #374151;
    --gris-muted: #6b7280;
    --gris-light: #f8fafc;
    --blanco: #ffffff;
    --verde: #16a34a;
    --sombra-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --sombra-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
    --sombra-lg: 0 10px 25px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
    --sombra-xl: 0 20px 50px -12px rgba(0,0,0,0.15);
    --radius: 12px;
    --radius-lg: 20px;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--gris-texto);
    background: var(--gris-light);
    -webkit-font-smoothing: antialiased;
}

/* --- NAVBAR --- */
.navbar { box-shadow: var(--sombra-sm); }
.navbar-brand {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--azul-oscuro) !important;
    letter-spacing: -0.3px;
}
.navbar-brand svg { margin-right: 8px; }

/* --- HERO --- */
.hero-section {
    background: var(--azul-gradient);
    position: relative;
    overflow: hidden;
    padding: 70px 0 90px;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
}
.hero-section::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -10%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
}
.hero-section h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.15;
    color: #fff;
}
.hero-section .lead {
    font-size: 1.15rem;
    opacity: 0.85;
    font-weight: 400;
    color: #fff;
}

/* Features strip */
.features-strip {
    margin-top: -50px;
    position: relative;
    z-index: 2;
}
.feature-card {
    background: var(--blanco);
    border-radius: var(--radius);
    box-shadow: var(--sombra-lg);
    padding: 28px 24px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--sombra-xl);
}
.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}
.feature-icon.blue { background: #dbeafe; color: #2563eb; }
.feature-icon.green { background: #dcfce7; color: #16a34a; }
.feature-icon.orange { background: #ffedd5; color: #ea580c; }
.feature-card h6 {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: var(--azul-oscuro);
}
.feature-card p {
    font-size: 0.82rem;
    color: var(--gris-muted);
    margin: 0;
    line-height: 1.5;
}

/* --- CERT INFO BANNER --- */
.cert-info {
    background: var(--azul-claro);
    border: 1px solid #bfdbfe;
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 28px;
}
.cert-info .cert-name {
    font-weight: 700;
    color: var(--azul-oscuro);
    font-size: 1rem;
}
.cert-info .cert-nif {
    font-weight: 600;
    color: var(--azul-medio);
    font-size: 0.9rem;
}
.cert-info .cert-issuer {
    color: var(--gris-muted);
    font-size: 0.8rem;
}
.cert-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #dcfce7;
    color: #166534;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
}

/* --- FORM CARD --- */
.form-card {
    background: var(--blanco);
    border-radius: var(--radius-lg);
    box-shadow: var(--sombra-xl);
    border: 1px solid rgba(0,0,0,0.04);
}
.form-card .card-body { padding: 40px; }
.form-card .form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--azul-oscuro);
    margin-bottom: 6px;
}
.form-card .form-control,
.form-card .form-select {
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    padding: 10px 16px;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-card .form-control:focus,
.form-card .form-select:focus {
    border-color: var(--azul-accent);
    box-shadow: 0 0 0 4px rgba(59,130,246,0.1);
}
.form-card .form-control[readonly] {
    background: #f1f5f9;
    color: var(--gris-muted);
}
.form-card .btn-primary {
    background: var(--azul-accent);
    border: none;
    border-radius: 10px;
    padding: 12px 32px;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: -0.2px;
    transition: all 0.2s;
}
.form-card .btn-primary:hover {
    background: var(--azul-medio);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30,95,166,0.3);
}
.legal-text {
    font-size: 0.75rem;
    color: var(--gris-muted);
    line-height: 1.5;
}

/* --- ERROR PAGE --- */
.error-card {
    background: var(--blanco);
    border-radius: var(--radius-lg);
    box-shadow: var(--sombra-xl);
    border: 1px solid rgba(0,0,0,0.04);
    padding: 60px 40px;
    text-align: center;
}
.error-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #fef2f2;
    color: #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}
.error-card h2 {
    font-weight: 800;
    color: var(--azul-oscuro);
    margin-bottom: 12px;
}
.error-card p {
    color: var(--gris-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* --- SUCCESS --- */
.success-card {
    background: var(--blanco);
    border-radius: var(--radius-lg);
    box-shadow: var(--sombra-xl);
    border: 1px solid rgba(0,0,0,0.04);
    padding: 60px 40px;
    text-align: center;
}
.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #dcfce7;
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

/* --- FOOTER --- */
.site-footer {
    background: var(--azul-oscuro);
    color: rgba(255,255,255,0.6);
    font-size: 0.82rem;
}
.site-footer a { color: rgba(255,255,255,0.8); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-legal { margin-top: 8px; }
.footer-legal a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 0.78rem;
    margin: 0 10px;
    transition: color 0.2s;
}
.footer-legal a:hover { color: rgba(255,255,255,0.9); }

/* --- RESPONSIVE --- */
@media (max-width: 767px) {
    .hero-section { padding: 50px 0 70px; }
    .hero-section h1 { font-size: 1.75rem; }
    .form-card .card-body { padding: 24px; }
    .cert-info { padding: 16px; }
}
