.enterprise-console {
  max-width: 1440px;
  margin: auto;
  min-width: 0;
}
.enterprise-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 4px 0 20px;
}
.enterprise-heading h1 {
  margin: 8px 0;
  font-size: 28px;
  letter-spacing: -0.04em;
  color: #173532;
}
.enterprise-environment {
  padding: 8px 14px;
  border: 1px solid #b9d7cc;
  color: #245c4a;
  background: #eef8f2;
  border-radius: 20px;
  font-size: 12px;
  white-space: nowrap;
}
.enterprise-boundary {
  padding: 12px 16px;
  background: linear-gradient(105deg, #eef6f0, #f8f7ee);
  border-left: 3px solid #4d8b71;
  color: #52665d;
  font-size: 12px;
  line-height: 1.7;
  margin-bottom: 20px;
}
.enterprise-console [data-enterprise-error] {
  color: #a33232;
  font-size: 13px;
  white-space: pre-wrap;
  margin: 12px 0;
  overflow-wrap: anywhere;
}
.enterprise-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.enterprise-toolbar input,
.enterprise-toolbar select {
  padding: 9px;
  border: 1px solid #dce4e0;
  border-radius: 6px;
  max-width: 100%;
}
.enterprise-toolbar > span {
  margin-left: auto;
  color: #7c8581;
  font-size: 12px;
}
.enterprise-table-scroll {
  overflow: auto;
}
.enterprise-table-scroll td {
  max-width: 280px;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.6;
}
.enterprise-row-actions {
  min-width: 120px;
}
.enterprise-row-actions button {
  margin: 3px;
  white-space: nowrap;
}
.enterprise-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #68766e;
}
.enterprise-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.enterprise-metrics section {
  display: grid;
  gap: 16px;
}
.enterprise-metrics span {
  font-size: 13px;
  color: #64756c;
}
.enterprise-metrics strong {
  font-size: 35px;
  font-weight: 500;
  color: #1c5744;
  font-variant-numeric: tabular-nums;
}
.enterprise-warning {
  border: 1px solid #e5c488;
  background: #fff8e9;
  padding: 16px;
  margin-bottom: 18px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.7;
}
.enterprise-dialog {
  width: min(790px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  padding: 24px;
  box-sizing: border-box;
  border: 1px solid #d8e2dc;
  border-radius: 14px;
  background: #fff;
  color: #263b33;
  box-shadow: 0 24px 80px #10251a33;
}
.enterprise-dialog::backdrop {
  background: #142a2480;
}
.enterprise-dialog > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.enterprise-dialog h2 {
  font-size: 21px;
  margin: 0;
}
.enterprise-dialog fieldset {
  border: 0;
  padding: 0;
  display: grid;
  gap: 15px;
  min-width: 0;
}
.enterprise-dialog label {
  display: grid;
  gap: 6px;
  font-size: 13px;
}
.enterprise-dialog input,
.enterprise-dialog textarea,
.enterprise-dialog select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 10px;
  border: 1px solid #d2ddd6;
  border-radius: 5px;
  color: inherit;
  background: #fbfdfb;
  font: inherit;
}
.enterprise-dialog textarea {
  resize: vertical;
  line-height: 1.7;
}
.enterprise-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.enterprise-dialog footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 18px;
}
.enterprise-dialog [role="alert"] {
  color: #a33232;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.enterprise-dialog pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 16px;
  background: #f3f6f3;
}
.enterprise-content {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.85;
}
.enterprise-dialog [data-media] {
  display: grid;
  gap: 14px;
}
.enterprise-dialog [data-media] img,
.enterprise-dialog [data-media] video {
  max-width: 100%;
  max-height: 500px;
}
.enterprise-images {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.enterprise-images img {
  width: 100px;
  height: 90px;
  object-fit: cover;
  border-radius: 5px;
}
.enterprise-console button:disabled,
.enterprise-dialog button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
@media (max-width: 900px) {
  .enterprise-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .enterprise-heading h1 {
    font-size: 24px;
  }
  .enterprise-heading {
    flex-wrap: wrap;
  }
  .enterprise-toolbar > span {
    width: 100%;
    margin: 0;
  }
}
@media (max-width: 520px) {
  .enterprise-form-grid {
    grid-template-columns: 1fr;
  }
  .enterprise-dialog {
    padding: 18px;
  }
  .enterprise-table-scroll td {
    min-width: 90px;
  }
  .enterprise-metrics {
    gap: 10px;
  }
}
.enterprise-environment-nav {
  display: grid;
  gap: 6px;
  padding: 0 0 14px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.enterprise-environment-nav a {
  display: block;
  font-size: 12px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-decoration: none;
  color: var(--muted);
}
.enterprise-environment-nav a.active {
  background: #e8f3ed;
  border-color: #b9d7c7;
  color: #245c4a;
}
body.enterprise-current,
body.admin-login {
  min-width: 0;
}
.admin-login {
  overflow: auto;
}
.admin-login .login-card {
  max-width: calc(100vw - 28px);
}
@media (max-width: 1100px) {
  .enterprise-current .topbar {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
    position: static;
    flex: none;
  }
  .enterprise-current .brand {
    min-width: 0;
    flex: 1;
  }
  .enterprise-current .brand small {
    font-size: 10px;
  }
  .enterprise-current .topnav {
    order: 3;
    flex-basis: 100%;
    overflow-x: auto;
    min-width: 0;
  }
  .enterprise-current .topnav a {
    white-space: nowrap;
    font-size: 12px;
    padding: 8px 12px;
  }
  .enterprise-current .userbar {
    gap: 6px;
    font-size: 12px;
  }
  .enterprise-current .userbar > span:first-child {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .enterprise-current .body {
    flex-direction: column;
  }
  .enterprise-current .sidebar {
    position: static;
    width: 100%;
    height: auto;
    flex: 0 0 auto;
    max-height: 155px;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    padding: 10px;
    overflow: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .enterprise-current .sidebar-title,
  .enterprise-current .side-link small {
    display: none;
  }
  .enterprise-current .enterprise-environment-nav {
    display: flex;
    flex-basis: 100%;
    padding: 0 0 6px;
    margin: 0 0 4px;
  }
  .enterprise-current .side-link {
    font-size: 12px;
    padding: 7px 9px;
    margin: 0;
  }
  .enterprise-current .main {
    height: auto;
    flex: 1;
    min-height: 0;
    padding: 16px;
    display: block;
  }
  .enterprise-current .panel {
    padding: 16px;
  }
  .enterprise-current .userbar .tag {
    display: none;
  }
}
