/* TravTools · © MUNLabs
   FMunzert Hinweis: Globaler Vollbild-/Abstands-/Form-Fix für alle Seiten.
*/

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  /* FIX: Standard-Body-Rand (8px) entfernen, sonst endet der .tt-main-Hintergrund
     kurz vor dem rechten Fensterrand (heller Streifen ohne Hintergrund). */
  margin: 0 !important;
  padding: 0 !important;
  /* Kugelsicher: gleiche dunkle Grundfarbe wie der Seitenhintergrund, damit
     ein evtl. Rest-Pixel am Rand (Scrollbar-Gutter/Rundung) NICHT hell durchscheint. */
  background-color: var(--tt-bg-1, #060b17) !important;
}

body {
  min-height: 100vh;
}

.tt-main {
  /* FIX: Breite exakt an Sidebar-Breite (--tt-sb-w) koppeln.
     Sidebar: 292px (eingeklappt 78px) — die Breite folgt dem Token automatisch. */
  width: calc(100% - var(--tt-sb-w, 300px)) !important;
  max-width: none !important;
  min-width: 0 !important;
}

.tt-page,
.tt-page > *,
.tt-page > div,
.tt-page > section,
.tt-page > article,
.tt-page > form,
.tt-page > header,
.tt-page > main,
.tt-page > aside {
  width: 100% !important;
  max-width: none !important;
}

.tt-page {
  padding-top: 24px !important;
  padding-bottom: 24px !important;
}

/* Einheitlicher Start links oben */
.tt-page > *:first-child,
.tt-page > div:first-child,
.tt-page > section:first-child,
.tt-page > article:first-child,
.tt-page > form:first-child,
.tt-page > header:first-child,
.tt-page > main:first-child,
.tt-page > aside:first-child {
  margin-top: 0 !important;
}

.tt-page h1,
.tt-page .tt-head h1,
.tt-page .tt-log-head h1,
.tt-page .tt-title,
.tt-page .page-title,
.tt-page .section-title {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin-top: 0 !important;
}

.tt-page h1 > i,
.tt-page .tt-head h1 > i,
.tt-page .tt-log-head h1 > i,
.tt-page .tt-title > i,
.tt-page .page-title > i,
.tt-page .section-title > i {
  flex: 0 0 28px !important;
  width: 28px !important;
  min-width: 28px !important;
  text-align: center !important;
  margin: 0 !important;
}

.tt-sub,
.tt-subtitle,
.tt-log-sub,
.tt-head .tt-sub,
.tt-head .tt-subtitle {
  margin-left: 0 !important;
}

/* Harte Vollbreite für bekannte Wrapper */
.tt-login-wrap,
.tt-auth-wrap,
.tt-reg-wrap,
.tt-log-wrap,
.tt-log-container,
.tt-profile-wrap,
.tt-admin-wrap,
.tt-admin-grid,
.tt-content-wrap,
.tt-kontakt-wrap,
.tt-guest-wrap,
.tt-imp-wrap,
.tt-ds-wrap,
.tt-patch-wrap,
.tt-stat-wrap,
.tt-adm-wrap,
.tt-online-wrap,
.tt-chat-wrap,
.tt-board-wrap,
.tt-shell,
.tt-container,
.tt-wrap,
[class*="page-wrap"],
[class*="content-wrap"],
[class*="-container"],
[class*="-wrap"]:not(:where(.mt-sum-wrap,.tt-badge-wrap,.tt-name-inline,.tt-icon-wrap,.tt-avatar-wrap,.tt-inp-wrap,.tt-select-wrap,.tt-switch-wrap,.tt-toggle-wrap,.tt-chip-wrap,.tt-tag-wrap,.tt-pill-wrap,.tt-tip-wrap,.tt-kbd-wrap)) {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Login/Register/Auth: auf große Breite ziehen statt links kleben */
.tt-login-wrap,
.tt-auth-wrap,
.tt-reg-wrap {
  display: grid !important;
  grid-template-columns: minmax(260px, 1fr) minmax(380px, 1fr) !important;
  gap: clamp(24px, 4vw, 56px) !important;
  align-items: center !important;
  min-height: calc(100vh - 180px) !important;
  margin-top: 0 !important;
}

.tt-big-logo {
  justify-content: center !important;
  align-items: center !important;
  min-height: 100% !important;
}

.tt-login-card,
.tt-auth-card,
.tt-reg-card,
.tt-guest-card,
.tt-form-box {
  width: 100% !important;
  max-width: min(680px, 100%) !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  justify-self: start !important;
}

/* Form-Icons: Text nicht mehr hinter dem Icon */
.input-icon-wrap {
  position: relative !important;
}

.input-icon {
  position: absolute !important;
  left: 16px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 18px !important;
  text-align: center !important;
  pointer-events: none !important;
  z-index: 2 !important;
}

.tt-input.has-icon,
.tt-select.has-icon,
textarea.has-icon,
input.has-icon,
select.has-icon {
  padding-left: 50px !important;
}

/* Mehr nutzbare Breite für Logs, Tabellen, Adminseiten */
.tt-log-card,
.tt-table-card,
.tt-content-card,
.tt-box,
.tt-panel,
.tt-card,
.tt-chat-main,
.tt-chat-sidebar,
.tt-admin-grid,
.tt-form-grid,
.tt-form,
.tt-grid,
.tt-grid-2,
.tt-grid-3 {
  width: 100% !important;
  max-width: none !important;
}

/* Mobile: wirklich Vollbreite, ohne abgeschnittene Inhalte */
@media (max-width: 980px) {
  .tt-main {
    width: 100% !important;
    margin-left: 0 !important;
  }

  .tt-top,
  .tt-page,
  .tt-page-foot {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .tt-login-wrap,
  .tt-auth-wrap,
  .tt-reg-wrap {
    grid-template-columns: 1fr !important;
    min-height: auto !important;
    gap: 20px !important;
  }

  .tt-big-logo img {
    width: min(240px, 70vw) !important;
  }

  .tt-login-card,
  .tt-auth-card,
  .tt-reg-card,
  .tt-guest-card,
  .tt-form-box {
    max-width: 100% !important;
    justify-self: stretch !important;
  }

  .tt-log-head,
  .tt-head,
  .tt-page header,
  .tt-page .tt-topline {
    align-items: flex-start !important;
    gap: 10px !important;
  }
}
