/* GrowSiteX Admin UI Concept V1 - final override layer. */
:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-soft: #f8fbff;
  --text: #14213d;
  --muted: #64748b;
  --line: #d8e1ee;
  --primary: #246bfe;
  --primary-weak: #e8f0ff;
  --teal: #12a8b5;
  --green: #17a673;
  --amber: #d98c16;
  --red: #d94f4f;
  --sidebar: #18243f;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 14px 34px rgba(18, 38, 72, 0.06);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;
}

.admin-shell {
  grid-template-columns: 236px minmax(0, 1fr);
  background: var(--bg);
}

.admin-sidebar {
  padding: 18px 14px;
  background: var(--sidebar);
}

.admin-brand {
  grid-template-columns: 42px 1fr;
  padding: 4px 4px 20px;
  border-bottom: 1px solid rgba(216, 225, 238, 0.16);
}

.admin-brand img {
  border-radius: 9px;
  background: transparent;
  box-shadow: none;
}

.admin-brand strong {
  font-size: 18px;
}

.admin-brand span {
  color: #b9c9e8;
}

.admin-nav {
  gap: 6px;
  margin-top: 14px;
}

.admin-nav button,
.admin-link {
  min-height: 40px;
  border-radius: 8px;
  color: #dbe8ff;
  font-weight: 700;
}

.admin-nav button:hover,
.admin-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.09);
}

.admin-nav button.active {
  color: #ffffff;
  background: var(--primary);
  box-shadow: none;
}

.admin-main {
  background: var(--bg);
}

.admin-topbar {
  min-height: 78px;
  padding: 17px 28px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  box-shadow: none;
  backdrop-filter: none;
}

.admin-title h1 {
  color: var(--text);
  font-size: 23px;
}

.admin-title p {
  color: var(--muted);
  font-size: 13px;
}

.admin-user {
  min-height: 40px;
  padding: 6px 10px 6px 7px;
  border: 1px solid #d6e2f5;
  border-radius: 999px;
  background: #f2f6ff;
  color: #26364f;
}

.admin-user span {
  width: 30px;
  height: 30px;
  background: var(--teal);
}

.admin-logout {
  border: 0;
  background: transparent;
}

.admin-content {
  padding: 22px 28px 30px;
}

.panel,
.kpi-card,
.filter-panel,
.admin-login-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel-head {
  min-height: 54px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2,
.panel-head h3 {
  color: var(--text);
  font-size: 15px;
  font-weight: 750;
}

.panel-body {
  padding: 16px;
}

.filter-grid {
  gap: 10px;
  align-items: end;
  padding: 16px;
}

.field span {
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
}

.input,
.select,
.textarea,
input,
select,
textarea {
  min-height: 38px;
  border: 1px solid #d7e1ef;
  border-radius: 7px;
  color: var(--text);
  background: #ffffff;
}

.input:focus,
.select:focus,
.textarea:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(36, 107, 254, 0.16);
  border-color: #8fb0ff;
}

.btn {
  min-height: 38px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 750;
}

.btn.primary,
.btn.teal {
  background: var(--primary);
  color: #ffffff;
}

.btn.ghost {
  color: var(--text);
  border-color: transparent;
  background: #e8eef7;
}

.btn.warning {
  background: var(--amber);
}

.btn.danger {
  background: var(--red);
}

.table-wrap {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.table-wrap.ai-log-table-wrap,
.table-wrap.auto-failure-table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
}

table {
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  padding: 12px 14px;
  color: #52647c;
  background: #f4f7fb;
  border-bottom: 1px solid var(--line);
  font-weight: 750;
}

tbody td {
  padding: 14px;
  color: #334155;
  border-bottom: 1px solid #edf2f8;
}

tbody tr:hover td {
  background: #fbfdff;
}

.tag,
.status,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
}

.empty {
  min-height: 220px;
  display: grid;
  place-items: center;
  padding: 34px;
  color: var(--muted);
  text-align: center;
}

.empty::before {
  content: "+";
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  place-items: center;
  color: var(--primary);
  background: var(--primary-weak);
  border: 1px solid #c9d8ff;
  border-radius: 10px;
  font-size: 24px;
  font-weight: 800;
}

.modal-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10000 !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  overflow: auto !important;
  padding: 56px 16px 20px !important;
  background: rgba(15, 23, 42, 0.42);
}

.modal {
  position: relative !important;
  z-index: 10001 !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
  max-height: calc(100vh - 76px) !important;
  overflow: hidden !important;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.24);
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.modal-body {
  max-height: calc(100vh - 152px);
  overflow: auto;
}

.editor-modal {
  width: min(1220px, calc(100vw - 32px)) !important;
  height: min(920px, calc(100vh - 76px)) !important;
  max-height: calc(100vh - 76px) !important;
}

.editor-modal .modal-head {
  min-height: 54px;
}

.editor-modal .modal-body {
  display: grid;
  max-height: none;
  overflow: hidden;
  padding: 12px 16px;
}

.editor-modal .modal-actions {
  padding: 12px 16px;
}

.editor-modal .editor-form {
  min-height: 0;
}

.editor-modal .editor-form .input,
.editor-modal .editor-form .select {
  min-height: 32px;
  height: 32px;
  padding: 0 10px;
}

.editor-modal .editor-form .textarea:not(.prompt-editor) {
  min-height: 52px;
  padding: 8px 10px;
  line-height: 1.4;
}

.editor-modal .prompt-editor {
  font-size: 14px;
  line-height: 1.65;
}

/* v20260705-013400-ui-icon-alignment: admin icon and button detail polish. */
.admin-shell button,
.admin-shell .btn,
.admin-shell .admin-link,
.admin-shell .admin-user,
.admin-shell .admin-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-shell button svg,
.admin-shell .btn svg,
.admin-shell .admin-link svg,
.admin-shell .admin-icon svg,
.admin-shell .btn-icon svg,
.admin-shell .kpi-icon svg,
.admin-shell .empty svg {
  display: block;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-shell .admin-icon,
.admin-shell .btn-icon {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 20px;
}

.admin-shell .admin-icon svg,
.admin-shell .admin-link > svg {
  width: 18px;
  height: 18px;
}

.admin-shell .btn svg {
  width: 16px;
  height: 16px;
}

.admin-shell .btn.small svg {
  width: 14px;
  height: 14px;
}

.admin-shell .kpi-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.admin-shell .kpi-icon svg {
  width: 22px;
  height: 22px;
}

.admin-shell .admin-user {
  gap: 10px;
  white-space: nowrap;
}

.admin-shell .admin-user span {
  display: inline-grid;
  place-items: center;
  flex: 0 0 32px;
  line-height: 1;
}

.admin-shell .admin-logout {
  min-height: 32px;
  line-height: 1;
}

.admin-shell .empty svg {
  width: 28px;
  height: 28px;
}

@media (max-width: 980px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: relative;
    height: auto;
  }

  .filter-grid,
  .filter-grid.prompt-filter-grid {
    grid-template-columns: 1fr;
  }
}
