/**
 * Certificum - Estilos principales
 *
 * Sistema de Certificacion de Archivos mediante Blockchain
 */

/* =====================================================
   VARIABLES CSS
   ===================================================== */
:root {
    --cb-primary: #6366f1;
    --cb-primary-dark: #4f46e5;
    --cb-primary-light: #818cf8;
    --cb-secondary: #64748b;
    --cb-success: #10b981;
    --cb-warning: #f59e0b;
    --cb-danger: #ef4444;
    --cb-info: #06b6d4;

    --cb-accent: #22d3ee;
    --cb-accent-warm: #f59e0b;

    --cb-bg-light: #f1f5f9;
    --cb-bg-dark: #0f172a;
    --cb-surface-dark: #1e293b;
    --cb-text-dark: #1e293b;
    --cb-text-muted: #64748b;
    --cb-text-on-dark: #e2e8f0;
    --cb-text-on-dark-muted: #94a3b8;
    --cb-border: #e2e8f0;

    --cb-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --cb-border-radius: 0.5rem;
    --cb-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --cb-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);

    /* Bootstrap primary override */
    --bs-primary: #6366f1;
    --bs-primary-rgb: 99, 102, 241;
}

/* =====================================================
   BASE
   ===================================================== */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--cb-font-family);
    background-color: var(--cb-bg-light);
    color: var(--cb-text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* =====================================================
   TIPOGRAFIA
   ===================================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
}

.text-gradient {
    background: linear-gradient(135deg, var(--cb-primary) 0%, var(--cb-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =====================================================
   LAYOUT CON SIDEBAR
   ===================================================== */
:root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --sidebar-bg: #2d3748;
    --sidebar-bg-dark: #1a202c;
    --sidebar-text: #a0aec0;
    --sidebar-text-active: #ffffff;
    --sidebar-hover-bg: rgba(255, 255, 255, 0.08);
    --sidebar-active-bg: rgba(79, 70, 229, 0.3);
    --topbar-height: 60px;
}

/* Wrapper principal */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-dark) 100%);
    z-index: 1040;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

/* Logo del sidebar */
.sidebar-brand {
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    min-height: var(--topbar-height);
}

.sidebar-brand-icon {
    font-size: 1.75rem;
    color: var(--cb-primary);
    flex-shrink: 0;
}

.sidebar-brand-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--sidebar-text-active);
    white-space: nowrap;
    overflow: hidden;
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .sidebar-brand-text {
    opacity: 0;
    width: 0;
}

/* Menu del sidebar */
.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem 0;
}

.sidebar-menu::-webkit-scrollbar {
    width: 4px;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.sidebar-section {
    margin-bottom: 1.5rem;
}

.sidebar-section-title {
    padding: 0.5rem 1.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.4);
    white-space: nowrap;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-section-title {
    text-align: center;
    padding: 0.5rem;
}

.sidebar.collapsed .sidebar-section-title span {
    display: none;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav-item {
    margin: 0.125rem 0.75rem;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.75rem;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: var(--cb-border-radius);
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-nav-link:hover {
    background-color: var(--sidebar-hover-bg);
    color: var(--sidebar-text-active);
}

.sidebar-nav-link.active {
    background-color: var(--sidebar-active-bg);
    color: var(--sidebar-text-active);
}

.sidebar-nav-link i {
    font-size: 1.25rem;
    width: 1.5rem;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-nav-link span {
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .sidebar-nav-link span {
    opacity: 0;
    width: 0;
}

.sidebar.collapsed .sidebar-nav-item {
    margin: 0.125rem 0.5rem;
}

.sidebar.collapsed .sidebar-nav-link {
    justify-content: center;
    padding: 0.75rem;
}

/* Footer del sidebar */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: var(--cb-border-radius);
    transition: background-color 0.2s ease;
}

.sidebar-user:hover {
    background-color: var(--sidebar-hover-bg);
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--cb-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    flex-shrink: 0;
}

.sidebar-user-info {
    overflow: hidden;
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .sidebar-user-info {
    opacity: 0;
    width: 0;
}

.sidebar-user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--sidebar-text-active);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 0.75rem;
    color: var(--sidebar-text);
}

/* Contenido principal */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
    background-color: var(--cb-bg-light);
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* Topbar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    height: var(--topbar-height);
    background-color: white;
    border-bottom: 1px solid var(--cb-border);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 1rem;
}

.topbar-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--cb-text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--cb-border-radius);
    transition: all 0.2s ease;
}

.topbar-toggle:hover {
    background-color: var(--cb-bg-light);
    color: var(--cb-text-dark);
}

.topbar-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--cb-text-dark);
    margin: 0;
}

.topbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Page content */
.page-content {
    flex: 1;
    padding: 1.5rem;
}

/* Overlay para mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1035;
}

/* Responsive */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

    .sidebar.collapsed {
        width: var(--sidebar-width);
    }

    .main-content {
        margin-left: 0 !important;
    }

    .sidebar-overlay.show {
        display: block;
    }
}

/* =====================================================
   NAVBAR PUBLICO
   ===================================================== */
.navbar {
    box-shadow: var(--cb-shadow);
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Navbar transparente oscuro para paginas publicas */
.navbar-public {
    background: rgba(15, 23, 42, 0.92) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.navbar-public.navbar-scrolled {
    background: rgba(15, 23, 42, 0.98) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.navbar-dark .navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    border-radius: var(--cb-border-radius);
    transition: background-color 0.2s ease;
}

.navbar-dark .navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar-dark .navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
}

/* Boton accent para navbar */
.btn-accent {
    background: linear-gradient(135deg, var(--cb-primary) 0%, var(--cb-primary-light) 100%);
    color: white;
    border: none;
    font-weight: 600;
}

.btn-accent:hover {
    background: linear-gradient(135deg, var(--cb-primary-dark) 0%, var(--cb-primary) 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* =====================================================
   SECCIONES OSCURAS (PUBLICAS)
   ===================================================== */
.section-dark {
    background-color: var(--cb-bg-dark);
    color: var(--cb-text-on-dark);
}

.section-dark .text-muted {
    color: var(--cb-text-on-dark-muted) !important;
}

.section-dark h2,
.section-dark h3,
.section-dark h4,
.section-dark h5 {
    color: #fff;
}

.section-dark .card {
    background-color: var(--cb-surface-dark);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.section-dark .card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 4px 24px rgba(99, 102, 241, 0.1);
}

/* =====================================================
   CARDS
   ===================================================== */
.card {
    border: none;
    border-radius: var(--cb-border-radius);
    box-shadow: var(--cb-shadow);
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
    box-shadow: var(--cb-shadow-lg);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--cb-border);
    font-weight: 600;
}

/* =====================================================
   BOTONES
   ===================================================== */
.btn {
    font-weight: 500;
    border-radius: var(--cb-border-radius);
    padding: 0.5rem 1.25rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--cb-primary);
    border-color: var(--cb-primary);
}

.btn-primary:hover {
    background-color: var(--cb-primary-dark);
    border-color: var(--cb-primary-dark);
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--cb-primary);
    border-color: var(--cb-primary);
}

.btn-outline-primary:hover {
    background-color: var(--cb-primary);
    border-color: var(--cb-primary);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

/* =====================================================
   FORMULARIOS
   ===================================================== */
.form-control, .form-select {
    border-radius: var(--cb-border-radius);
    border-color: var(--cb-border);
    padding: 0.625rem 0.875rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--cb-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.375rem;
}

.form-text {
    color: var(--cb-text-muted);
}

.input-group-text {
    background-color: var(--cb-bg-light);
    border-color: var(--cb-border);
}

/* =====================================================
   ALERTAS
   ===================================================== */
.alert {
    border: none;
    border-radius: var(--cb-border-radius);
}

/* =====================================================
   DROPZONE (Subida de archivos)
   ===================================================== */
.dropzone {
    border: 2px dashed var(--cb-border);
    border-radius: var(--cb-border-radius);
    background-color: var(--cb-bg-light);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dropzone:hover, .dropzone.dragover {
    border-color: var(--cb-primary);
    background-color: rgba(99, 102, 241, 0.05);
}

.dropzone.dragover {
    transform: scale(1.02);
}

.dropzone-icon {
    font-size: 3rem;
    color: var(--cb-text-muted);
    margin-bottom: 1rem;
}

.dropzone:hover .dropzone-icon {
    color: var(--cb-primary);
}

/* Dropzone area (pagina de certificacion) */
.dropzone-area {
    border: 2px dashed var(--cb-border);
    border-radius: var(--cb-border-radius);
    background-color: var(--cb-bg-light);
    cursor: pointer;
    transition: all 0.2s ease;
}

.dropzone-area:hover,
.dropzone-area.dragover {
    border-color: var(--cb-primary);
    background-color: rgba(99, 102, 241, 0.05);
}

.dropzone-area.dragover {
    transform: scale(1.01);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.dropzone-area.dropzone-sm {
    padding: 1.5rem;
}

.dropzone-area.dropzone-sm i {
    font-size: 2rem;
}

/* =====================================================
   PROGRESO
   ===================================================== */
.progress {
    height: 0.5rem;
    border-radius: 1rem;
    background-color: var(--cb-border);
}

.progress-bar {
    background-color: var(--cb-primary);
    border-radius: 1rem;
    transition: width 0.3s ease;
}

/* =====================================================
   HASH DISPLAY
   ===================================================== */
.hash-display {
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 0.875rem;
    word-break: break-all;
    background-color: var(--cb-bg-light);
    padding: 0.75rem 1rem;
    border-radius: var(--cb-border-radius);
    border: 1px solid var(--cb-border);
}

.hash-display.hash-sha256 {
    color: var(--cb-info);
}

.hash-display.hash-sha512 {
    color: var(--cb-secondary);
}

/* =====================================================
   BLOCKCHAIN INFO
   ===================================================== */
.blockchain-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #8247e5 0%, #a020f0 100%);
    color: white;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.tx-hash {
    font-family: monospace;
    font-size: 0.875rem;
    color: var(--cb-primary);
}

.tx-hash a {
    color: inherit;
    text-decoration: none;
}

.tx-hash a:hover {
    text-decoration: underline;
}

/* =====================================================
   ESTADO DE CERTIFICACION
   ===================================================== */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-pendiente {
    background-color: #fef3c7;
    color: #92400e;
}

.status-procesando {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-confirmado {
    background-color: #d1fae5;
    color: #065f46;
}

.status-error {
    background-color: #fee2e2;
    color: #991b1b;
}

/* =====================================================
   HERO SECTION
   ===================================================== */
.hero {
    background: linear-gradient(160deg, #0f172a 0%, #1e293b 40%, #0f172a 100%);
    color: white;
    padding: 6rem 0 5rem;
    position: relative;
    overflow: hidden;
}

/* Patron decorativo de puntos */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(99, 102, 241, 0.07) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

/* Orbe decorativo */
.hero::after {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 65%);
    pointer-events: none;
}

/* Hero con imagen de fondo a ancho completo */
.hero.hero-fullbg {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.hero.hero-fullbg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    pointer-events: none;
}

.hero.hero-fullbg::after {
    display: none;
}

.hero h1 {
    font-size: 3.25rem;
    font-weight: 800;
    line-height: 1.15;
    position: relative;
    z-index: 1;
}

.hero .lead {
    font-size: 1.2rem;
    opacity: 0.85;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(34, 211, 238, 0.3);
    background: rgba(34, 211, 238, 0.08);
    color: var(--cb-accent);
    margin-bottom: 1.25rem;
}

.hero-image {
    position: relative;
    z-index: 1;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
}

/* Placeholder visual cuando no hay imagen */
.hero-visual-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, var(--cb-surface-dark) 0%, rgba(99, 102, 241, 0.15) 100%);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.hero-visual-placeholder i {
    font-size: 8rem;
    color: rgba(99, 102, 241, 0.3);
}

/* =====================================================
   TRUST BAR
   ===================================================== */
.trust-bar {
    border-bottom: 1px solid var(--cb-border);
}

.trust-bar-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0;
}

.trust-bar-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.trust-bar-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--cb-text-dark);
}

/* =====================================================
   USE CASE CARDS
   ===================================================== */
.use-case-card {
    border-top: 3px solid var(--cb-primary);
    transition: all 0.3s ease;
}

.use-case-card:hover {
    transform: translateY(-4px);
}

.use-case-card .card-body {
    padding: 1.75rem;
}

.use-case-icon {
    width: 56px;
    height: 56px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}

.use-case-card .use-case-examples {
    font-size: 0.8rem;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* =====================================================
   STEPPER (COMO FUNCIONA)
   ===================================================== */
.stepper {
    display: flex;
    gap: 0;
    position: relative;
}

.stepper-step {
    flex: 1;
    text-align: center;
    position: relative;
    padding: 0 1rem;
}

/* Linea conectora */
.stepper-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 28px;
    left: calc(50% + 28px);
    width: calc(100% - 56px);
    height: 2px;
    border-top: 2px dashed var(--cb-border);
}

.stepper-number {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cb-primary) 0%, var(--cb-primary-light) 100%);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.stepper-icon {
    font-size: 1.75rem;
    color: var(--cb-primary);
    margin-bottom: 0.5rem;
}

.stepper-step h5 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.stepper-step p {
    font-size: 0.9rem;
    color: var(--cb-text-muted);
    line-height: 1.6;
}

/* =====================================================
   FEATURES GRID
   ===================================================== */
.feature-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--cb-primary) 0%, var(--cb-info) 100%);
    color: white;
    border-radius: 1rem;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card {
    border-left: 3px solid var(--cb-primary);
    transition: all 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
    border-left-color: var(--cb-accent);
}

.feature-card .card-body {
    padding: 1.5rem;
}

.feature-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* =====================================================
   ABOUT / VALUES
   ===================================================== */
.value-card {
    text-align: center;
    padding: 2rem 1.5rem;
}

.value-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* =====================================================
   CTA SECTION
   ===================================================== */
.section-cta {
    background: linear-gradient(135deg, var(--cb-primary-dark) 0%, var(--cb-primary) 50%, var(--cb-primary-light) 100%);
    position: relative;
    overflow: hidden;
}

.section-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
}

/* =====================================================
   SVG INLINE ILLUSTRATIONS
   ===================================================== */
.flow-diagram {
    max-width: 100%;
}

.flow-diagram .node {
    fill: var(--cb-surface-dark);
    stroke: rgba(99, 102, 241, 0.3);
    stroke-width: 1.5;
    rx: 8;
}

.flow-diagram .arrow {
    stroke: var(--cb-primary);
    stroke-width: 2;
    fill: none;
    stroke-dasharray: 6 4;
}

.flow-diagram text {
    fill: var(--cb-text-on-dark);
    font-family: var(--cb-font-family);
    font-size: 12px;
}

/* =====================================================
   DASHBOARD STATS
   ===================================================== */
.stat-card {
    text-align: center;
    padding: 1.5rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--cb-primary);
}

.stat-label {
    color: var(--cb-text-muted);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* =====================================================
   TABLA DE CERTIFICADOS
   ===================================================== */
.table {
    --bs-table-hover-bg: rgba(99, 102, 241, 0.05);
}

.table th {
    font-weight: 600;
    color: var(--cb-text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom-width: 2px;
}

/* =====================================================
   VERIFICADOR
   ===================================================== */
.verify-result {
    padding: 2rem;
    border-radius: var(--cb-border-radius);
    text-align: center;
}

.verify-result.verified {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.verify-result.not-found {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}

.verify-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.verify-result.verified .verify-icon {
    color: var(--cb-success);
}

.verify-result.not-found .verify-icon {
    color: var(--cb-danger);
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
    background-color: var(--cb-bg-dark);
    color: var(--cb-text-on-dark);
}

.footer .text-muted {
    color: var(--cb-text-on-dark-muted) !important;
}

.footer a.text-muted:hover {
    color: #fff !important;
}

.footer a:hover {
    color: white !important;
}

.footer h5,
.footer h6 {
    color: #fff;
}

.footer hr {
    border-color: rgba(255, 255, 255, 0.1);
}

.footer small.text-muted {
    color: var(--cb-text-on-dark-muted) !important;
}

/* =====================================================
   UTILIDADES
   ===================================================== */
.cursor-pointer {
    cursor: pointer;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-accent {
    color: var(--cb-accent);
}

.bg-accent-soft {
    background-color: rgba(34, 211, 238, 0.1);
    color: var(--cb-accent);
}

.bg-primary-soft {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--cb-primary);
}

.bg-success-soft {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--cb-success);
}

.bg-warning-soft {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--cb-accent-warm);
}

.bg-danger-soft {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--cb-danger);
}

/* =====================================================
   ANIMACIONES
   ===================================================== */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 991.98px) {
    .hero {
        padding: 4rem 0 3rem;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .stepper {
        flex-direction: column;
        gap: 2rem;
    }

    .stepper-step:not(:last-child)::after {
        top: auto;
        left: 28px;
        bottom: -1.25rem;
        width: 2px;
        height: 1.5rem;
        border-top: none;
        border-left: 2px dashed var(--cb-border);
    }

    .stepper-step {
        text-align: left;
        display: flex;
        gap: 1rem;
        align-items: flex-start;
        padding: 0;
    }

    .stepper-number {
        flex-shrink: 0;
    }

    .stepper-step .stepper-content {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero {
        padding: 3rem 0 2.5rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    .dropzone {
        padding: 2rem 1rem;
    }

    .trust-bar .col {
        border-bottom: 1px solid var(--cb-border);
    }

    .trust-bar .col:last-child {
        border-bottom: none;
    }
}

/* =====================================================
   LOADING OVERLAY
   ===================================================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--cb-border);
    border-top-color: var(--cb-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
