/* The admin menu structure is shared by Classic and Aurora. */
/* The script groups admin links before the first visible paint. */
html.tf-admin-nav-loading body .admin-layout > .sidebar nav { visibility: hidden; }
body :is(.admin-layout, .app-layout) > .sidebar a.tf-nav-with-icon {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}
body :is(.admin-layout, .app-layout) > .sidebar .tf-nav-icon {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body :is(.admin-layout, .app-layout) > .sidebar a.tf-nav-with-icon .badge {
  margin-left: auto;
}
@media (min-width: 701px) {
  body .admin-layout {
    background: linear-gradient(to right, #0d1f3c 0 250px, transparent 250px);
  }
  body .admin-layout > .sidebar {
    height: 100vh;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
  }
}
body .admin-layout > .sidebar nav[data-aurora-grouped="true"] {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}
body .admin-layout > .sidebar .tf-aurora-nav-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 2px 9px;
}
body .admin-layout > .sidebar .tf-aurora-nav-group + .tf-aurora-nav-group {
  padding-top: 10px;
  border-top: 1px solid rgba(206, 222, 247, .20);
}
body .admin-layout > .sidebar .tf-aurora-nav-heading {
  display: block;
  padding: 5px 10px 7px;
  color: #a8bedc;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .11em;
  line-height: 1.3;
  text-transform: uppercase;
}
body .admin-layout > .sidebar .tf-aurora-nav-group[aria-label="Szuperadmin"] {
  border-top-color: rgba(152, 229, 211, .40);
}
body .admin-layout > .sidebar .tf-aurora-nav-group[aria-label="Szuperadmin"] .tf-aurora-nav-heading {
  color: #b2f0df;
}
@media (max-width: 700px) {
  body .admin-layout > .sidebar {
    display: flex !important;
    position: relative;
    min-height: 0;
    height: auto;
    padding: 10px 12px;
  }
  body .admin-layout > .sidebar nav[data-aurora-grouped="true"] {
    flex-direction: row;
    overflow-x: auto;
    max-width: 100%;
    gap: 8px;
  }
  body .admin-layout > .sidebar .tf-aurora-nav-group,
  body .admin-layout > .sidebar .tf-aurora-nav-group + .tf-aurora-nav-group {
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    padding: 0 8px 0 0;
    border-top: 0;
    border-right: 1px solid rgba(206,222,247,.20);
  }
  body .admin-layout > .sidebar .tf-aurora-nav-heading { padding: 0 7px; white-space: nowrap; }
  body .admin-layout > .sidebar nav a { flex: 0 0 auto; white-space: nowrap; }
}

/* A csoportok külön nyithatók, a lakat a nyitott állapotot rögzíti. */
body .admin-layout > .sidebar .tf-aurora-nav-group-header {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
}
body .admin-layout > .sidebar .tf-aurora-nav-heading {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  margin: 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
body .admin-layout > .sidebar .tf-aurora-nav-heading:hover,
body .admin-layout > .sidebar .tf-aurora-nav-lock:hover { color: #eaf3ff; }
body .admin-layout > .sidebar .tf-aurora-nav-heading:focus-visible,
body .admin-layout > .sidebar .tf-aurora-nav-lock:focus-visible {
  outline: 2px solid #83f6d9;
  outline-offset: 1px;
}
body .admin-layout > .sidebar .tf-aurora-nav-lock {
  flex: 0 0 27px;
  display: inline-grid;
  place-items: center;
  width: 27px;
  height: 27px;
  margin: 0 5px 0 0;
  padding: 5px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #8fa9c9;
  cursor: pointer;
}
body .admin-layout > .sidebar .tf-aurora-nav-lock svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body .admin-layout > .sidebar .tf-aurora-nav-group.is-locked .tf-aurora-nav-lock {
  border-color: rgba(131,246,217,.32);
  background: rgba(131,246,217,.14);
  color: #a9f8df;
}
body .admin-layout > .sidebar .tf-aurora-nav-group.is-locked .tf-aurora-nav-heading { cursor: default; }
body .admin-layout > .sidebar .tf-aurora-nav-group.is-collapsed > a { display: none !important; }
body .admin-layout > .sidebar .tf-admin-menu-status:empty { display: none; }
body .admin-layout > .sidebar .tf-admin-menu-status {
  display: block;
  padding: 8px 10px;
  color: #ffd2d9;
  font-size: 11px;
  line-height: 1.4;
}
.tf-user-box-link { display: block; color: inherit; text-decoration: none; }
.tf-user-box-link:hover { text-decoration: none; }
.tf-user-box-link:focus-visible { outline: 2px solid #1764d5; outline-offset: 3px; border-radius: 12px; }
.tf-account-tabs { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 22px; padding: 0 0 12px; border-bottom: 1px solid #dce6f4; }
.tf-account-tabs a { display: inline-flex; align-items: center; min-height: 38px; padding: 7px 13px; border-radius: 9px; color: #456384; font-size: 13px; font-weight: 700; text-decoration: none; }
.tf-account-tabs a:hover { background: #eef5ff; color: #1764d5; text-decoration: none; }
.tf-account-tabs a[aria-current="page"] { background: #e7f1ff; color: #145fca; }
@media (max-width: 700px) {
  body .admin-layout > .sidebar .tf-aurora-nav-group-header { flex: 0 0 auto; }
  body .admin-layout > .sidebar .tf-aurora-nav-heading { white-space: nowrap; }
}

/* The header and page structure are shared; Classic only changes their colors. */
html.tf-theme-classic body :is(.admin-layout, .app-layout) {
  display: grid;
  grid-template-rows: 66px minmax(0, 1fr);
  min-height: 100vh;
  width: 100%;
  max-width: none;
}
html.tf-theme-classic body .admin-layout { grid-template-columns: 250px minmax(0, 1fr); }
html.tf-theme-classic body .app-layout { grid-template-columns: 230px minmax(0, 1fr); }
html.tf-theme-classic body :is(.admin-layout, .app-layout) > .tf-aurora-header {
  grid-column: 1 / -1;
  grid-row: 1;
}
html.tf-theme-classic body :is(.admin-layout, .app-layout) > .sidebar {
  grid-column: 1;
  grid-row: 2;
  position: sticky;
  top: 0;
  align-self: start;
  height: calc(100vh - 66px);
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}
html.tf-theme-classic body :is(.admin-layout, .app-layout) > .sidebar > .brand { display: none; }
html.tf-theme-classic body :is(.admin-layout, .app-layout) > .content {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
}
html.tf-theme-classic body :is(.admin-layout, .app-layout):has(> .tf-aurora-header) .topbar :is(.user-box, .tf-user-box-link) { display: none; }

html.tf-theme-classic .tf-aurora-header {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  padding: 0 26px;
  border-bottom: 1px solid #dce6f2;
  background: #fff;
  box-shadow: 0 3px 18px rgba(24, 57, 100, .05);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}
html.tf-theme-classic .tf-aurora-header-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #18345d;
  font-size: 17px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
}
html.tf-theme-classic .tf-aurora-header-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #1764dc;
  color: #fff;
  font-size: 23px;
  line-height: 1;
}
html.tf-theme-classic .tf-aurora-header-datetime {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-left: auto;
  color: #627996;
  font-size: 12px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
html.tf-theme-classic .tf-aurora-header-clock {
  padding-left: 11px;
  border-left: 1px solid #dce6f2;
  color: #18345d;
  font-weight: 700;
}
html.tf-theme-classic .tf-aurora-header > .tf-notification-button {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  margin: 0;
  border-color: #d3dfef;
  background: #f7faff;
  color: #315778;
}
html.tf-theme-classic .tf-aurora-header > .tf-notification-button:hover { background: #eaf2ff; }
html.tf-theme-classic .tf-aurora-header-right {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 5px 11px 5px 6px;
  border: 1px solid #dce6f2;
  border-radius: 28px;
  background: #f5f8fd;
  color: #18345d;
  text-decoration: none;
}
html.tf-theme-classic .tf-aurora-header-right:hover { background: #eaf2ff; text-decoration: none; }
html.tf-theme-classic .tf-aurora-header-avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border-radius: 50%;
  background: #dce9ff;
  color: #1764dc;
  font-size: 11px;
  font-weight: 700;
}
html.tf-theme-classic .tf-aurora-header-identity {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  white-space: nowrap;
}
html.tf-theme-classic .tf-aurora-header-identity strong {
  overflow: hidden;
  color: #18345d;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
}
html.tf-theme-classic .tf-aurora-header-identity small { color: #627996; font-size: 10px; }
html.tf-theme-classic .tf-aurora-header-right:focus-visible { outline: 2px solid #1764dc; outline-offset: 3px; }

@media (max-width: 820px) {
  html.tf-theme-classic body :is(.admin-layout, .app-layout) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 58px auto minmax(0, 1fr);
  }
  html.tf-theme-classic .tf-aurora-header { grid-column: 1; padding: 0 16px; gap: 9px; }
  html.tf-theme-classic .tf-aurora-header-identity { max-width: 105px; }
  html.tf-theme-classic body :is(.admin-layout, .app-layout) > .sidebar {
    display: flex !important;
    grid-column: 1;
    grid-row: 2;
    position: relative;
    height: auto;
    max-height: none;
    min-height: 0;
    overflow-x: auto;
    padding: 8px 12px;
    border-bottom: 1px solid #dce6f2;
  }
  html.tf-theme-classic body :is(.admin-layout, .app-layout) > .sidebar nav { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 5px; }
  html.tf-theme-classic body :is(.admin-layout, .app-layout) > .sidebar nav a { flex: 0 0 auto; white-space: nowrap; }
  html.tf-theme-classic body :is(.admin-layout, .app-layout) > .sidebar .sidebar-bottom { display: none; }
  html.tf-theme-classic body :is(.admin-layout, .app-layout) > .content {
    grid-column: 1;
    grid-row: 3;
    padding: 22px 16px 42px;
  }
}
@media (max-width: 700px) {
  html.tf-theme-classic .tf-aurora-header-date { display: none; }
  html.tf-theme-classic .tf-aurora-header-clock { padding-left: 0; border-left: 0; }
}
