:root{
  --lm-header-h-desktop: 78px;
  --lm-header-h-mobile: 68px;

  --lm-sidebar-w-desktop: 286px;
  --lm-sidebar-w-mobile: 250px;

  --lm-header-pad-x-desktop: 22px;
  --lm-header-pad-x-mobile: 14px;

  --lm-content-top-desktop: 32px;
  --lm-content-top-mobile: 18px;

  --lm-content-left-desktop: 28px;
  --lm-content-right-desktop: 34px;

  --lm-content-left-mobile: 16px;
  --lm-content-right-mobile: 16px;
}

/* =========================
   HEADER
========================= */

.lm-header{
  position: sticky;
  top: 0;
  z-index: 1030;
  width: 100%;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #dfe8ff;
  box-shadow: 0 8px 24px rgba(25,60,140,.06);
}

.lm-header__inner{
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 var(--lm-header-pad-x-desktop);
  box-sizing: border-box;
}

.lm-header__shell{
  min-height: var(--lm-header-h-desktop);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.lm-header__left,
.lm-header__right{
  display: flex;
  align-items: center;
}

.lm-header__left{
  gap: 14px;
  min-width: 0;
}

.lm-header__right{
  gap: 12px;
  margin-left: auto;
}

.lm-header__logo{
  display: inline-flex;
  align-items: center;
  min-width: 0;
  text-decoration: none;
}

.lm-header__logo img{
  display: block;
  max-height: 52px;
  width: auto;
  height: auto;
}

.lm-header__burger-wrap{
  display: none;
}

.lm-header__burger{
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid #dbe6ff;
  background: linear-gradient(180deg,#ffffff 0%, #f7faff 100%);
  color: #0b46b7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(25,60,140,.07);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  padding: 0;
}

.lm-header__burger:hover{
  transform: translateY(-1px);
  border-color: #c9d9ff;
  box-shadow: 0 12px 24px rgba(25,60,140,.10);
}

/* =========================
   AUTH PAGES (login / forgot)
========================= */

body.layout-public.layout-auth.has-lm-header .lm-header{
  display: none !important;
}

body.layout-public.layout-auth{
  padding-top: 0 !important;
}

body.layout-public.layout-auth .container{
  position: relative;
  z-index: 2;
}

body.layout-public.layout-auth .form-signin,
body.layout-public.layout-auth .form-forgot{
  margin-top: 50px !important;
}

@media (max-width: 1000px){
  body.layout-public.layout-auth .form-signin,
  body.layout-public.layout-auth .form-forgot{
    margin-top: 30px !important;
  }
}


/* =========================
   AUTH PAGE LOGO
========================= */

body.auth-screen .auth-page-logo-wrap{
  width: 100%;
  text-align: center !important;
  margin: 34px 0 14px 0;
  position: relative;
  z-index: 5;
}

body.auth-screen .auth-page-logo-link{
  display: inline-block !important;
  float: none !important;
  width: auto !important;
  margin: 0 auto !important;
  padding: 0 !important;
  text-align: center !important;
  text-decoration: none !important;
}

body.auth-screen .auth-page-logo-link:hover,
body.auth-screen .auth-page-logo-link:focus{
  text-decoration: none !important;
}

body.auth-screen .auth-page-logo-img{
  display: block !important;
  float: none !important;
  margin: 0 auto !important;
  padding: 0 !important;
  width: auto !important;
  max-width: 380px !important;
  height: auto !important;
  max-height: none !important;
}

body.auth-screen .lm-header{
  display: none !important;
}

@media (max-width: 768px){
  body.auth-screen .auth-page-logo-wrap{
    margin: 24px 0 10px 0;
  }

  body.auth-screen .auth-page-logo-img{
    max-width: 260px !important;
  }
}

/* =========================
   AUTH MAINTENANCE NOTICE
========================= */

.auth-maintenance-notice{
  max-width: 820px;
  margin: 0 auto 18px auto;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.14);
  box-shadow: 0 10px 30px rgba(0,0,0,.10);
  border-radius: 14px;
  color: #ffffff;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.auth-maintenance-notice__icon{
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.18);
  font-size: 17px;
  color: #ffffff;
}

.auth-maintenance-notice__content{
  min-width: 0;
}

.auth-maintenance-notice__title{
  font-size: 16px;
  line-height: 1.3;
  font-weight: 700;
  margin-bottom: 4px;
  color: #ffffff;
}

.auth-maintenance-notice__text{
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255,255,255,.92);
}

@media (max-width: 768px){
  .auth-maintenance-notice{
    margin: 0 15px 16px 15px;
    padding: 12px 14px;
    gap: 12px;
    border-radius: 12px;
  }

  .auth-maintenance-notice__icon{
    width: 34px;
    height: 34px;
    font-size: 15px;
  }

  .auth-maintenance-notice__title{
    font-size: 15px;
  }

  .auth-maintenance-notice__text{
    font-size: 13px;
  }
}

/* =========================
   AUTH PAGES
========================= */

body.layout-public.layout-auth{
  padding-top: 0 !important;
}

body.layout-public.layout-auth .lm-header{
  display: none !important;
}

body.layout-public.layout-auth .container{
  position: relative;
  z-index: 2;
}

body.layout-public.layout-auth .form-signin,
body.layout-public.layout-auth .form-forgot{
  margin-top: 50px !important;
}

@media (max-width: 1000px){
  body.layout-public.layout-auth .form-signin,
  body.layout-public.layout-auth .form-forgot{
    margin-top: 30px !important;
  }
}

/* =========================
   HEADER RIGHT / USER / VALIDITY
========================= */

.header-quick-wrap,
.header-user-wrap{
  position: relative;
}

.header-quick-btn{
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid #dbe6ff;
  background: linear-gradient(180deg,#ffffff 0%, #f7faff 100%);
  color: #0b46b7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(25,60,140,.07);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  text-decoration: none !important;
}

.header-quick-btn:hover,
.header-quick-btn:focus{
  transform: translateY(-1px);
  border-color: #c9d9ff;
  box-shadow: 0 12px 24px rgba(25,60,140,.10);
  color: #0b46b7;
}

.header-quick-btn.is-warning{
  color: #d46b08;
  border-color: #ffd8a8;
  background: linear-gradient(180deg,#fffaf2 0%, #fff 100%);
}

.header-status-dot{
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff8a00;
  box-shadow: 0 0 0 3px #fff;
}

.header-validity-panel{
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 250px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid #dfe8ff;
  background: #fff;
  box-shadow: 0 22px 50px rgba(18,44,96,.14);
  display: none;
  z-index: 30;
}

.header-validity-panel.open{
  display: block;
}

.header-validity-label{
  color: #6b7ea8;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 4px;
}

.header-validity-days{
  color: #0b2f7a;
  font-size: 22px;
  line-height: 1.05;
  font-weight: 900;
}

.header-validity-date{
  color: #6b7ea8;
  font-size: 13px;
  font-weight: 700;
  margin-top: 4px;
  margin-bottom: 12px;
}

.header-validity-panel .btn{
  width: 100%;
  border-radius: 12px;
  font-weight: 900;
}

.header-user-trigger{
  min-height: 46px;
  padding: 5px 8px 5px 5px;
  border-radius: 16px;
  border: 1px solid #dfe8ff;
  background: linear-gradient(180deg,#ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 24px rgba(25,60,140,.07);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.header-user-trigger:hover,
.header-user-trigger:focus{
  transform: translateY(-1px);
  border-color: #c9d9ff;
  box-shadow: 0 14px 28px rgba(25,60,140,.11);
}

.header-user-avatar,
.header-user-dropdown-avatar{
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(180deg,#2f73e7 0%, #0b46b7 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(11,70,183,.24);
  flex: 0 0 auto;
}

.header-user-meta{
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.header-user-label{
  color: #7c8fb7;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.05;
}

.header-user-name{
  color: #0b2f7a;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-user-caret{
  color: #6b7ea8;
  font-size: 16px;
  padding-left: 2px;
}

.header-user-dropdown{
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 290px;
  border-radius: 18px;
  border: 1px solid #dfe8ff;
  background: #fff;
  box-shadow: 0 24px 56px rgba(18,44,96,.16);
  overflow: hidden;
  display: none;
  z-index: 30;
}

.header-user-dropdown.open{
  display: block;
}

.header-user-dropdown-head{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(180deg,#fbfdff 0%, #f5f9ff 100%);
  border-bottom: 1px solid #edf2ff;
}

.header-user-dropdown-meta{
  min-width: 0;
}

.header-user-dropdown-label{
  color: #7c8fb7;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 2px;
}

.header-user-dropdown-name{
  color: #0b2f7a;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.2;
}

.header-user-subinfo{
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e7efff;
}

.header-user-subinfo-k{
  color: #7a8db5;
  font-size: 11px;
  font-weight: 800;
}

.header-user-subinfo-v{
  color: #0b2f7a;
  font-size: 13px;
  font-weight: 900;
  margin-top: 2px;
}

.header-user-links{
  padding: 8px;
}

.header-user-link{
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  color: #23406f;
  font-weight: 800;
  text-decoration: none !important;
  transition: background .12s ease, color .12s ease;
}

.header-user-link:hover{
  background: #f5f8ff;
  color: #0b46b7;
}

.header-user-link i{
  width: 18px;
  text-align: center;
  color: #4d6fb8;
}

.header-user-link.danger{
  color: #a63d3d;
}

.header-user-link.danger i{
  color: #c15252;
}

.header-user-link.danger:hover{
  background: #fff5f5;
  color: #a12222;
}


/* =========================
   APP LAYOUT
========================= */

body.layout-app #sidebar{
  padding-top: var(--lm-header-h-desktop) !important;
  min-width: var(--lm-sidebar-w-desktop) !important;
  width: var(--lm-sidebar-w-desktop) !important;
  top: 0 !important;
}

body.layout-app .sidebar-content{
  padding-top: var(--lm-header-h-desktop) !important;
  top: 0 !important;
}

body.layout-app ul.sidebar-menu{
  margin-top: 0 !important;
}

body.layout-app .nicescroll-rails{
  top: var(--lm-header-h-desktop) !important;
}

/* odstránenie starých top offsetov */
body.layout-app section#main-content,
body.layout-app section#main-content[data-lesson],
body.layout-app .main-container-words,
body.layout-app #main-content.overview-2020,
body.layout-app .courses section#main-content,
body.layout-app.no-package section#main-content{
  margin-top: var(--lm-content-top-desktop) !important;
}

/* hlavný desktop content */
body.layout-app #main-content{
  margin-left: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  padding-left: var(--lm-content-left-desktop) !important;
  padding-right: var(--lm-content-right-desktop) !important;
  box-sizing: border-box !important;
}

/* zatvorený sidebar */
body.layout-app.sidebar-closed #main-content{
  margin-left: 0 !important;
  padding-left: var(--lm-content-left-desktop) !important;
  padding-right: var(--lm-content-right-desktop) !important;
}

/* =========================
   PUBLIC LAYOUT
========================= */

body.layout-public .lm-header__inner--public{
  min-height: var(--lm-header-h-desktop);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: var(--lm-header-pad-x-desktop);
  padding-right: var(--lm-header-pad-x-desktop);
}

/* =========================
   MOBILE
========================= */

@media (max-width: 1000px){
  .lm-header__inner{
    padding: 0 var(--lm-header-pad-x-mobile);
  }

  .lm-header__shell{
    min-height: var(--lm-header-h-mobile);
    gap: 10px;
  }

  .lm-header__logo img{
    max-height: 42px;
  }

  .lm-header__burger-wrap{
    display: inline-flex;
    align-items: center;
  }

  .lm-header__burger{
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }

  .header-quick-btn{
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }

  .header-user-trigger{
    min-height: 40px;
    padding: 3px 6px 3px 3px;
    border-radius: 14px;
    gap: 8px;
  }

  .header-user-avatar{
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  .header-user-caret{
    font-size: 15px;
  }

  .header-user-dropdown{
    width: 270px;
    right: 0;
  }

  .header-validity-panel{
    width: 230px;
    right: 0;
  }

  body.layout-app #sidebar{
    position: fixed !important;
    left: 0 !important;
    top: var(--lm-header-h-mobile) !important;
    height: calc(100vh - var(--lm-header-h-mobile)) !important;
    padding-top: 8px !important;
    min-width: var(--lm-sidebar-w-mobile) !important;
    width: var(--lm-sidebar-w-mobile) !important;
    overflow-y: auto !important;
    z-index: 1025 !important;
    display: none;
  }

  body.layout-app.mobile-nav-open #sidebar{
    display: block !important;
  }

  body.layout-app .sidebar-content{
    top: var(--lm-header-h-mobile) !important;
    height: calc(100vh - var(--lm-header-h-mobile)) !important;
    padding-top: 8px !important;
  }

  body.layout-app .nicescroll-rails{
    top: var(--lm-header-h-mobile) !important;
  }

  body.layout-app section#main-content,
  body.layout-app section#main-content[data-lesson],
  body.layout-app .main-container-words,
  body.layout-app #main-content.overview-2020,
  body.layout-app .courses section#main-content,
  body.layout-app.no-package section#main-content{
    width: 100% !important;
    margin-left: 0 !important;
    margin-top: var(--lm-content-top-mobile) !important;
    padding-left: var(--lm-content-left-mobile) !important;
    padding-right: var(--lm-content-right-mobile) !important;
    box-sizing: border-box !important;
  }

  body.layout-public .lm-header__inner--public{
    padding-left: var(--lm-header-pad-x-mobile);
    padding-right: var(--lm-header-pad-x-mobile);
  }
}

@media (max-width: 480px){
  .lm-header__shell{
    gap: 8px;
  }

  .header-user-meta{
    display: none !important;
  }

  .header-user-trigger{
    padding-right: 4px;
  }
}