/* ============================================================
   WebsDocs Data Admin
   AIG-EMBEDDED MAIN STYLESHEET · v29
   One accent family: WebsDocs blue + neutral slate.
   Embedded under AIG Admin. Standalone login/session UI removed.
   ============================================================ */

:root {
  --wda-accent: #1769d2;
  --wda-accent-strong: #0f57b6;
  --wda-accent-soft: #eef5ff;
  --wda-blue-200: #bcd8f8;
  --wda-blue-400: #6aa5e8;
  --wda-blue-600: #1769d2;
  --wda-navy-800: #17324f;
  --wda-navy-900: #10243a;
  --wda-navy-950: #08192c;
  --wda-slate-050: #f8fafc;
  --wda-slate-100: #f1f5f9;
  --wda-slate-200: #dce5ee;
  --wda-slate-300: #c8d3df;
  --wda-slate-400: #94a3b5;
  --wda-slate-500: #68788b;
  --wda-slate-600: #526276;
  --wda-slate-700: #384b61;
--wda-success: #14825f;
  --wda-warning: #a66a0a;
  --wda-danger: #b42318;
  --wda-page-pad: clamp(18px, 2.4vw, 54px);
  --wda-header-height: 62px;
  --wda-line: var(--wda-slate-200);
}

#dataAdminWorkspace,
#dataAdminWorkspace *,
.wda-row-detail-drawer,
.wda-row-detail-drawer * {
  box-sizing: border-box;
}

#dataAdminWorkspace {
  min-width: 0;
  color: var(--wda-navy-900);
  background: var(--wda-slate-050);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#dataAdminWorkspace button,
#dataAdminWorkspace input,
#dataAdminWorkspace select,
#dataAdminWorkspace textarea,
.wda-row-detail-drawer button {
  font: inherit;
}

#dataAdminWorkspace button,
.wda-row-detail-drawer button {
  cursor: pointer;
}

#dataAdminWorkspace a {
  color: inherit;
}


.wda-kicker,
.wda-eyebrow {
  margin: 0;
  color: var(--wda-accent);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}


/* ------------------------------------------------------------
   Compact Data Admin filter strip
   ------------------------------------------------------------ */
.wda-hero {
  width: 100%;
  display: block;
  padding: 0;
  color: #fff;
  background: var(--wda-navy-950);
  border-bottom: 1px solid #18334f;
}
.wda-filter-only-hero .wda-header-filter {
  width: 100%;
  min-height: 48px;
}

/* ------------------------------------------------------------
   Analytics shell — the Analytics module is the Data Admin overview
   ------------------------------------------------------------ */
.wda-analytics-root { width: 100%; background: #fff; border-bottom: 1px solid var(--wda-line); }
.wda-analytics-root[hidden],
.wda-workspace[hidden] { display: none !important; }
.wda-analytics-intro {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--wda-line);
  background: #fbfcfe;
}
.wda-analytics-intro > .wda-kicker { flex: 0 0 auto; }
.wda-analytics-toolbar { display: flex; align-items: center; gap: 8px; color: var(--wda-slate-500); font-size: 10px; }
.wda-analytics-toolbar button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--wda-accent);
  border-radius: 0;
  color: #fff;
  background: var(--wda-accent);
  font-weight: 800;
}
.wda-analytics-toolbar button:hover { background: var(--wda-accent-strong); }

/* ------------------------------------------------------------
   Workspace
   The duplicate left rail was retired in the AIG-embedded build.
   The live Data Admin module owns its mode and module tabs, so the
   work stage can use the full available width with no dead column.
   ------------------------------------------------------------ */
.wda-workspace { width: 100%; display: block; background: var(--wda-slate-050); }
.wda-workspace-stage { width: 100%; min-width: 0; padding: 10px 12px 16px; overflow: hidden; }
#websdocsDataAdminLiveSlot { width: 100%; min-width: 0; }

/* ------------------------------------------------------------
   Core Data Admin module
   ------------------------------------------------------------ */
.wda { width: 100%; min-width: 0; }
.wda-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--wda-line);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}
.wda-card + .wda-card { margin-top: 12px; }
.wda-mode-card { padding: 10px 12px; }

.wda-panel-head h3 { margin: 0; color: var(--wda-navy-950); letter-spacing: -.025em; }
.wda-panel-head p { margin: 4px 0 0; color: var(--wda-slate-600); line-height: 1.5; }
.wda-tabs,
.wda-mode-tabs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.wda-tab,
.wda-mode,
.wda-btn,
.wda-mini-action {
  appearance: none;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid var(--wda-line);
  border-radius: 0;
  color: var(--wda-navy-900);
  background: #fff;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}
.wda-tab:hover,
.wda-mode:hover,
.wda-btn:hover,
.wda-mini-action:hover { color: var(--wda-accent-strong); border-color: #a9c8ee; background: var(--wda-accent-soft); }
.wda-tab.is-active,
.wda-mode.is-active,
.wda-btn:not(.secondary):not(.danger) { color: #fff; border-color: var(--wda-accent); background: var(--wda-accent); }
.wda-btn.secondary { color: var(--wda-navy-900); background: #fff; }
.wda-btn.danger { color: var(--wda-danger); border-color: #e7b9b5; background: #fff5f4; }
.wda-btn:disabled { cursor: not-allowed; opacity: .55; }
.wda-panel { display: none; margin-top: 12px; }
.wda-panel.is-active { display: block; }
.wda-panel:not(.is-active) { display: none !important; }
.wda-panel-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; margin-bottom: 12px; }
.wda-grid { display: grid; gap: 10px; }
.wda-grid.three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.wda-metric {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--wda-line);
  background: var(--wda-slate-050);
}
.wda-metric span { display: block; color: var(--wda-slate-500); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.wda-metric strong { display: block; margin-top: 7px; color: var(--wda-navy-950); font-size: 1.25rem; overflow-wrap: anywhere; }

/* Forms */
.wda-mini-form { display: grid; gap: 9px; align-items: end; }
.wda-mini-form.four { grid-template-columns: 1.1fr 1fr 1fr auto; }
.wda-mini-form.query { grid-template-columns: 180px auto; justify-content: start; }

.wda-mini-form label,
.wda-output-label { display: grid; gap: 5px; color: var(--wda-slate-700); font-size: 11px; font-weight: 780; }
.wda-mini-form input,
.wda-mini-form select,
.wda-mini-form textarea,
.wda-output-label textarea,
#wdaWriteD1Values,
#wdaWriteD1Where,
#wdaWriteD1Sql,
#wdaWriteKvValue {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid var(--wda-slate-300);
  border-radius: 0;
  color: var(--wda-navy-950);
  background: #fff;
  outline: none;
}
.wda-mini-form textarea,
.wda-output-label textarea,
#wdaWriteD1Values,
#wdaWriteD1Where,
#wdaWriteD1Sql,
#wdaWriteKvValue { min-height: 105px; resize: vertical; font-family: ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size: 12px; }
.wda-mini-form input:focus,
.wda-mini-form select:focus,
.wda-mini-form textarea:focus,
.wda-output-label textarea:focus { border-color: var(--wda-accent); box-shadow: 0 0 0 2px rgba(23,105,210,.10); }

/* Tables / JSON */
.wda-table-wrap {
  width: 100%;
  max-width: 100%;
  max-height: 72vh;
  overflow: auto;
  border: 1px solid var(--wda-line);
  background: #fff;
}
.wda-table { width: 100%; min-width: 980px; border-collapse: collapse; table-layout: auto; font-size: 11px; }
.wda-table th,
.wda-table td { padding: 9px 10px; border-bottom: 1px solid var(--wda-line); border-right: 1px solid #edf1f5; text-align: left; vertical-align: top; }
.wda-table th { position: sticky; top: 0; z-index: 3; color: var(--wda-slate-600); background: #f5f8fb; font-size: 9px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.wda-table td { max-width: 460px; color: var(--wda-navy-900); overflow-wrap: anywhere; white-space: normal; }
.wda-table .wda-readable-cell,
.wda-readable-cell { min-width: 240px; max-width: 620px; white-space: normal; overflow-wrap: anywhere; }
.wda-readable-table { min-width: 2100px; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.wda-readable-table .wda-cell-value { max-height: 132px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.wda-readable-table .wda-col-long { width: 380px; }
.wda-readable-table .wda-col-email { width: 230px; }
.wda-readable-table .wda-col-url { width: 270px; }
.wda-readable-table .wda-col-date { width: 150px; }
.wda-readable-table .wda-col-id { width: 120px; }
.wda-readable-table .wda-col-medium { width: 220px; }
.wda-readable-table .wda-col-small { width: 135px; }
.wda-readable-table .wda-col-actions { width: 92px; text-align: center; }
.wda-json {
  width: 100%;
  min-height: 240px;
  max-height: 70vh;
  margin: 0;
  padding: 13px;
  overflow: auto;
  border: 1px solid #16324f;
  color: #e9f2fb;
  background: #08192c;
  font-family: ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.wda-list-item { padding: 11px 12px; color: var(--wda-slate-600); background: var(--wda-slate-050); border: 1px solid var(--wda-line); }

/* Status */
.wda-status { min-height: 20px; color: var(--wda-slate-600); font-size: 11px; font-weight: 750; }
.wda-status.ok { color: var(--wda-success); }
.wda-status.warn { color: var(--wda-warning); }
.wda-status.error { color: var(--wda-danger); }
.wda-session-pill { display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.wda-write-pill.wda-write-locked,
.wda-write-locked { color: #80540b; background: #fff8e8; border-color: #ead6a8; }
.wda-write-pill.wda-write-unlocked,
.wda-write-unlocked { color: #8f1e18; background: #fff2f2; border-color: #e5b7b3; }

/* Unlock/security flow */


.wda-security-note { padding: 11px 12px; color: var(--wda-slate-600); background: var(--wda-slate-100); font-size: 11px; }

/* Overview summary */


/* Write / danger */
.wda-write-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.wda-danger-zone { border-color: #e5b7b3 !important; background: #fff9f8 !important; }
.wda-danger-zone .wda-panel-head h3 { color: #8f1e18; }
#wdaPanel-write .wda-btn.danger { color: #fff; border-color: var(--wda-danger); background: var(--wda-danger); }
#wdaPanel-write .wda-status { align-self: center; color: var(--wda-warning); }
.wda-abuse-card { border-color: #ead6a8 !important; background: #fffaf0 !important; }

/* Row detail drawer */
.wda-row-detail-drawer,
.wda-readable-drawer,
.wda-detail-drawer,
.wda-record-drawer,
.wda-readable-record-drawer { position: fixed; inset: 0; z-index: 9999; }
.wda-row-detail-backdrop { position: absolute; inset: 0; background: rgba(8,25,44,.46); backdrop-filter: blur(3px); }
.wda-row-detail-panel { position: absolute; top: 14px; right: 14px; bottom: 14px; width: min(920px,calc(100vw - 28px)); overflow: auto; padding: 16px; border: 1px solid var(--wda-line); background: #fff; box-shadow: 0 26px 70px rgba(8,25,44,.22); }
.wda-row-detail-head,
.wda-row-detail-actions { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.wda-row-detail-actions { justify-content: flex-start; }
.wda-row-detail-grid { display: grid; gap: 10px; }
.wda-row-detail-item { padding: 11px; border: 1px solid var(--wda-line); background: var(--wda-slate-050); }
.wda-row-detail-item span { display: block; margin-bottom: 6px; color: var(--wda-accent); font-size: 9px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.wda-row-detail-item pre { margin: 0; color: var(--wda-navy-900); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; font-family: inherit; font-size: 11px; }

.wda-page { width: 100%; min-width: 0; }

.wda-workarea-card { background: #fff; }


/* Responsive */
@media (max-width: 1380px) {
  
  
  
}
@media (max-width: 1100px) {
  .wda-grid.three { grid-template-columns: 1fr; }
  .wda-mini-form.four { grid-template-columns: 1fr; }
  
  
}
@media (max-width: 820px) {
  :root { --wda-header-height: 58px; --wda-page-pad: 16px; }
  
  
  
  
  
  
  .wda-workspace-stage { padding: 10px; }
  .wda-analytics-intro,
.wda-analytics-toolbar { align-items: flex-start; flex-direction: column; }
  .wda-write-grid { grid-template-columns: 1fr; }
  
  .wda-readable-table { min-width: 1500px; }
}
@media (max-width: 560px) {
  
  
  .wda-session-pill { min-width: 118px; }
  
  .wda-panel-head { flex-direction: column; }
  .wda-tabs,
.wda-mode-tabs { flex-wrap: nowrap; overflow-x: auto; }
  .wda-tab,
.wda-mode { flex: 0 0 auto; }
  .wda-row-detail-panel { inset: 8px; width: auto; }
}

/* ------------------------------------------------------------
   AIG embedded module navigation
   Module buttons are re-parented into the shared AIG left rail.
   ------------------------------------------------------------ */
.wda-module-tabs-card { padding: 0; border: 0; background: transparent; }
.wda-tab > span { display: inline-grid; place-items: center; }
.wda-tab > strong { min-width: 0; font: inherit; font-weight: inherit; }
#dataAdminWorkspace .wda-module-tabs-card { display: none; }

@media (max-width: 820px) {
  .wda-analytics-intro { align-items: flex-start; flex-direction: column; }
}

/* ------------------------------------------------------------
   Data Admin operational overview
   Overview is status/action focused; charts remain in Analytics.
   ------------------------------------------------------------ */
.wda-overview-head { margin-bottom: 10px; }
.wda-overview-panel-head { margin-bottom: 8px; }
.wda-overview-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 1px solid var(--wda-line);
  border-left: 1px solid var(--wda-line);
}
.wda-overview-metrics > article {
  min-width: 0;
  min-height: 88px;
  padding: 11px 12px;
  border-right: 1px solid var(--wda-line);
  border-bottom: 1px solid var(--wda-line);
  background: #fff;
}
.wda-overview-metrics span,
.wda-overview-metrics strong,
.wda-overview-metrics small { display: block; }
.wda-overview-metrics span {
  color: var(--wda-slate-500);
  font-size: 8.5px;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.wda-overview-metrics strong {
  margin-top: 6px;
  color: var(--wda-navy-950);
  font-size: 20px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.wda-overview-metrics small {
  margin-top: 6px;
  color: var(--wda-slate-500);
  font-size: 9.5px;
  line-height: 1.3;
}
.wda-overview-metrics article.is-safe { background: #f4fbf8; }
.wda-overview-metrics article.is-danger { background: #fff5f4; }
.wda-overview-metrics article.is-danger strong { color: var(--wda-danger); }
.wda-overview-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
.wda-overview-list { display: grid; gap: 0; border: 1px solid var(--wda-line); }
.wda-overview-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 9px 10px;
  border-bottom: 1px solid var(--wda-line);
  background: #fff;
}
.wda-overview-row:last-child { border-bottom: 0; }
.wda-overview-row > div { min-width: 0; }
.wda-overview-row strong,
.wda-overview-row small { display: block; }
.wda-overview-row strong { color: var(--wda-navy-950); font-size: 10.5px; }
.wda-overview-row small { margin-top: 2px; color: var(--wda-slate-500); font-size: 9.5px; line-height: 1.35; overflow-wrap: anywhere; }
.wda-overview-row time { color: var(--wda-slate-500); font-size: 8.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wda-overview-row.ok { box-shadow: inset 3px 0 0 var(--wda-success); }
.wda-overview-row.warn { box-shadow: inset 3px 0 0 var(--wda-warning); background: #fffaf0; }
.wda-overview-row.error { box-shadow: inset 3px 0 0 var(--wda-danger); background: #fff6f5; }
.wda-overview-empty,
.wda-overview-loading { padding: 12px; color: var(--wda-slate-500); font-size: 10px; }
.wda-overview-actions-card { margin-bottom: 0; }
.wda-overview-actions { display: flex; flex-wrap: wrap; gap: 7px; }

@media (max-width: 1300px) {
  .wda-overview-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .wda-overview-split { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .wda-overview-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wda-overview-row { grid-template-columns: 1fr; }
  .wda-overview-row time { white-space: normal; }
}
