html {
  min-height: 100%;
}

body {
  margin: 0;
  font-size: 14px;
  color: #1f2a37;
}

.mtip-admin-body {
  background: #eef3fb;
}

.mtip-app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 266px minmax(0, 1fr);
}

.mtip-sidebar {
  background: linear-gradient(180deg, #233f87 0%, #1f3470 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: sticky;
  top: 0;
}

.mtip-brand {
  height: 86px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mtip-brand-mark,
.auth-brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.65);
  font-weight: 700;
  letter-spacing: 0;
}

.mtip-brand-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.mtip-brand-subtitle {
  font-size: 0.8rem;
  opacity: 0.75;
}

.mtip-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 18px 12px;
}

.mtip-nav-item {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border-radius: 6px;
}

.mtip-nav-item:hover,
.mtip-nav-item.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.mtip-nav-item i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
}

.mtip-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.mtip-topbar {
  height: 86px;
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  border-bottom: 1px solid #d8e0ef;
  box-shadow: 0 1px 0 rgba(31, 42, 55, 0.03);
}

.mtip-topbar-left,
.mtip-topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.mtip-icon-btn {
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  color: #4b5a72;
  font-size: 1.4rem;
}

.mtip-icon-btn:hover {
  background: #eef3fb;
}

.mtip-page-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1f2a37;
}

.mtip-topbar-right {
  color: #31425e;
  font-size: 0.95rem;
}

.mtip-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2fb344;
}

.mtip-logout {
  color: #31425e;
  text-decoration: none;
  padding: 0;
}

.mtip-content {
  min-height: calc(100vh - 86px);
}

.mtip-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.mtip-summary-tile {
  background: #fff;
  border: 1px solid #d8e0ef;
  border-top: 3px solid #233f87;
  border-radius: 6px;
  padding: 18px 20px;
  box-shadow: 0 10px 28px rgba(31, 52, 112, 0.07);
}

.mtip-summary-value {
  color: #233f87;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.mtip-summary-label {
  margin-top: 8px;
  color: #5f6f89;
  font-weight: 600;
}

.mtip-widget-palette {
  display: grid;
  gap: 8px;
}

.mtip-widget-chip {
  width: 100%;
  border: 1px solid #c9d5e7;
  border-radius: 6px;
  background: #f8fbff;
  color: #1f2a37;
  text-align: left;
  padding: 10px 12px;
  display: grid;
  gap: 2px;
  cursor: grab;
}

.mtip-widget-chip:active {
  cursor: grabbing;
}

.mtip-layout-editor {
  display: grid;
  gap: 8px;
}

.mtip-layout-cell {
  min-height: 78px;
  border: 1px dashed #c8d2e3;
  border-radius: 6px;
  background: #f8fbff;
  padding: 10px;
  text-align: left;
  color: #31425e;
}

.mtip-layout-cell:hover,
.mtip-layout-cell.is-drop-target {
  border-color: #233f87;
  box-shadow: inset 0 0 0 1px #233f87;
}

.mtip-layout-cell.is-assigned {
  border-style: solid;
  background: #eef3fb;
}

.mtip-layout-cell-title {
  font-weight: 700;
  color: #1f2a37;
}

.auth-body {
  min-height: 100vh;
  background: linear-gradient(180deg, #eaf0fb 0%, #f6f8fd 100%);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
}

.auth-brand {
  background: linear-gradient(180deg, #233f87 0%, #1f3470 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 72px;
}

.auth-brand h1 {
  font-size: 3rem;
  margin: 18px 0 12px;
}

.auth-brand p {
  max-width: 460px;
  font-size: 1.1rem;
  line-height: 1.6;
  opacity: 0.92;
}

.auth-panel {
  display: grid;
  align-content: center;
  padding: 72px;
}

.auth-card {
  max-width: 440px;
}

.auth-card h2 {
  font-size: 1.9rem;
  margin-bottom: 10px;
}

.auth-form {
  max-width: 420px;
  margin-top: 22px;
}

.auth-hint {
  max-width: 420px;
  margin-top: 16px;
  color: #6b7280;
  font-size: 0.9rem;
}

.btn-primary {
  background: #233f87;
  border-color: #233f87;
}

.btn-primary:hover {
  background: #1f3470;
  border-color: #1f3470;
}

@media (max-width: 991.98px) {
  .mtip-app {
    grid-template-columns: 1fr;
  }

  .mtip-sidebar {
    position: static;
    min-height: auto;
  }

  .mtip-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mtip-topbar {
    height: auto;
    min-height: 72px;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
  }

  .mtip-topbar-right {
    flex-wrap: wrap;
    gap: 10px;
  }

  .mtip-summary-grid,
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-brand,
  .auth-panel {
    padding: 36px 24px;
  }
}
