/* index2.html experimental LG-style top mega menu. */

#main-page {
  --portal-chrome-surface: #fff;
  --portal-chrome-surface-soft: #faf8f4;
  --portal-chrome-hover: #f6f2ec;
  --portal-chrome-border: rgba(35,28,22,.10);
  --portal-chrome-border-soft: rgba(35,28,22,.07);
  --portal-chrome-text: #1f1a16;
  --portal-chrome-muted: #71675e;
  --portal-chrome-faint: #9b9288;
  --portal-chrome-accent: #A50034;
  --portal-chrome-radius: 14px;
  --portal-chrome-item-radius: 8px;
  --portal-chrome-shadow: 0 8px 32px rgba(0,0,0,.14);
  --portal-chrome-panel-shadow: 0 18px 42px rgba(48,34,20,.14);
}

#main-page:not(.hidden) .header {
  z-index: 2100;
}

#main-page:not(.hidden) .header__content {
  min-width: 0;
  gap: 16px;
}

#main-page:not(.hidden) .header__logo-section {
  flex: 1 1 auto;
  min-width: 0;
}

#main-page:not(.hidden) .header .header__user {
  flex: 0 0 auto;
  gap: 8px;
}

#main-page:not(.hidden) .header .header-toolbox,
#main-page:not(.hidden) .header .notif-bell,
#main-page:not(.hidden) .header .user-menu {
  margin: 0;
}

#main-page:not(.hidden) .header .header-toolbox__btn,
#main-page:not(.hidden) .header .notif-bell__btn,
#main-page:not(.hidden) .header .user-menu__trigger {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: var(--portal-chrome-item-radius);
  background: transparent;
  color: var(--portal-chrome-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  text-align: center;
  transition: background .15s ease, color .15s ease;
}

#main-page:not(.hidden) .header .header-toolbox__btn:hover,
#main-page:not(.hidden) .header .notif-bell__btn:hover,
#main-page:not(.hidden) .header .user-menu__trigger:hover,
#main-page:not(.hidden) .header .user-menu__trigger.active {
  background: var(--portal-chrome-hover);
  color: var(--portal-chrome-accent);
}

#main-page:not(.hidden) .header .header-toolbox__dropdown,
#main-page:not(.hidden) .header .notif-bell__dropdown,
#main-page:not(.hidden) .header .user-menu__dropdown {
  width: 320px;
  min-width: 320px;
  border: 1px solid var(--portal-chrome-border);
  border-radius: var(--portal-chrome-radius);
  background: var(--portal-chrome-surface);
  box-shadow: var(--portal-chrome-shadow);
  overflow: hidden;
}

@media (min-width: 769px) {
  #main-page:not(.hidden) .header .user-menu__dropdown {
    width: var(--portal-user-menu-width, max-content);
    min-width: var(--portal-user-menu-width, max-content);
    max-width: 240px;
  }

  #main-page:not(.hidden) .header .user-menu__profile {
    width: var(--portal-user-menu-width, max-content);
    max-width: 240px;
  }

  #main-page:not(.hidden) .header .user-menu__company,
  #main-page:not(.hidden) .header .user-menu__info-inline {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.35;
  }

  #main-page:not(.hidden) .header .user-menu__item {
    width: auto;
    white-space: nowrap;
  }
}

#main-page:not(.hidden) .header .header-toolbox__header,
#main-page:not(.hidden) .header .notif-bell__header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--portal-chrome-border-soft);
  background: var(--portal-chrome-surface-soft);
  color: var(--portal-chrome-text);
}

#main-page:not(.hidden) .header .header-toolbox__more:hover,
#main-page:not(.hidden) .header .notif-bell__clear:hover,
#main-page:not(.hidden) .header .notif-bell__view-all:hover,
#main-page:not(.hidden) .header .header-toolbox__item:hover,
#main-page:not(.hidden) .header .notif-item:hover,
#main-page:not(.hidden) .header .notif-item.unread:hover {
  background: var(--portal-chrome-hover);
  color: var(--portal-chrome-text);
}

#main-page:not(.hidden) .header .header-toolbox__item-icon {
  background: var(--portal-chrome-hover);
}

#main-page:not(.hidden) .header .header-toolbox__header i,
#main-page:not(.hidden) .header .header-toolbox__section i {
  color: var(--portal-chrome-accent);
}

#main-page:not(.hidden) .header .header-toolbox__section,
#main-page:not(.hidden) .header .header-toolbox__more,
#main-page:not(.hidden) .header .notif-bell__clear,
#main-page:not(.hidden) .header .notif-bell__view-all {
  color: var(--portal-chrome-muted);
}

#main-page:not(.hidden) .header .header-toolbox__item-name,
#main-page:not(.hidden) .header .notif-item__title {
  color: var(--portal-chrome-text);
}

#main-page:not(.hidden) .header .header-toolbox__item-desc,
#main-page:not(.hidden) .header .notif-item__body,
#main-page:not(.hidden) .header .notif-item__time,
#main-page:not(.hidden) .header .notif-bell__empty,
#main-page:not(.hidden) .header .header-toolbox__empty {
  color: var(--portal-chrome-faint);
}

#main-page:not(.hidden) .header .notif-item {
  border-bottom: 1px solid var(--portal-chrome-border-soft);
}

#main-page:not(.hidden) .header .notif-item.unread {
  background: var(--portal-chrome-surface-soft);
}

.portal-mega-tabs {
  flex: 1 1 auto;
  max-width: none;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: 24px;
  padding-left: 18px;
  border-left: 1px solid var(--portal-chrome-border);
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.portal-mega-tabs::-webkit-scrollbar {
  display: none;
}

.portal-mega-tab {
  position: relative;
  min-height: 44px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--portal-chrome-muted);
  font: 800 13px/1 'Pretendard', -apple-system, sans-serif;
  cursor: pointer;
  transition: color .15s ease;
}

.portal-mega-tab__icon {
  color: var(--portal-chrome-faint);
  font-size: 12px;
  transition: color .15s ease;
}

.portal-mega-tab__text {
  min-width: 0;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  transform: translateY(0);
  transition: transform .15s ease;
}

.portal-mega-tab.has-current-app .portal-mega-tab__text {
  transform: translateY(-1px);
}

.portal-mega-tab__label {
  display: block;
  max-width: clamp(74px, 9vw, 124px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0;
}

.portal-mega-tab__current-app {
  display: block;
  max-width: clamp(76px, 8vw, 112px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--portal-chrome-faint);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.portal-mega-tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  height: 2px;
  background: var(--portal-chrome-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .16s ease;
}

.portal-mega-tab:hover,
.portal-mega-tabs.is-open .portal-mega-tab.is-active {
  background: transparent;
  color: var(--portal-chrome-text);
}

.portal-mega-tabs.has-current-service:not(.is-open):not(:hover) .portal-mega-tab.is-current {
  color: var(--portal-chrome-text);
}

.portal-mega-tab:hover .portal-mega-tab__icon,
.portal-mega-tabs.is-open .portal-mega-tab.is-active .portal-mega-tab__icon {
  color: var(--portal-chrome-accent);
}

.portal-mega-tabs.has-current-service:not(.is-open):not(:hover) .portal-mega-tab.is-current .portal-mega-tab__icon {
  color: var(--portal-chrome-accent);
}

.portal-mega-tabs.has-current-service:not(.is-open):not(:hover) .portal-mega-tab.is-current .portal-mega-tab__current-app {
  color: #7d7067;
}

.portal-mega-tab:hover::after,
.portal-mega-tabs.is-open .portal-mega-tab.is-active::after {
  transform: scaleX(1);
}

.portal-mega-tabs.has-current-service:not(.is-open):not(:hover) .portal-mega-tab.is-current::after {
  transform: scaleX(1);
}

.portal-mega-tab:focus-visible {
  outline: 2px solid rgba(165,0,52,.24);
  outline-offset: 4px;
}

.portal-home-link {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.portal-home-link:focus-visible {
  outline: 2px solid rgba(165,0,52,.36);
  outline-offset: 4px;
  border-radius: 6px;
}

.portal-back-btn {
  width: 36px;
  height: 36px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: var(--portal-chrome-item-radius);
  background: transparent;
  color: var(--portal-chrome-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

body.index2-has-service .portal-back-btn {
  display: inline-flex;
}

.portal-back-btn:hover,
.portal-back-btn:focus-visible {
  background: var(--portal-chrome-hover);
  color: var(--portal-chrome-accent);
}

.user-menu__trigger i {
  font-size: 18px;
  line-height: 1;
}

.user-menu__dropdown {
  padding: 0;
}

.user-menu__profile {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--portal-chrome-border-soft);
  background: var(--portal-chrome-surface-soft);
}

.user-menu__avatar {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--portal-chrome-item-radius);
  background: var(--portal-chrome-hover);
  color: var(--portal-chrome-accent);
  font-size: 19px;
}

.user-menu__profile-body {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.user-menu__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--portal-chrome-text);
  font-size: 14px;
  font-weight: 900;
}

.user-menu__company,
.user-menu__info-inline {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--portal-chrome-muted);
  font-size: 12px;
  font-weight: 700;
}

.user-menu__company[hidden] {
  display: none;
}

.user-menu__divider {
  margin: 0;
  background: var(--portal-chrome-border-soft);
}

.user-menu__item {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-radius: 0;
  color: var(--portal-chrome-text);
  font-size: 13px;
  font-weight: 700;
}

.user-menu__item i {
  width: 18px;
  color: var(--portal-chrome-muted);
  font-size: 15px;
  text-align: center;
}

.user-menu__item:hover {
  background: var(--portal-chrome-hover);
  color: var(--portal-chrome-text);
}

.user-menu__item:hover i {
  color: var(--portal-chrome-accent);
}

.portal-mega-panel {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  z-index: 2050;
  min-height: 0;
  max-height: min(72vh, 650px);
  overflow-y: auto;
  display: block;
  padding: 24px clamp(28px, 5vw, 96px) 28px;
  border-bottom: 1px solid var(--portal-chrome-border);
  background: rgba(255,255,255,.98);
  box-shadow: var(--portal-chrome-panel-shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-18px);
  transition: opacity .18s ease, transform .2s ease;
}

.portal-mega-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.portal-mega-backdrop {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2040;
  background: rgba(35,28,22,.22);
}

.portal-mega-backdrop[hidden] {
  display: none;
}

.portal-mega-panel__body {
  min-width: 0;
  width: min(100%, 1680px);
  margin: 0 auto;
}

.portal-mega-apps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  grid-auto-rows: 92px;
  gap: 12px;
}

.portal-mega-card {
  min-width: 0;
  height: 100%;
  min-height: 92px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  border: 1px solid #ede6dc;
  border-radius: 8px;
  background: #fff;
  color: #1f1a16;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.portal-mega-card:hover {
  border-color: #d6cabd;
  background: #fdfbf8;
  transform: translateY(-1px);
}

.portal-mega-card--current {
  border-color: #d8cec3;
  background: #fffdfb;
  box-shadow: inset 3px 0 0 rgba(165,0,52,.34);
}

.portal-mega-card--current:hover {
  border-color: #cfc4b8;
  background: #fdfbf8;
}

.portal-mega-card__icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #f5f1ea;
  color: #A50034;
  font-size: 16px;
  font-weight: 900;
}

.portal-mega-card--current .portal-mega-card__icon {
  background: #f2ede6;
  color: var(--portal-chrome-accent);
}

.portal-mega-card__body {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.portal-mega-card__topline {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.portal-mega-card__name {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 900;
}

.portal-mega-card__current-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border: 1px solid #e1d8ce;
  border-radius: 5px;
  background: #f5f1ea;
  color: #5f574f;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.portal-mega-card__admin-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border: 1px solid #fed7aa;
  border-radius: 5px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.portal-mega-card__desc {
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  color: #7b7066;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.portal-mega-card__desc--with-note {
  display: flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.portal-mega-card__desc-main {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-mega-card__desc-note {
  flex: 0 0 auto;
  color: var(--portal-chrome-faint);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
}

.portal-mega-empty {
  min-height: 160px;
  display: grid;
  place-items: center;
  border: 1px solid #ebe3d7;
  border-radius: 14px;
  background: #fff;
  color: #7b7066;
  font-size: 14px;
  font-weight: 800;
}

@media (max-width: 1240px) {
  .portal-mega-tabs {
    gap: 16px;
  }

  .portal-mega-panel {
    padding-inline: 24px;
  }

  .portal-mega-apps {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media (max-width: 900px) {
  .portal-mega-tabs {
    gap: 14px;
    margin-left: 14px;
    padding-left: 14px;
  }

  .portal-mega-tab {
    min-height: 36px;
    padding: 0 1px;
    font-size: 12px;
  }

  .portal-mega-tab__label {
    max-width: 92px;
  }

  .portal-mega-tab__current-app {
    max-width: 86px;
  }

  .portal-mega-panel {
    left: 10px;
    right: 10px;
    max-height: calc(100vh - 76px);
    padding: 16px;
    border: 1px solid #e3dbcf;
    border-radius: 0 0 16px 16px;
  }

  .portal-mega-apps {
    grid-template-columns: 1fr;
    grid-auto-rows: 88px;
  }
}

@media (max-width: 768px) {
  .portal-mega-tabs,
  .portal-mega-panel,
  .portal-mega-backdrop {
    display: none;
  }
}
.device-notification-prompt-overlay {
  position: fixed;
  inset: 0;
  z-index: 120000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 18, 17, 0.46);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.device-notification-prompt {
  position: relative;
  width: min(560px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  border: 1px solid var(--portal-chrome-border, #ded8d1);
  border-radius: 16px;
  background: var(--portal-chrome-surface, #fff);
  color: var(--portal-chrome-text, #202124);
  box-shadow: var(--portal-chrome-shadow, 0 12px 36px rgba(20, 20, 20, 0.18));
}

.device-notification-prompt__icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: #fff0f4;
  background: color-mix(in srgb, var(--portal-chrome-accent, #a50034) 10%, white);
  color: var(--portal-chrome-accent, #a50034);
  font-size: 20px;
}

.device-notification-prompt__body {
  min-width: 0;
}

.device-notification-prompt__title,
.device-notification-prompt__description {
  display: block;
}

.device-notification-prompt__title {
  margin-bottom: 3px;
  font-size: 14px;
  font-weight: 750;
}

.device-notification-prompt__description {
  color: var(--portal-chrome-muted, #686868);
  font-size: 12px;
  line-height: 1.45;
}

.device-notification-prompt__actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.device-notification-prompt__button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--portal-chrome-border, #ded8d1);
  border-radius: 9px;
  background: transparent;
  color: var(--portal-chrome-text, #202124);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.device-notification-prompt__button.is-primary {
  border-color: var(--portal-chrome-accent, #a50034);
  background: var(--portal-chrome-accent, #a50034);
  color: #fff;
}

.device-notification-prompt__button:disabled {
  cursor: wait;
  opacity: 0.6;
}

@media (max-width: 640px) {
  .device-notification-prompt-overlay {
    padding: 16px;
  }

  .device-notification-prompt {
    width: 100%;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 11px;
  }

  .device-notification-prompt__actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}
