/* =========================================
   DIDAXIAHUB — CSS Principal
   Tipografía: RockoUltraFLF / Montserrat
   ========================================= */

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

:root {
    --dh-primary: #0A2540;
    --dh-accent: #00C896;
    --dh-accent2: #FF6B35;
    --dh-light: #F4F7FB;
    --dh-border: #E2E8F0;
    --dh-text: #1A202C;
    --dh-muted: #64748B;
    --dh-white: #FFFFFF;
    --dh-success: #10B981;
    --dh-warning: #F59E0B;
    --dh-danger: #EF4444;
    --dh-radius: 12px;
    --dh-shadow: 0 4px 20px rgba(10,37,64,0.08);
    --dh-shadow-lg: 0 8px 40px rgba(10,37,64,0.14);
    --dh-font: "RockoUltraFLF", "Rocko FLF", Montserrat, sans-serif;
}

* { box-sizing: border-box; }

body {
    font-family: var(--dh-font);
    color: var(--dh-text);
    background: var(--dh-white);
    line-height: 1.6;
}

h1,h2,h3,h4,h5,h6 {
    font-family: var(--dh-font);
    font-weight: 700;
}

/* ── NAVBAR ── */
.dh-navbar {
    background: var(--dh-primary);
    padding: 14px 0;
    box-shadow: 0 2px 20px rgba(10,37,64,0.15);
}
.dh-brand {
    font-family: var(--dh-font);
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff !important;
    text-decoration: none;
}
.dh-brand .brand-icon { color: var(--dh-accent); }
.dh-brand .brand-accent { color: var(--dh-accent); }
.dh-brand-sm { font-family: var(--dh-font); font-size: 1.1rem; font-weight: 700; color: var(--dh-primary); }
.dh-navbar .nav-link { color: rgba(255,255,255,0.8) !important; font-weight: 500; transition: color 0.2s; }
.dh-navbar .nav-link:hover { color: var(--dh-accent) !important; }

/* ── AVATAR ── */
.dh-avatar {
    width: 32px; height: 32px;
    background: var(--dh-accent);
    color: var(--dh-primary);
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.8rem;
}

/* ── BUTTONS ── */
.dh-btn-primary {
    background: var(--dh-accent);
    color: #fff !important;
    border: 2px solid var(--dh-accent);
    border-radius: 8px;
    font-weight: 600;
    padding: 8px 18px;
    transition: all 0.2s;
    text-decoration: none;
    font-family: var(--dh-font);
}
.dh-btn-primary:hover { background: #00b085; border-color: #00b085; transform: translateY(-1px); }

.dh-btn-outline {
    background: transparent;
    color: rgba(255,255,255,0.9) !important;
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 8px;
    font-weight: 600;
    padding: 8px 18px;
    transition: all 0.2s;
    text-decoration: none;
}
.dh-btn-outline:hover { border-color: #fff; color: #fff !important; }

.btn-dh-primary {
    background: var(--dh-accent);
    color: #fff !important;
    border: none;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s;
    font-family: var(--dh-font);
}
.btn-dh-primary:hover { background: #00b085; color: #fff !important; transform: translateY(-1px); }

.btn-dh-dark {
    background: var(--dh-primary);
    color: #fff !important;
    border: none;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s;
    font-family: var(--dh-font);
}
.btn-dh-dark:hover { background: #0d3060; color: #fff !important; }

/* ── ALERTS ── */
.dh-alert-success { background: #D1FAE5; border: 1px solid #6EE7B7; color: #065F46; border-radius: var(--dh-radius); }
.dh-alert-danger  { background: #FEE2E2; border: 1px solid #FCA5A5; color: #991B1B; border-radius: var(--dh-radius); }

/* ── CARDS ── */
.dh-card {
    background: var(--dh-white);
    border: 1px solid var(--dh-border);
    border-radius: var(--dh-radius);
    box-shadow: var(--dh-shadow);
    transition: box-shadow 0.2s, transform 0.2s;
}
.dh-card:hover { box-shadow: var(--dh-shadow-lg); transform: translateY(-2px); }
.dh-card-header {
    background: var(--dh-light);
    border-bottom: 1px solid var(--dh-border);
    border-radius: var(--dh-radius) var(--dh-radius) 0 0;
    padding: 16px 20px;
}

/* ── STAT CARDS ── */
.dh-stat-card { background: var(--dh-white); border: 1px solid var(--dh-border); border-radius: var(--dh-radius); padding: 24px; position: relative; overflow: hidden; }
.dh-stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--dh-accent); }
.dh-stat-card.orange::before { background: var(--dh-accent2); }
.dh-stat-card.blue::before   { background: #3B82F6; }
.dh-stat-card.purple::before { background: #8B5CF6; }
.dh-stat-number { font-family: var(--dh-font); font-size: 2.2rem; font-weight: 800; color: var(--dh-primary); line-height: 1; }
.dh-stat-label  { color: var(--dh-muted); font-size: 0.85rem; font-weight: 500; margin-top: 4px; }
.dh-stat-icon   { font-size: 2rem; opacity: 0.15; position: absolute; right: 20px; top: 20px; }

/* ── BADGES ── */
.dh-badge         { border-radius: 20px; font-size: 0.75rem; font-weight: 600; padding: 4px 10px; }
.dh-badge-success { background: #D1FAE5; color: #065F46; }
.dh-badge-warning { background: #FEF3C7; color: #92400E; }
.dh-badge-danger  { background: #FEE2E2; color: #991B1B; }
.dh-badge-info    { background: #DBEAFE; color: #1E40AF; }
.dh-badge-muted   { background: #F1F5F9; color: #475569; }
.dh-badge-primary { background: var(--dh-primary); color: #fff; }

/* ── NIVEL MADUREZ ── */
.nivel-basico      { background: #F1F5F9; color: #475569; }
.nivel-intermedio  { background: #DBEAFE; color: #1E40AF; }
.nivel-avanzado    { background: #D1FAE5; color: #065F46; }
.nivel-corporativo { background: #EDE9FE; color: #5B21B6; }

/* ── URGENCIA ── */
.urgencia-alta  { background: #FEE2E2; color: #991B1B; }
.urgencia-media { background: #FEF3C7; color: #92400E; }
.urgencia-baja  { background: #D1FAE5; color: #065F46; }

/* ── TABLES ── */
.dh-table { border-collapse: collapse; width: 100%; }
.dh-table th {
    background: var(--dh-light);
    color: var(--dh-muted);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    border-bottom: 2px solid var(--dh-border);
    font-family: var(--dh-font);
}
.dh-table td { padding: 14px 16px; border-bottom: 1px solid var(--dh-border); vertical-align: middle; }
.dh-table tbody tr:hover { background: var(--dh-light); }
.dh-table-wrap { border: 1px solid var(--dh-border); border-radius: var(--dh-radius); overflow: hidden; }

/* ── FORMS ── */
.dh-input {
    border: 1.5px solid var(--dh-border);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    font-family: var(--dh-font);
}
.dh-input:focus { border-color: var(--dh-accent); box-shadow: 0 0 0 3px rgba(0,200,150,0.15); outline: none; }
.dh-label { font-weight: 600; font-size: 0.875rem; color: var(--dh-primary); margin-bottom: 6px; display: block; font-family: var(--dh-font); }

/* ── HERO ── */
.dh-hero {
    background: linear-gradient(135deg, var(--dh-primary) 0%, #0d3060 60%, #1a4a8a 100%);
    min-height: 600px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.dh-hero::before {
    content: '';
    position: absolute; top: -50%; right: -10%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(0,200,150,0.12) 0%, transparent 70%);
    border-radius: 50%;
}
.dh-hero::after {
    content: '';
    position: absolute; bottom: -30%; left: -10%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(255,107,53,0.08) 0%, transparent 70%);
    border-radius: 50%;
}
.dh-hero-content { position: relative; z-index: 2; }
.dh-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    font-family: var(--dh-font);
}
.dh-hero h1 .accent { color: var(--dh-accent); }
.dh-hero p { color: rgba(255,255,255,0.75); font-size: 1.1rem; max-width: 520px; }

/* ── RUBRO CARDS ── */
.dh-rubro-card {
    background: var(--dh-white);
    border: 1.5px solid var(--dh-border);
    border-radius: var(--dh-radius);
    padding: 20px;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: var(--dh-text);
}
.dh-rubro-card:hover {
    border-color: var(--dh-accent);
    box-shadow: 0 4px 20px rgba(0,200,150,0.15);
    transform: translateY(-3px);
    color: var(--dh-text);
}
.dh-rubro-icon { font-size: 2rem; display: block; margin-bottom: 8px; }

/* ── PROVEEDOR CARD ── */
.dh-proveedor-card {
    background: #fff;
    border: 1px solid var(--dh-border);
    border-radius: var(--dh-radius);
    padding: 24px;
    transition: all 0.2s;
}
.dh-proveedor-card:hover { box-shadow: var(--dh-shadow-lg); transform: translateY(-2px); }
.dh-empresa-logo {
    width: 52px; height: 52px;
    background: var(--dh-light);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; font-weight: 800; color: var(--dh-primary);
    font-family: var(--dh-font);
}

/* ── FOOTER ── */
.dh-footer {
    background: var(--dh-light);
    border-top: 1px solid var(--dh-border);
    padding: 28px 0;
}

/* ── SECTION TITLES ── */
.dh-section-title    { font-size: 1.8rem; font-weight: 800; color: var(--dh-primary); font-family: var(--dh-font); }
.dh-section-subtitle { color: var(--dh-muted); font-size: 1rem; }

/* ── COMPARADOR ── */
.dh-compare-header { background: var(--dh-primary); color: #fff; padding: 12px 16px; font-weight: 700; border-radius: var(--dh-radius) var(--dh-radius) 0 0; font-family: var(--dh-font); }
.dh-compare-table td, .dh-compare-table th { padding: 10px 14px; }
.dh-compare-table .row-label { font-weight: 600; color: var(--dh-muted); font-size: 0.85rem; background: var(--dh-light); }

/* ── DASHBOARD SIDEBAR ── */
.dh-sidebar-nav  { list-style: none; padding: 0; }
.dh-sidebar-link {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px; border-radius: 8px;
    color: var(--dh-text); text-decoration: none;
    font-weight: 500; transition: all 0.2s; margin-bottom: 4px;
    font-family: var(--dh-font);
}
.dh-sidebar-link:hover,
.dh-sidebar-link.active { background: rgba(0,200,150,0.12); color: var(--dh-accent); }
.dh-sidebar-link.active { font-weight: 600; }

/* ── EMPTY STATE ── */
.dh-empty { text-align: center; padding: 60px 20px; color: var(--dh-muted); }
.dh-empty-icon { font-size: 3rem; display: block; margin-bottom: 16px; opacity: 0.4; }

/* ── UPLOAD ── */
.dh-dropzone {
    border: 2px dashed var(--dh-border);
    border-radius: 10px;
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafbfc;
}
.dh-dropzone:hover, .dh-dropzone.drag-over {
    border-color: var(--dh-accent);
    background: rgba(0,200,150,0.04);
}
.dh-img-previews, .dh-img-existentes { display: flex; flex-wrap: wrap; gap: 10px; }
.dh-img-thumb {
    position: relative; width: 90px; height: 90px;
    border-radius: 8px; overflow: hidden; border: 1.5px solid var(--dh-border);
}
.dh-img-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dh-img-remove {
    position: absolute; top: 3px; right: 3px;
    background: rgba(0,0,0,0.6); color: #fff;
    border: none; border-radius: 50%;
    width: 22px; height: 22px; font-size: 0.75rem;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background 0.2s; padding: 0;
}
.dh-img-remove:hover { background: #EF4444; }
.dh-img-size {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: rgba(0,0,0,0.5); color: #fff;
    font-size: 0.65rem; text-align: center; padding: 2px;
}

/* ── ESTADO BADGES ── */
.estado-pendiente  { background: #FEF3C7; color: #92400E; border-radius: 20px; padding: 3px 10px; font-size: 0.75rem; font-weight: 600; }
.estado-verificado { background: #D1FAE5; color: #065F46; border-radius: 20px; padding: 3px 10px; font-size: 0.75rem; font-weight: 600; }
.estado-rechazado  { background: #FEE2E2; color: #991B1B; border-radius: 20px; padding: 3px 10px; font-size: 0.75rem; font-weight: 600; }
.estado-suspendido { background: #F1F5F9; color: #475569; border-radius: 20px; padding: 3px 10px; font-size: 0.75rem; font-weight: 600; }

/* ── ANIMATIONS ── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.4s ease both; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .dh-hero h1  { font-size: 2rem; }
    .dh-stat-number { font-size: 1.8rem; }
}