/* KMC V24.13.22 HARD FIX - Sidebar vertical izquierdo */
@media (min-width: 901px){
  html,body,#root{min-height:100%;}
  body{overflow-x:hidden!important;}
  .client-shell,.admin-shell,.photographer-shell,
  .kmc-fixed-left-layout.client-shell,.kmc-fixed-left-layout.admin-shell,.kmc-fixed-left-layout.photographer-shell{
    display:block!important;
    position:relative!important;
    width:100%!important;
    min-height:100vh!important;
    padding:0!important;
    margin:0!important;
  }
  .client-shell>.client-sidebar,.admin-shell>.admin-sidebar,.photographer-shell>.photographer-sidebar,
  .kmc-fixed-left-layout>.kmc-left-sidebar{
    position:fixed!important;
    top:0!important;left:0!important;right:auto!important;bottom:0!important;
    width:282px!important;min-width:282px!important;max-width:282px!important;
    height:100vh!important;min-height:100vh!important;max-height:100vh!important;
    display:flex!important;flex-direction:column!important;flex-wrap:nowrap!important;
    align-items:stretch!important;justify-content:flex-start!important;
    overflow-y:auto!important;overflow-x:hidden!important;
    margin:0!important;padding:20px 15px!important;
    background:linear-gradient(180deg,#fffdfa 0%,#f8eee7 100%)!important;
    border:0!important;border-right:1px solid #eaded7!important;border-bottom:0!important;
    box-shadow:10px 0 34px rgba(82,54,42,.07)!important;
    transform:none!important;z-index:2147483000!important;
  }
  .client-shell.sidebar-collapsed>.client-sidebar,.admin-shell.sidebar-collapsed>.admin-sidebar,.photographer-shell.sidebar-collapsed>.photographer-sidebar{
    width:84px!important;min-width:84px!important;max-width:84px!important;padding-left:10px!important;padding-right:10px!important;
  }
  .client-shell>.client-main,.admin-shell>.admin-main,.photographer-shell>.photographer-main,
  .client-shell>main,.admin-shell>main,.photographer-shell>main{
    display:block!important;position:relative!important;
    width:auto!important;min-width:0!important;max-width:none!important;
    margin-left:282px!important;margin-right:0!important;margin-top:0!important;
    padding:30px clamp(22px,3vw,46px) 56px!important;
  }
  .client-shell.sidebar-collapsed>.client-main,.admin-shell.sidebar-collapsed>.admin-main,.photographer-shell.sidebar-collapsed>.photographer-main,
  .client-shell.sidebar-collapsed>main,.admin-shell.sidebar-collapsed>main,.photographer-shell.sidebar-collapsed>main{margin-left:84px!important;}
  .client-sidebar .ux-nav-section,.admin-sidebar .ux-nav-section,.photographer-sidebar .ux-nav-section,
  .client-sidebar nav,.admin-sidebar nav,.photographer-sidebar nav{
    display:flex!important;flex-direction:column!important;flex-wrap:nowrap!important;
    align-items:stretch!important;width:100%!important;overflow:visible!important;
  }
  .client-sidebar button,.client-sidebar a,.admin-sidebar button,.admin-sidebar a,.photographer-sidebar button,.photographer-sidebar a{
    width:100%!important;max-width:100%!important;flex:0 0 auto!important;
    display:flex!important;align-items:center!important;justify-content:flex-start!important;
    white-space:normal!important;text-align:left!important;
  }
}
@media (max-width:900px){
  .client-shell,.admin-shell,.photographer-shell{display:block!important;width:100%!important;min-height:100vh!important;}
  .client-shell>.client-sidebar,.admin-shell>.admin-sidebar,.photographer-shell>.photographer-sidebar{
    position:fixed!important;top:0!important;left:0!important;right:auto!important;bottom:0!important;
    width:min(86vw,310px)!important;min-width:min(86vw,310px)!important;max-width:min(86vw,310px)!important;
    height:100dvh!important;display:flex!important;flex-direction:column!important;
    overflow-y:auto!important;transform:translateX(-105%)!important;transition:transform .24s ease!important;
    z-index:2147483000!important;background:#fffdfa!important;
  }
  .client-shell.mobile-nav-open>.client-sidebar,.admin-shell.mobile-nav-open>.admin-sidebar,.photographer-shell.mobile-nav-open>.photographer-sidebar{transform:translateX(0)!important;}
  .client-shell>.client-main,.admin-shell>.admin-main,.photographer-shell>.photographer-main,
  .client-shell>main,.admin-shell>main,.photographer-shell>main{margin:0!important;width:100%!important;padding:15px!important;}
}


/* KMC V24.13.23 ROOT CAUSE FIX — especificidad superior */
@media (min-width:901px){
  html body #root .client-shell.kmc-unified-theme.kmc-fixed-left-layout > aside.client-sidebar.ux-sidebar.kmc-left-sidebar{
    position:fixed!important;top:0!important;left:0!important;right:auto!important;bottom:0!important;
    width:282px!important;min-width:282px!important;max-width:282px!important;height:100vh!important;
    display:flex!important;flex-direction:column!important;flex-wrap:nowrap!important;align-items:stretch!important;
    overflow-y:auto!important;overflow-x:hidden!important;transform:none!important;
  }
  html body #root .client-shell.kmc-unified-theme.kmc-fixed-left-layout > main.client-main.kmc-app-main{
    margin-left:282px!important;width:calc(100% - 282px)!important;
  }
  html body #root .client-shell.kmc-unified-theme.kmc-fixed-left-layout.sidebar-collapsed > aside.client-sidebar.ux-sidebar.kmc-left-sidebar{
    width:84px!important;min-width:84px!important;max-width:84px!important;
  }
  html body #root .client-shell.kmc-unified-theme.kmc-fixed-left-layout.sidebar-collapsed > main.client-main.kmc-app-main{
    margin-left:84px!important;width:calc(100% - 84px)!important;
  }
}

/* V24.13.25 visual polish marker */
html body #root>.kmc-fixed-left-layout>aside.kmc-left-sidebar{background:linear-gradient(180deg,#fffdfb 0%,#fbf3ed 58%,#f8eee7 100%)!important;}


/* =========================================================
   KMC EVENTOS V24.13.26 — SIDEBAR COLAPSADO FIX
   Corrige textos cortados, iconos y botón de contraer/expandir.
   ========================================================= */
@media (min-width:901px){
  html body #root .kmc-fixed-left-layout > aside.kmc-left-sidebar{
    transition:width .22s ease,min-width .22s ease,max-width .22s ease,padding .22s ease!important;
  }

  /* Botón de contraer: siempre visible fuera del borde, sin recorte */
  html body #root .kmc-fixed-left-layout > aside.kmc-left-sidebar .client-sidebar-toggle,
  html body #root .kmc-fixed-left-layout > aside.kmc-left-sidebar .admin-sidebar-toggle,
  html body #root .kmc-fixed-left-layout > aside.kmc-left-sidebar .photographer-sidebar-toggle{
    position:fixed!important;
    top:24px!important;
    left:262px!important;
    right:auto!important;
    width:40px!important;
    min-width:40px!important;
    max-width:40px!important;
    height:40px!important;
    min-height:40px!important;
    padding:0!important;
    margin:0!important;
    display:grid!important;
    place-items:center!important;
    border-radius:13px!important;
    border:1px solid #e3d1c5!important;
    background:#fffdfb!important;
    color:#9c674f!important;
    box-shadow:0 8px 22px rgba(76,49,37,.16)!important;
    z-index:2147483600!important;
    overflow:visible!important;
    transform:none!important;
  }
  html body #root .kmc-fixed-left-layout > aside.kmc-left-sidebar .client-sidebar-toggle:hover,
  html body #root .kmc-fixed-left-layout > aside.kmc-left-sidebar .admin-sidebar-toggle:hover,
  html body #root .kmc-fixed-left-layout > aside.kmc-left-sidebar .photographer-sidebar-toggle:hover{
    background:#f8eee7!important;
    color:#7d4f3d!important;
    transform:translateY(-1px)!important;
  }
  html body #root .kmc-fixed-left-layout > aside.kmc-left-sidebar .client-sidebar-toggle svg,
  html body #root .kmc-fixed-left-layout > aside.kmc-left-sidebar .admin-sidebar-toggle svg,
  html body #root .kmc-fixed-left-layout > aside.kmc-left-sidebar .photographer-sidebar-toggle svg{
    width:20px!important;height:20px!important;flex:none!important;
  }
  html body #root .kmc-fixed-left-layout.sidebar-collapsed > aside.kmc-left-sidebar .client-sidebar-toggle,
  html body #root .kmc-fixed-left-layout.sidebar-collapsed > aside.kmc-left-sidebar .admin-sidebar-toggle,
  html body #root .kmc-fixed-left-layout.sidebar-collapsed > aside.kmc-left-sidebar .photographer-sidebar-toggle{
    left:64px!important;
  }

  /* Estado contraído: solo iconos, sin textos partidos */
  html body #root .kmc-fixed-left-layout.sidebar-collapsed > aside.kmc-left-sidebar{
    padding:18px 10px!important;
    overflow-x:visible!important;
  }
  html body #root .kmc-fixed-left-layout.sidebar-collapsed > aside.kmc-left-sidebar .ux-nav-label{
    display:none!important;
  }
  html body #root .kmc-fixed-left-layout.sidebar-collapsed > aside.kmc-left-sidebar .ux-nav-section{
    width:100%!important;
    align-items:center!important;
    gap:7px!important;
    margin:0!important;
  }
  html body #root .kmc-fixed-left-layout.sidebar-collapsed > aside.kmc-left-sidebar .ux-nav-section > button,
  html body #root .kmc-fixed-left-layout.sidebar-collapsed > aside.kmc-left-sidebar > .ux-logout{
    width:54px!important;
    min-width:54px!important;
    max-width:54px!important;
    height:50px!important;
    min-height:50px!important;
    margin:0 auto!important;
    padding:0!important;
    justify-content:center!important;
    gap:0!important;
    overflow:hidden!important;
    white-space:nowrap!important;
    font-size:0!important;
    line-height:0!important;
    border-radius:14px!important;
    text-align:center!important;
  }
  html body #root .kmc-fixed-left-layout.sidebar-collapsed > aside.kmc-left-sidebar .ux-nav-section > button svg,
  html body #root .kmc-fixed-left-layout.sidebar-collapsed > aside.kmc-left-sidebar > .ux-logout svg{
    width:22px!important;
    height:22px!important;
    margin:0!important;
    flex:0 0 22px!important;
  }
  html body #root .kmc-fixed-left-layout.sidebar-collapsed > aside.kmc-left-sidebar button small{
    display:none!important;
  }

  /* Perfil / marca compactos */
  html body #root .client-shell.sidebar-collapsed > aside.kmc-left-sidebar .client-brand-profile{
    width:56px!important;min-width:56px!important;max-width:56px!important;
    margin:8px auto 16px!important;padding:0!important;
    justify-content:center!important;background:transparent!important;border:0!important;box-shadow:none!important;
  }
  html body #root .client-shell.sidebar-collapsed > aside.kmc-left-sidebar .client-brand-profile > div:last-child{display:none!important;}
  html body #root .client-shell.sidebar-collapsed > aside.kmc-left-sidebar .client-brand-profile img,
  html body #root .client-shell.sidebar-collapsed > aside.kmc-left-sidebar .client-brand-initial{
    width:46px!important;height:46px!important;min-width:46px!important;border-radius:50%!important;margin:0!important;
  }

  html body #root .admin-shell.sidebar-collapsed > aside.kmc-left-sidebar .ux-brand{
    width:56px!important;height:56px!important;margin:8px auto 16px!important;padding:0!important;justify-content:center!important;
  }
  html body #root .admin-shell.sidebar-collapsed > aside.kmc-left-sidebar .ux-brand > div:last-child{display:none!important;}
  html body #root .admin-shell.sidebar-collapsed > aside.kmc-left-sidebar .ux-brand-mark{margin:0!important;}

  html body #root .photographer-shell.sidebar-collapsed > aside.kmc-left-sidebar .photographer-brand,
  html body #root .photographer-shell.sidebar-collapsed > aside.kmc-left-sidebar .photographer-user{
    width:56px!important;margin:8px auto!important;padding:8px 0!important;justify-content:center!important;overflow:hidden!important;
  }
  html body #root .photographer-shell.sidebar-collapsed > aside.kmc-left-sidebar .photographer-brand > div,
  html body #root .photographer-shell.sidebar-collapsed > aside.kmc-left-sidebar .photographer-user > div{display:none!important;}
  html body #root .photographer-shell.sidebar-collapsed > aside.kmc-left-sidebar .photographer-brand svg,
  html body #root .photographer-shell.sidebar-collapsed > aside.kmc-left-sidebar .photographer-user svg{margin:0!important;flex:none!important;}

  /* Separación y scroll limpio */
  html body #root .kmc-fixed-left-layout.sidebar-collapsed > aside.kmc-left-sidebar .ux-nav-account{margin-top:auto!important;}
  html body #root .kmc-fixed-left-layout.sidebar-collapsed > aside.kmc-left-sidebar::-webkit-scrollbar{width:0!important;height:0!important;}
}

@media (max-width:900px){
  /* En móvil no existe estado mini: siempre drawer completo */
  html body #root .kmc-fixed-left-layout.sidebar-collapsed > aside.kmc-left-sidebar{
    width:min(86vw,310px)!important;min-width:min(86vw,310px)!important;max-width:min(86vw,310px)!important;
    padding:20px 15px!important;
  }
  html body #root .kmc-fixed-left-layout > aside.kmc-left-sidebar .client-sidebar-toggle,
  html body #root .kmc-fixed-left-layout > aside.kmc-left-sidebar .admin-sidebar-toggle,
  html body #root .kmc-fixed-left-layout > aside.kmc-left-sidebar .photographer-sidebar-toggle{display:none!important;}
}


/* =========================================================
   KMC EVENTOS V24.13.27 — COLLAPSE ICON-ONLY + TOGGLE SAFE
   - Toggle siempre 100% dentro del sidebar.
   - Colapsado real: 76px y SOLO iconos.
   - Sin textos, badges, etiquetas ni soporte en modo mini.
   ========================================================= */
@media (min-width:901px){
  html body #root .kmc-fixed-left-layout > aside.kmc-left-sidebar{
    overflow-y:auto!important;
    overflow-x:hidden!important;
    contain:none!important;
  }

  /* BOTÓN EXPANDIDO: completamente dentro del panel */
  html body #root .kmc-fixed-left-layout:not(.sidebar-collapsed) > aside.kmc-left-sidebar .client-sidebar-toggle,
  html body #root .kmc-fixed-left-layout:not(.sidebar-collapsed) > aside.kmc-left-sidebar .admin-sidebar-toggle,
  html body #root .kmc-fixed-left-layout:not(.sidebar-collapsed) > aside.kmc-left-sidebar .photographer-sidebar-toggle{
    position:fixed!important;
    left:232px!important;
    right:auto!important;
    top:18px!important;
    width:36px!important;
    min-width:36px!important;
    max-width:36px!important;
    height:36px!important;
    min-height:36px!important;
    max-height:36px!important;
    padding:0!important;
    margin:0!important;
    transform:none!important;
    overflow:hidden!important;
    border-radius:11px!important;
    z-index:2147483646!important;
  }

  /* SIDEBAR MINI 76px */
  html body #root .kmc-fixed-left-layout.sidebar-collapsed > aside.kmc-left-sidebar{
    width:76px!important;
    min-width:76px!important;
    max-width:76px!important;
    padding:12px 10px!important;
    overflow-x:hidden!important;
  }
  html body #root .kmc-fixed-left-layout.sidebar-collapsed > main.kmc-app-main,
  html body #root .client-shell.sidebar-collapsed > main.client-main,
  html body #root .admin-shell.sidebar-collapsed > main.admin-main,
  html body #root .photographer-shell.sidebar-collapsed > main.photographer-main{
    margin-left:76px!important;
    width:calc(100% - 76px)!important;
    max-width:calc(100% - 76px)!important;
  }

  /* BOTÓN COLAPSADO: centrado y completamente dentro de 76px */
  html body #root .kmc-fixed-left-layout.sidebar-collapsed > aside.kmc-left-sidebar .client-sidebar-toggle,
  html body #root .kmc-fixed-left-layout.sidebar-collapsed > aside.kmc-left-sidebar .admin-sidebar-toggle,
  html body #root .kmc-fixed-left-layout.sidebar-collapsed > aside.kmc-left-sidebar .photographer-sidebar-toggle{
    position:fixed!important;
    left:20px!important;
    right:auto!important;
    top:14px!important;
    width:36px!important;
    min-width:36px!important;
    max-width:36px!important;
    height:36px!important;
    min-height:36px!important;
    max-height:36px!important;
    padding:0!important;
    margin:0!important;
    transform:none!important;
    overflow:hidden!important;
    border-radius:11px!important;
    z-index:2147483646!important;
  }

  /* Perfil: solo avatar / marca */
  html body #root .client-shell.sidebar-collapsed > aside.kmc-left-sidebar .client-brand-profile{
    width:52px!important;min-width:52px!important;max-width:52px!important;
    height:52px!important;min-height:52px!important;
    margin:48px auto 14px!important;padding:0!important;
    display:grid!important;place-items:center!important;
    background:transparent!important;border:0!important;box-shadow:none!important;
    overflow:hidden!important;
  }
  html body #root .client-shell.sidebar-collapsed > aside.kmc-left-sidebar .client-brand-profile > div:not(.client-brand-initial),
  html body #root .client-shell.sidebar-collapsed > aside.kmc-left-sidebar .client-brand-profile > div:last-child{
    display:none!important;
  }
  html body #root .client-shell.sidebar-collapsed > aside.kmc-left-sidebar .client-brand-profile img,
  html body #root .client-shell.sidebar-collapsed > aside.kmc-left-sidebar .client-brand-initial{
    width:44px!important;height:44px!important;min-width:44px!important;max-width:44px!important;
    margin:0!important;border-radius:50%!important;
  }

  /* Admin / fotógrafo: solo símbolo o avatar */
  html body #root .admin-shell.sidebar-collapsed > aside.kmc-left-sidebar .ux-brand,
  html body #root .photographer-shell.sidebar-collapsed > aside.kmc-left-sidebar .photographer-brand,
  html body #root .photographer-shell.sidebar-collapsed > aside.kmc-left-sidebar .photographer-user{
    width:52px!important;min-width:52px!important;max-width:52px!important;
    margin:48px auto 12px!important;padding:4px!important;
    justify-content:center!important;overflow:hidden!important;
  }
  html body #root .admin-shell.sidebar-collapsed > aside.kmc-left-sidebar .ux-brand > div:last-child,
  html body #root .photographer-shell.sidebar-collapsed > aside.kmc-left-sidebar .photographer-brand > div,
  html body #root .photographer-shell.sidebar-collapsed > aside.kmc-left-sidebar .photographer-user > div{
    display:none!important;
  }

  /* En mini: desaparece TODO texto de navegación */
  html body #root .kmc-fixed-left-layout.sidebar-collapsed > aside.kmc-left-sidebar .ux-nav-label,
  html body #root .kmc-fixed-left-layout.sidebar-collapsed > aside.kmc-left-sidebar .kmc-support-sidebar,
  html body #root .kmc-fixed-left-layout.sidebar-collapsed > aside.kmc-left-sidebar .sidebar-help,
  html body #root .kmc-fixed-left-layout.sidebar-collapsed > aside.kmc-left-sidebar button small{
    display:none!important;
  }

  html body #root .kmc-fixed-left-layout.sidebar-collapsed > aside.kmc-left-sidebar .ux-nav-section{
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    width:56px!important;
    margin:0 auto 8px!important;
    padding:0!important;
    gap:6px!important;
  }

  html body #root .kmc-fixed-left-layout.sidebar-collapsed > aside.kmc-left-sidebar .ux-nav-section > button,
  html body #root .kmc-fixed-left-layout.sidebar-collapsed > aside.kmc-left-sidebar > button.ux-logout{
    width:50px!important;
    min-width:50px!important;
    max-width:50px!important;
    height:48px!important;
    min-height:48px!important;
    max-height:48px!important;
    margin:0 auto!important;
    padding:0!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:0!important;
    overflow:hidden!important;
    white-space:nowrap!important;
    text-indent:-9999px!important;
    font-size:0!important;
    line-height:0!important;
    border-radius:13px!important;
  }
  html body #root .kmc-fixed-left-layout.sidebar-collapsed > aside.kmc-left-sidebar .ux-nav-section > button svg,
  html body #root .kmc-fixed-left-layout.sidebar-collapsed > aside.kmc-left-sidebar > button.ux-logout svg{
    display:block!important;
    width:22px!important;
    height:22px!important;
    min-width:22px!important;
    max-width:22px!important;
    margin:0!important;
    flex:0 0 22px!important;
    text-indent:0!important;
  }

  /* activo en modo mini: sin banda larga, solo pastilla del icono */
  html body #root .kmc-fixed-left-layout.sidebar-collapsed > aside.kmc-left-sidebar .ux-nav-section > button.active{
    box-shadow:inset 0 0 0 1px rgba(180,116,88,.18),0 5px 14px rgba(120,73,54,.10)!important;
    transform:none!important;
  }
}

@media (max-width:900px){
  /* Móvil: no mini-sidebar; drawer completo */
  html body #root .kmc-fixed-left-layout.sidebar-collapsed > aside.kmc-left-sidebar{
    width:min(86vw,310px)!important;
    min-width:min(86vw,310px)!important;
    max-width:min(86vw,310px)!important;
  }
  html body #root .kmc-fixed-left-layout.sidebar-collapsed > main.kmc-app-main{
    margin-left:0!important;width:100%!important;max-width:100%!important;
  }
}
