/* ========================
   LAYOUT BASE
======================== */
/* ========================
   APP STRUCTURE FIX
======================== */
html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: #f8fafc;
}

.kannuh-app {
    display: flex;
    flex-direction: column; 
background:

radial-gradient(circle at 15% 20%, rgba(37,99,235,0.10), transparent 40%),
radial-gradient(circle at 85% 75%, rgba(37,99,235,0.08), transparent 40%),
linear-gradient(180deg,#f8fafc,#f1f5f9);

    min-height: 100vh;
}
/* ========================
   SIDEBAR (Desktop)
======================== */

.kannuh-sidebar {
    width: 260px;
    background: rgba(17,24,39,0.85);
backdrop-filter: blur(14px);
-webkit-backdrop-filter: blur(14px);
border-right: 1px solid rgba(255,255,255,0.05);
    padding: 40px 22px 35px 22px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 1001;
    box-shadow: 6px 0 20px rgba(0,0,0,0.12);
}

/* ===== LOGO ===== */

.kannuh-logo {
    padding-bottom: 25px;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    text-align: center;
}

.kannuh-logo img {
    max-width: 105px;
    height: auto;
}

/* ===== LINKS ===== */

.kannuh-sidebar a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    border-radius: 5px;
    color: #9ca3af;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
     margin-bottom: 6px; /* separación entre items */
}

/* Iconos blancos SIEMPRE */

.kannuh-icon svg {
    width: 20px;
    height: 20px;
    fill: #111827;
    transition: 0.2s ease;
}

.kannuh-sidebar .kannuh-icon svg {
    fill: white !important;
}

.kannuh-bottom-nav .kannuh-icon svg {
    fill: white !important;
}
/* Hover */

.kannuh-sidebar a:hover {
 background: rgba(255,255,255,0.08);

    transform: translateX(1px);

    box-shadow: 0 4px 12px rgba(0,0,0,0.10);

    color: white;

}

/* Activo */

.kannuh-sidebar a.active {
background: linear-gradient(
90deg,
rgba(37,99,235,0.35),
rgba(37,99,235,0.10)
);

color: white;

box-shadow: inset 3px 0 0 #3b82f6;
}


/* ========================
   TOPBAR
======================== */

.kannuh-topbar {
    position: fixed;
    top: 0;
    left: 260px; /* Se ajusta en mobile abajo */
    right: 0;
    height: 70px;
   background: rgba(255,255,255,0.75);
backdrop-filter: blur(14px);
-webkit-backdrop-filter: blur(14px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    border-bottom: 1px solid rgba(255,255,255,0.6);
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(15,23,42,0.05);
}

/* LEFT */

.kannuh-topbar-left {
    display: flex;
    align-items: center;
}

/* RIGHT */

.kannuh-topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Mobile title (hidden desktop) */

.kannuh-mobile-title {
    display: none;
}

/* Avatar */

.kannuh-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
   border: 2px solid rgba(255,255,255,0.8);
box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    transition: 0.2s ease;
}

.kannuh-avatar:hover {

transform: scale(1.05);

}

/* Profile wrapper */

.kannuh-profile {
    position: relative;
}

/* Dropdown */

.kannuh-profile-dropdown {
    position: absolute;
    top: 55px;
    right: 0;
   background: rgba(255,255,255,0.75);
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
    padding: 18px;
    border-radius: 10px;
   box-shadow: 0 20px 45px rgba(0,0,0,0.10);
border: 1px solid rgba(255,255,255,0.6);
    width: 240px;
    display: none;
    animation: fadeIn 0.18s ease;
}

/* Show dropdown on hover */

.kannuh-profile:hover .kannuh-profile-dropdown {
    display: block;
}

.kannuh-profile-dropdown a {
    display: block;
    padding: 8px 0;
    text-decoration: none;
    font-weight: 500;
    color: #111827;
    transition: 0.2s ease;
}

.kannuh-profile-dropdown a:hover {
    color: #2563eb;
}

.kannuh-profile-dropdown a:last-child {
    margin-bottom: 0;
}
.kannuh-subscription {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    font-size: 12px;
    color: #6b7280;
}
/* ========================
   BOTTOM NAV (Mobile)
======================== */

.kannuh-bottom-nav {
    display: none;
}

/* ========================
   ANIMATIONS
======================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================
   RESPONSIVE
======================== */

@media (max-width: 1024px) {
    
html, body {
        overflow: hidden;
    }
    /* Sidebar oculto */
    .kannuh-sidebar {
        display: none;
    }

    /* Topbar ocupa todo y se mantiene FIJA */
    .kannuh-topbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        padding: 0 20px;
        z-index: 1000;
    }

    /* Mostrar título mobile */
    .kannuh-mobile-title {
        display: block;
        font-weight: 600;
        font-size: 18px;
    }

 .kannuh-content {
        position: fixed;
        top: 60px;    /* IGUAL a la altura de la topbar */
        bottom: 70px; /* IGUAL a la altura de la bottom-nav */
        left: 0;
        right: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 15px; /* Menos espacio en móvil */
        margin: 0;
    }
    /* Bottom nav visible y FIJO */
   .kannuh-bottom-nav {

display: flex;
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 70px;

padding: 0 12px;

border-top-left-radius:5px;
border-top-right-radius:5px;

background: rgba(17,24,39,0.9);
backdrop-filter: blur(14px);

justify-content: space-between;
align-items: center;

z-index: 1000;

}
  .kannuh-bottom-nav a {

flex: 1;

color: #9ca3af;
text-decoration: none;

font-size: 12px;

display: flex;
flex-direction: column;
align-items: center;
justify-content: center;

gap: 4px;

height: 100%;

transition: 0.2s ease;

}

.kannuh-bottom-nav a.active {
color: white;
}

.kannuh-bottom-nav a.active .kannuh-icon {

background: rgba(255,255,255,0.12);

border-radius: 8px;

padding: 6px;

}
.kannuh-bottom-nav a:hover {

transform: translateY(-1px);

}
    .kannuh-bottom-nav .kannuh-icon svg {
        width: 22px;
        height: 22px;
        fill: white !important;
    }
}

/* Ocultar icono comercios en desktop */
.kannuh-topbar-store {
    display: none;
    color: #1D2331;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.kannuh-topbar-store:hover {
    background: rgba(255,255,255,0.6);
backdrop-filter: blur(8px);
}


/* En mobile mostrarlo */
@media (max-width: 1024px) {

    .kannuh-topbar-store {
        display: flex;
    }

    .kannuh-mobile-title {
        display: block;
        font-weight: 600;
        font-size: 18px;
        color: #111827;
    }

}

/* Logo mobile topbar */
.kannuh-mobile-logo {
    height: 30px;
    width: auto;
    display: block;
}

/* Ocultar en desktop */
@media (min-width: 1025px) {
    .kannuh-mobile-logo {
        display: none;
    }
}
/* ========================
   DESKTOP LAYOUT FIX
======================== */

@media (min-width: 1025px) {
html, body {
        overflow-y: visible; /* Scroll natural */
        height: auto;
    }
    
    .kannuh-app {
        flex-direction: row; /* Sidebar al lado del contenido */
        overflow: visible;
    }
.kannuh-content {
        flex: 1;
        margin-left: 260px; /* Ancho del sidebar */
        margin-top: 70px;   /* Altura de la topbar */
 padding: 5px 40px 50px 60px;
        box-sizing: border-box;
        min-height: calc(100vh - 70px);
        display: block;
        overflow: visible; /* Clave para el scroll de la compu */
          position: relative;
    z-index: 1;
            height: auto;
    }
    
 .kannuh-dashboard {
        max-width: 100%;
        margin: 0;
    }
}

/* =========================================
   BARRA DE BÚSQUEDA GLOBAL KANNUH
   ========================================= */

.kannuh-actions input[type="text"] {
    background: #ffffff !important;
    color: #0F172A !important;
    border: 1px solid #dbeafe !important;
    border-radius: 10px !important;
    padding: 11px 14px !important;
    font-size: 14px !important;
    outline: none !important;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
    min-width: 220px;
}

.kannuh-actions input[type="text"]:focus {
    background: #e0f2fe !important;
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15) !important;
}

.kannuh-actions input[type="text"]::placeholder {
    color: #94a3b8 !important;
}

/* Dark mode Astra */
.astra-dark-mode-enable .kannuh-actions input[type="text"] {
    background: #FCFCFD !important;
    color: #0F172A !important;
    border: 1px solid #dbeafe !important;
}

.astra-dark-mode-enable .kannuh-actions input[type="text"]:focus {
    background: #e0f2fe !important;
    border-color: #2563eb !important;
    color: #0F172A !important;
}

/* =========================================
   BLOQUEO TOTAL DARK MODE ASTRA - KANNUH
   ========================================= */

/* Todos los inputs dentro de cualquier wrapper kannuh */
.astra-dark-mode-enable .kannuh-trabajos-wrapper input,
.astra-dark-mode-enable .kannuh-trabajos-wrapper select,
.astra-dark-mode-enable .kannuh-trabajos-wrapper textarea,
.astra-dark-mode-enable .kannuh-filtros input,
.astra-dark-mode-enable .kannuh-filtros select,
.astra-dark-mode-enable .kannuh-modal-content input,
.astra-dark-mode-enable .kannuh-modal-content select,
.astra-dark-mode-enable .kannuh-modal-content textarea,
.astra-dark-mode-enable .kannuh-actions input,
.astra-dark-mode-enable [class*="kannuh-"] input,
.astra-dark-mode-enable [class*="kannuh-"] select,
.astra-dark-mode-enable [class*="kannuh-"] textarea {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #0F172A !important;
    border: 1px solid #dbeafe !important;
    -webkit-text-fill-color: #0F172A !important;
    color-scheme: light !important;
}

.astra-dark-mode-enable [class*="kannuh-"] input:focus,
.astra-dark-mode-enable [class*="kannuh-"] select:focus,
.astra-dark-mode-enable [class*="kannuh-"] textarea:focus {
    background: #e0f2fe !important;
    background-color: #e0f2fe !important;
    border-color: #2563eb !important;
    color: #0F172A !important;
    -webkit-text-fill-color: #0F172A !important;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15) !important;
}

/* Autofill forzado */
.astra-dark-mode-enable [class*="kannuh-"] input:-webkit-autofill,
.astra-dark-mode-enable [class*="kannuh-"] input:-webkit-autofill:hover,
.astra-dark-mode-enable [class*="kannuh-"] input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
    -webkit-text-fill-color: #0F172A !important;
    color: #0F172A !important;
}

/* Placeholder */
.astra-dark-mode-enable [class*="kannuh-"] input::placeholder,
.astra-dark-mode-enable [class*="kannuh-"] textarea::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}