/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--mt-bg);
  color: var(--mt-fg);
  font-family: var(--mt-font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--mt-primary);
  text-decoration: none;
  transition: color var(--mt-dur-fast) var(--mt-ease);
}
a:hover {
  color: var(--mt-accent);
}

code {
  font-family: var(--mt-font-mono);
  font-size: 0.92em;
}

button,
input,
select,
textarea {
  font: inherit;
}

/* —— Primitives —— */
.mt-card {
  background: var(--mt-card);
  border: 1px solid var(--mt-border);
  border-radius: var(--mt-radius-lg);
  padding: 1.15rem 1.25rem;
  transition: background var(--mt-dur-fast) var(--mt-ease), border-color var(--mt-dur-fast) var(--mt-ease),
    transform var(--mt-dur-fast) var(--mt-ease), box-shadow var(--mt-dur) var(--mt-ease);
}
.mt-card:hover {
  background: var(--mt-card-hover);
}

.mt-btn-primary,
.mt-btn-secondary,
.mt-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: var(--mt-radius-md);
  padding: 0.65rem 1.1rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform var(--mt-dur-fast) var(--mt-ease), box-shadow var(--mt-dur-fast) var(--mt-ease),
    background var(--mt-dur-fast) var(--mt-ease), border-color var(--mt-dur-fast) var(--mt-ease),
    opacity var(--mt-dur-fast) var(--mt-ease);
}
.mt-btn-primary:active,
.mt-btn-secondary:active,
.mt-btn-ghost:active {
  transform: scale(0.98);
}
.mt-btn-primary:disabled,
.mt-btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mt-btn-primary {
  background: linear-gradient(135deg, var(--mt-primary), var(--mt-accent));
  color: var(--mt-primary-fg);
  border: none;
  box-shadow: 0 0 0 0 var(--mt-primary-glow);
}
.mt-btn-primary:hover:not(:disabled) {
  box-shadow: 0 8px 28px var(--mt-primary-glow);
}

.mt-btn-secondary {
  background: transparent;
  color: var(--mt-fg);
  border: 1px solid var(--mt-border);
}
.mt-btn-secondary:hover:not(:disabled) {
  border-color: var(--mt-primary);
  background: rgba(109, 140, 255, 0.08);
}

.mt-btn-ghost {
  background: transparent;
  color: var(--mt-muted-fg);
  border: none;
  padding: 0.45rem 0.65rem;
}
.mt-btn-ghost:hover {
  color: var(--mt-fg);
  background: rgba(255, 255, 255, 0.04);
}

/* Caution (not critical) — deactivate / reversible off-switch */
.mt-btn-danger-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: var(--mt-radius-md);
  padding: 0.65rem 1.1rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  background: color-mix(in srgb, var(--mt-warning) 10%, var(--mt-card));
  color: color-mix(in srgb, var(--mt-warning) 75%, var(--mt-fg));
  border: 1px solid color-mix(in srgb, var(--mt-warning) 35%, var(--mt-border));
  transition: transform var(--mt-dur-fast) var(--mt-ease), background var(--mt-dur-fast) var(--mt-ease),
    border-color var(--mt-dur-fast) var(--mt-ease), color var(--mt-dur-fast) var(--mt-ease);
}
.mt-btn-danger-soft:hover:not(:disabled) {
  background: color-mix(in srgb, var(--mt-warning) 16%, var(--mt-card));
  border-color: color-mix(in srgb, var(--mt-warning) 50%, var(--mt-border));
  color: color-mix(in srgb, var(--mt-warning) 85%, var(--mt-fg));
}
.mt-btn-danger-soft:active {
  transform: scale(0.98);
}
.mt-btn-danger-soft:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mt-input {
  padding: 0.75rem 0.95rem;
  border-radius: var(--mt-radius-md);
  border: 1px solid var(--mt-border);
  background: var(--mt-card);
  color: var(--mt-fg);
  width: 100%;
  transition: border-color var(--mt-dur-fast) var(--mt-ease), box-shadow var(--mt-dur-fast) var(--mt-ease);
}
.mt-input:focus {
  outline: none;
  border-color: var(--mt-primary);
  box-shadow: 0 0 0 3px var(--mt-primary-glow);
}

.mt-muted {
  color: var(--mt-muted-fg);
}
.mt-danger {
  color: var(--mt-danger);
}
.mt-success {
  color: var(--mt-success);
}

.mt-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--mt-muted);
  color: var(--mt-muted-fg);
}
.mt-badge-ok {
  background: rgba(93, 222, 160, 0.15);
  color: var(--mt-success);
}
.mt-badge-warn {
  background: rgba(255, 200, 87, 0.15);
  color: var(--mt-warning);
}
.mt-badge-off {
  background: color-mix(in srgb, var(--mt-muted-fg) 12%, var(--mt-card));
  color: var(--mt-muted-fg);
  border: 1px solid var(--mt-border);
  opacity: 0.9;
}

/* —— App shell —— */
.mt-app {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  min-height: 100dvh;
}
.mt-sidebar {
  border-right: 1px solid var(--mt-border);
  background: linear-gradient(180deg, rgba(14, 21, 40, 0.95), rgba(7, 11, 20, 0.98));
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  z-index: 40;
}
.mt-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.mt-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.mt-sidebar-foot {
  font-size: 12px;
  word-break: break-all;
}
.mt-nav-close,
.mt-nav-toggle,
.mt-nav-backdrop {
  display: none;
}
.mt-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1 1;
  overflow-y: auto;
}
.mt-nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--mt-radius-md);
  color: var(--mt-muted-fg);
  font-weight: 500;
  transition: background var(--mt-dur-fast) var(--mt-ease), color var(--mt-dur-fast) var(--mt-ease);
}
.mt-nav-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--mt-fg);
}
.mt-nav-link.active {
  background: rgba(109, 140, 255, 0.12);
  color: var(--mt-fg);
  box-shadow: inset 0 0 0 1px rgba(109, 140, 255, 0.25);
}
.mt-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
.mt-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--mt-border);
  background: var(--mt-surface);
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 20;
}
.mt-topbar-left,
.mt-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.mt-topbar-left {
  flex: 1 1;
  flex-wrap: wrap;
}
.mt-topbar-right {
  flex-shrink: 0;
}

/* Workspace switcher: room for long names + native chevron not clipped */
.mt-tenant-select {
  width: clamp(180px, 28vw, 440px);
  min-width: 0;
  max-width: min(440px, 55vw);
  padding: 0.65rem 2.5rem 0.65rem 0.95rem;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: var(--mt-card);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239aa8c7' d='M1.4.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 12px 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
}
.mt-tenant-select:focus {
  outline: none;
  border-color: var(--mt-primary);
  box-shadow: 0 0 0 3px var(--mt-primary-glow);
}
.mt-content {
  padding: 1.5rem;
  animation: mt-fade-up var(--mt-dur) var(--mt-ease);
  flex: 1 1;
  min-width: 0;
}
.mt-content-pending {
  opacity: 0.72;
  transition: opacity 80ms linear;
  pointer-events: none;
}

/* Language switcher — slightly rounded, not pill */
.mt-lang {
  display: inline-flex;
  border: 1px solid var(--mt-border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--mt-card);
}
.mt-lang-btn {
  border: none;
  background: transparent;
  color: var(--mt-muted-fg);
  padding: 0.4rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  border-radius: 0;
}
.mt-lang-btn.active {
  background: rgba(109, 140, 255, 0.18);
  color: var(--mt-fg);
}
.mt-lang-btn:hover:not(.active) {
  color: var(--mt-fg);
}

.mt-burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 20px;
  height: 16px;
}
.mt-burger span {
  display: block;
  height: 2px;
  border-radius: 1px;
  background: var(--mt-fg);
}

/* Hub dedicated chat CTA */
.mt-hub-chat-cta {
  margin-top: 1.5rem;
}
.mt-hub-chat-btn {
  width: 100%;
  max-width: 420px;
  padding: 0.9rem 1.25rem;
  font-size: 1.02rem;
}

@keyframes mt-fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes mt-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* Landing */
.mt-landing {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}
.mt-landing-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.mt-landing-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}
.mt-landing-content {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 4rem;
}
.mt-landing-content > header {
  flex-wrap: wrap;
  gap: 0.75rem;
}
.mt-hero-title {
  font-size: clamp(2rem, 6vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0.5rem 0 1rem;
}
.mt-hero-sub {
  font-size: 1.15rem;
  line-height: 1.65;
  max-width: 36rem;
  color: var(--mt-muted-fg);
}
.mt-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}
.mt-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 1rem;
  gap: 1rem;
  margin-top: 3.5rem;
}

/* Chat */
.mt-chat {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 5.5rem);
  max-width: 860px;
  margin: 0 auto;
  min-height: 320px;
}
.mt-chat-messages {
  flex: 1 1;
  overflow: auto;
  padding: 1rem 0.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  -webkit-overflow-scrolling: touch;
}
.mt-bubble {
  max-width: min(92%, 640px);
  padding: 0.85rem 1.05rem;
  border-radius: var(--mt-radius-lg);
  line-height: 1.55;
  animation: mt-fade-up var(--mt-dur) var(--mt-ease);
  white-space: pre-wrap;
  word-break: break-word;
}
.mt-bubble-user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(109, 140, 255, 0.35), rgba(167, 139, 250, 0.25));
  border: 1px solid rgba(109, 140, 255, 0.35);
}
.mt-bubble-assistant {
  align-self: flex-start;
  background: var(--mt-card);
  border: 1px solid var(--mt-border);
}
.mt-chat-composer {
  display: flex;
  gap: 0.65rem;
  padding: 0.85rem;
  border: 1px solid var(--mt-border);
  border-radius: var(--mt-radius-lg);
  background: var(--mt-card);
  margin-bottom: 0.5rem;
  align-items: flex-end;
}
.mt-chat-composer textarea {
  flex: 1 1;
  border: none;
  background: transparent;
  color: var(--mt-fg);
  resize: none;
  min-height: 48px;
  max-height: 140px;
  outline: none;
  width: 100%;
  min-width: 0;
}

.mt-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.mt-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}
.mt-table th,
.mt-table td {
  text-align: left;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--mt-border);
  vertical-align: middle;
}
.mt-table th {
  color: var(--mt-muted-fg);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* —— Responsive —— */
@media (max-width: 900px) {
  .mt-app {
    grid-template-columns: 1fr;
  }
  .mt-nav-toggle {
    display: inline-flex;
    padding: 0.45rem;
    flex-shrink: 0;
  }
  .mt-nav-close {
    display: inline-flex;
  }
  .mt-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(280px, 86vw);
    height: 100dvh;
    border-right: 1px solid var(--mt-border);
    border-bottom: none;
    transform: translateX(-105%);
    transition: transform 0.22s var(--mt-ease);
    box-shadow: none;
  }
  .mt-app.mt-nav-open .mt-sidebar {
    transform: translateX(0);
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.45);
  }
  .mt-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 35;
    border: none;
    padding: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
  }
  .mt-topbar {
    padding: 0.65rem 0.85rem;
    gap: 0.5rem;
  }
  .mt-tenant-select {
    flex: 1 1;
    width: auto;
    max-width: none;
    min-width: 0;
  }
  .mt-topbar-badge,
  .mt-topbar-loading {
    display: none;
  }
  .mt-content {
    padding: 1rem 0.85rem 1.5rem;
  }
  .mt-grid-3 {
    grid-template-columns: 1fr;
    margin-top: 1.5rem;
  }
  .mt-hub-chat-btn {
    max-width: none;
  }
  .mt-chat {
    height: calc(100dvh - 7.5rem);
  }
  .mt-chat-composer {
    flex-wrap: wrap;
  }
  .mt-chat-composer .mt-btn-primary {
    width: 100%;
  }
  .mt-landing-content {
    padding: 1rem 1rem 3rem;
  }
  .mt-landing-content > header {
    margin-bottom: 2.5rem !important;
  }
  .mt-hero-sub {
    font-size: 1rem;
  }
  .mt-card {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .mt-logout-btn {
    font-size: 0.8rem;
    padding: 0.35rem 0.45rem;
  }
  .mt-lang-btn {
    padding: 0.35rem 0.4rem;
    font-size: 0.68rem;
  }
  .mt-input {
    padding: 0.7rem 0.8rem;
  }
}

/* Auth / welcome cards */
.mt-auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}
.mt-auth-card {
  width: min(420px, 100%);
  padding: 1.5rem;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

