/* Visual baseado no Fluent Design System (linguagem visual do portal do Azure). */
:root {
  --primary: #0078d4;
  --primary-hover: #106ebe;
  --primary-pressed: #005a9e;
  --primary-tint: #eff6fc;
  --primary-tint-2: #deecf9;
  --text: #323130;
  --text-secondary: #605e5c;
  --text-disabled: #a19f9d;
  --border-subtle: #edebe9;
  --border-input: #8a8886;
  --neutral-light: #f3f2f1;
  --neutral-lighter: #faf9f8;
  --topbar: #1b1a19;
  --success: #107c10;
  --success-bg: #dff6dd;
  --error: #a4262c;
  --error-bg: #fde7e9;
  --warning-bg: #fff4ce;
  --warning-icon: #797775;
  --shadow-4: 0 1.6px 3.6px rgba(0, 0, 0, 0.132), 0 0.3px 0.9px rgba(0, 0, 0, 0.108);
  --shadow-8: 0 3.2px 7.2px rgba(0, 0, 0, 0.132), 0 0.6px 1.8px rgba(0, 0, 0, 0.108);
  --font: 'Segoe UI', 'Segoe UI Web (West European)', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 20px;
  background: var(--neutral-lighter);
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; color: inherit; }

svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* Barra superior */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 40px;
  padding: 0 8px 0 16px;
  background: var(--topbar);
  color: #fff;
}
.topbar-brand { display: flex; align-items: center; gap: 10px; }
.app-icon { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 2px; background: var(--primary); }
.app-icon svg { width: 15px; height: 15px; stroke-width: 1.8; }
.app-name { font-size: 15px; font-weight: 600; }
.topbar-link { display: grid; place-items: center; width: 40px; height: 40px; color: #fff; }
.topbar-link:hover { background: rgba(255, 255, 255, 0.1); }
.topbar-link svg { width: 18px; height: 18px; }

.breadcrumb { display: flex; gap: 6px; padding: 10px 24px 0; font-size: 13px; color: var(--primary); }
.breadcrumb .sep { color: var(--text-secondary); }
.breadcrumb span:last-child { color: var(--text-secondary); }

.page-header { display: flex; align-items: center; gap: 12px; padding: 12px 24px 16px; }
.page-icon { display: grid; place-items: center; width: 36px; height: 36px; color: var(--primary); }
.page-icon svg { width: 32px; height: 32px; stroke-width: 1.4; }
.page-header h1 { margin: 0; font-size: 24px; line-height: 32px; font-weight: 600; }
.page-header p { margin: 0; color: var(--text-secondary); }

/* Assistente em passos */
.wizard { padding: 0 24px 32px; }
/* Cabecalho e assistente compartilham a mesma largura de conteudo. */
.wizard, .page-header, .breadcrumb { max-width: 860px; margin: 0 auto; box-sizing: content-box; }

.wizard-steps { list-style: none; display: flex; margin: 0 0 16px; padding: 0; }
.wizard-steps li { display: flex; align-items: center; gap: 8px; flex: 1; color: var(--text-secondary); }
.wizard-steps li:not(:last-child)::after { content: ''; flex: 1; height: 1px; margin: 0 12px; background: var(--border-input); opacity: 0.5; }
.wizard-steps li.done:not(:last-child)::after { background: var(--primary); opacity: 1; }
.wizard-dot {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-input);
  background: #fff;
  font-weight: 600;
  flex-shrink: 0;
}
.wizard-dot svg { width: 14px; height: 14px; stroke-width: 2.4; }
.wizard-steps li.active { color: var(--text); font-weight: 600; }
.wizard-steps li.active .wizard-dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.wizard-steps li.done .wizard-dot { background: #fff; border-color: var(--primary); color: var(--primary); }

.panel { background: #fff; box-shadow: var(--shadow-4); padding: 28px 32px; }
.step-view { display: flex; flex-direction: column; gap: 24px; }
.step-heading h2 { font-size: 20px; line-height: 28px; font-weight: 600; }
.step-heading p { margin: 2px 0 0; color: var(--text-secondary); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-hint { color: var(--text-secondary); font-size: 12px; }
.actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 16px; border-top: 1px solid var(--border-subtle); }

/* Aguardando login */
.connect-wait { display: flex; flex-direction: column; gap: 20px; }
.waiting { display: flex; align-items: center; gap: 10px; color: var(--text-secondary); }
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--primary-tint-2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
.device-steps { margin: 6px 0 14px; padding-left: 20px; color: var(--text-secondary); }
.device-steps li { margin: 2px 0; }

/* Conectado */
.connected { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--success-bg); }
.connected-icon { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--success); color: #fff; flex-shrink: 0; }
.connected-icon svg { width: 13px; height: 13px; stroke-width: 2.4; }
.connected-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.connected-text strong { font-weight: 600; }
.connected-text small { color: var(--text-secondary); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.block { display: flex; flex-direction: column; gap: 10px; }
.block-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.block-header h3 { font-size: 16px; line-height: 22px; }
.sub-empty { padding: 12px; color: var(--text-secondary); text-align: center; }

h1, h2, h3 { margin: 0; }
h3 { font-size: 14px; font-weight: 600; }

.eyebrow { margin: 0; color: var(--text-secondary); font-size: 12px; }

/* Formulario */
form { display: flex; flex-direction: column; gap: 24px; }
.section { display: flex; flex-direction: column; gap: 12px; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 16px; line-height: 22px; font-weight: 600; }
.step-num {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.field { display: flex; flex-direction: column; gap: 4px; }
.field label, .field-label { font-weight: 600; }
.field .auth-cards { margin-top: 2px; }
.access-key { padding-top: 20px; border-top: 1px solid var(--border-subtle); }
.optional { color: var(--text-secondary); font-weight: 400; }
#sp-fields { display: flex; flex-direction: column; gap: 12px; }

input:not([type=radio]):not([type=checkbox]) {
  width: 100%;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border-input);
  border-radius: 2px;
  background: #fff;
}
input:not([type=radio]):not([type=checkbox]):hover { border-color: var(--text); }
input:not([type=radio]):not([type=checkbox]):focus { outline: none; border: 2px solid var(--primary); padding: 0 7px; }
input::placeholder { color: var(--text-secondary); }

/* Cartoes de escolha */
.auth-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice input, .feature input { position: absolute; opacity: 0; pointer-events: none; }
.choice-body {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 100%;
  padding: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.1s, background 0.1s;
}
.choice-body:hover { border-color: var(--border-input); }
.choice-body svg { width: 24px; height: 24px; color: var(--text-secondary); margin-bottom: 6px; stroke-width: 1.4; }
.choice-body strong { font-weight: 600; }
.choice-body small { color: var(--text-secondary); font-size: 12px; line-height: 16px; }
.choice input:checked + .choice-body { border: 2px solid var(--primary); padding: 11px; background: var(--primary-tint); }
.choice input:checked + .choice-body svg { color: var(--primary); }
.choice input:checked + .choice-body::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-4.9' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.choice input:focus-visible + .choice-body, .feature input:focus-visible + .feature-body { outline: 1px solid var(--text); outline-offset: 2px; }
.choice.compact .choice-body { padding: 10px 12px; }
.choice.compact input:checked + .choice-body { padding: 9px 11px; }

/* Opcoes do relatorio */
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.feature-body {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
  background: #fff;
  cursor: pointer;
}
.feature input:checked + .feature-body { border-color: var(--primary-tint-2); background: var(--primary-tint); }
.feature-body:hover { background: var(--neutral-lighter); }
.feature-icon { display: grid; place-items: center; width: 32px; height: 32px; color: var(--text-secondary); }
.feature-icon svg { width: 22px; height: 22px; stroke-width: 1.4; }
.feature input:checked + .feature-body .feature-icon { color: var(--primary); }
.feature-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.feature-text strong { font-weight: 600; }
.feature-text small { color: var(--text-secondary); font-size: 12px; line-height: 16px; }
.tag {
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 2px;
  background: var(--neutral-light);
  color: var(--text-secondary);
  font-size: 11px;
  font-style: normal;
  font-weight: 400;
  white-space: nowrap;
}

/* Toggle no estilo Fluent */
.switch {
  position: relative;
  width: 40px;
  height: 20px;
  border: 1px solid var(--text-secondary);
  border-radius: 10px;
  background: #fff;
  flex-shrink: 0;
  transition: background 0.1s, border-color 0.1s;
}
.switch::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-secondary);
  transition: transform 0.1s, background 0.1s;
}
.feature input:checked + .feature-body .switch { background: var(--primary); border-color: var(--primary); }
.feature input:checked + .feature-body .switch::after { background: #fff; transform: translateX(20px); }

/* Selecao de assinaturas */

.sub-toolbar { display: flex; gap: 8px; align-items: center; }
.sub-list { list-style: none; margin: 0; padding: 0; max-height: 240px; overflow-y: auto; border: 1px solid var(--border-subtle); }
.sub-list li + li { border-top: 1px solid var(--border-subtle); }
.sub-item { display: flex; align-items: center; gap: 10px; padding: 6px 10px; cursor: pointer; }
.sub-item:hover { background: var(--neutral-lighter); }
.sub-item input { width: 16px; height: 16px; accent-color: var(--primary); flex-shrink: 0; }
.sub-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sub-text strong { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-text small { color: var(--text-secondary); font-size: 12px; line-height: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-count { margin: 0; color: var(--text-secondary); font-size: 12px; }
.sub-count:empty { display: none; }

.output-box { display: flex; flex-direction: column; gap: 8px; }

/* Botoes */
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 16px;
  border: 1px solid var(--border-input);
  border-radius: 2px;
  background: #fff;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
button:hover:not(:disabled) { background: var(--neutral-light); }
button:active:not(:disabled) { background: var(--border-subtle); }
button:disabled { color: var(--text-disabled); background: var(--neutral-light); border-color: var(--neutral-light); cursor: default; }
button.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
button.primary:hover:not(:disabled) { background: var(--primary-hover); border-color: var(--primary-hover); }
button.primary:active:not(:disabled) { background: var(--primary-pressed); }
button.primary:disabled { color: var(--text-disabled); background: var(--neutral-light); border-color: var(--neutral-light); }
button.secondary { color: var(--primary); border-color: var(--primary); }
button.secondary:hover:not(:disabled) { background: var(--primary-tint); }
button.ghost { border-color: var(--border-input); }
button.link { min-height: auto; padding: 4px; border: 0; background: none; color: var(--primary); font-weight: 400; }
button.link:hover:not(:disabled) { background: none; text-decoration: underline; }
button.loading svg { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.advanced summary, .help summary { cursor: pointer; color: var(--primary); }
.help { color: var(--text-secondary); font-size: 13px; }

/* Barras de mensagem (MessageBar) */
.error, .warning, .error-card {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 8px 12px;
  font-size: 13px;
}
.error { background: var(--error-bg); color: var(--text); border-left: 3px solid var(--error); }
.warning { background: var(--warning-bg); color: var(--text); border-left: 3px solid var(--warning-icon); }
.error-card { align-items: flex-start; padding: 12px 16px; background: var(--error-bg); border-left: 3px solid var(--error); }
.error-card > svg { width: 18px; height: 18px; color: var(--error); margin-top: 1px; }
.error-card h3 { font-weight: 600; }
.error-card details { margin-top: 6px; }
.error-card summary { cursor: pointer; color: var(--primary); }
.error-card details p { margin: 6px 0 0; color: var(--text-secondary); word-break: break-word; }

/* Relatorio */
.job-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.job-header h2 { font-size: 20px; line-height: 28px; font-weight: 600; }
.elapsed { display: flex; align-items: center; gap: 6px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }

.progress { position: relative; height: 4px; background: var(--border-subtle); overflow: hidden; }
.progress-bar { position: relative; height: 100%; width: 0; background: var(--primary); overflow: hidden; transition: width 0.6s ease; }
.progress.running .progress-bar::after, .progress.queued .progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  animation: shimmer 1.6s linear infinite;
}
.progress.completed .progress-bar { background: var(--success); }
.progress.failed .progress-bar { background: var(--error); }
.progress.canceled .progress-bar { background: var(--text-disabled); }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* Codigo de login */
.device-box { display: flex; gap: 16px; padding: 16px; background: var(--primary-tint); border-left: 3px solid var(--primary); }
.device-icon { display: grid; place-items: center; width: 40px; height: 40px; color: var(--primary); flex-shrink: 0; }
.device-icon svg { width: 32px; height: 32px; stroke-width: 1.4; }
.device-box h3 { font-size: 16px; line-height: 22px; }
.device-box p { margin: 4px 0 12px; color: var(--text-secondary); }
.device-box a { color: var(--primary); font-weight: 600; text-decoration: none; }
.device-box a:hover { text-decoration: underline; }
.device-code { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.device-code span {
  padding: 4px 14px;
  border: 1px solid var(--border-input);
  border-radius: 2px;
  background: #fff;
  font-family: Consolas, 'Courier New', monospace;
  font-size: 24px;
  line-height: 36px;
  font-weight: 600;
  letter-spacing: 0.12em;
  user-select: all;
}

/* Etapas */
.stepper { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.step { position: relative; display: flex; gap: 12px; padding-bottom: 16px; }
.step:last-child { padding-bottom: 0; }
.step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 26px;
  bottom: 2px;
  width: 2px;
  background: var(--border-subtle);
}
.step.done:not(:last-child)::before { background: var(--primary); }
.step-dot {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border-input);
  background: #fff;
  flex-shrink: 0;
  z-index: 1;
}
.step-dot svg { width: 13px; height: 13px; stroke-width: 2.4; }
.step strong { display: block; padding-top: 2px; color: var(--text-secondary); font-weight: 400; }
.step p { margin: 2px 0 0; color: var(--text-secondary); font-size: 13px; }
.step.done .step-dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.step.done strong { color: var(--text); }
.step.active .step-dot { border: 2px solid var(--primary); }
.step.active .step-dot::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 1.4s ease-in-out infinite;
}
.step.active strong { color: var(--text); font-weight: 600; }
.step.failed .step-dot { background: var(--error); border-color: var(--error); color: #fff; }
.step.failed strong { color: var(--error); font-weight: 600; }
.step.stopped .step-dot { background: var(--text-disabled); border-color: var(--text-disabled); color: #fff; }
@keyframes pulse { 50% { transform: scale(0.55); opacity: 0.5; } }

/* Progresso por assinatura */
.subs-progress { border: 1px solid var(--border-subtle); }
.subs-progress h3 { padding: 10px 16px; border-bottom: 1px solid var(--border-subtle); background: var(--neutral-lighter); }
.subs-progress ul { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; }
.sub-progress { display: flex; align-items: center; gap: 10px; padding: 8px 16px; }
.sub-progress + .sub-progress { border-top: 1px solid var(--border-subtle); }
.sub-progress .step-dot { width: 20px; height: 20px; }
.sub-progress .step-dot svg { width: 11px; height: 11px; }
.sub-progress-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-progress-status { color: var(--text-secondary); font-size: 12px; }
.sub-progress.done .step-dot { background: var(--success); border-color: var(--success); color: #fff; }
.sub-progress.done .sub-progress-status { color: var(--success); }
.sub-progress.running .step-dot { border: 2px solid var(--primary); }
.sub-progress.running .step-dot::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); animation: pulse 1.4s ease-in-out infinite; }
.sub-progress.running .sub-progress-name { font-weight: 600; }
.sub-progress.running .sub-progress-status { color: var(--primary); }
.sub-progress.failed .step-dot { background: var(--error); border-color: var(--error); color: #fff; }
.sub-progress.failed .sub-progress-status { color: var(--error); }
.sub-progress.canceled .step-dot { background: var(--text-disabled); border-color: var(--text-disabled); color: #fff; }

/* Resultado */
.result { display: flex; flex-direction: column; gap: 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.stat { display: flex; flex-direction: column; padding: 12px 16px; background: #fff; box-shadow: var(--shadow-4); }
.stat-value { font-size: 28px; line-height: 36px; font-weight: 600; color: var(--text); }
.stat-label { color: var(--text-secondary); font-size: 12px; }

.archive {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
}
.archive:hover { background: var(--primary-hover); }
.archive svg { width: 24px; height: 24px; }
.archive span { display: flex; flex-direction: column; }
.archive strong { font-weight: 600; }
.archive small { font-size: 12px; opacity: 0.9; }

.files { display: flex; flex-direction: column; border: 1px solid var(--border-subtle); }
.file { display: flex; align-items: center; gap: 12px; padding: 10px 16px; color: var(--text); }
.file + .file { border-top: 1px solid var(--border-subtle); }
.file:hover { background: var(--neutral-lighter); }
.file-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 2px;
  background: #107c41;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  flex-shrink: 0;
}
.file.diagram .file-icon { background: #ca5010; }
.file.move .file-icon { background: #8764b8; }
.file.cost .file-icon { background: #038387; }
.file.finops .file-icon { background: #107c10; }

/* Relatorio de custos: selecao de meses */
.cost-months { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--neutral-lighter); border: 1px solid var(--border-subtle); }
.month-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.month-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 78px;
  min-height: 34px;
  padding: 4px 10px;
  border: 1px solid var(--border-input);
  border-radius: 16px;
  background: #fff;
  font-weight: 400;
}
.month-chip small { font-size: 10px; line-height: 12px; color: var(--text-secondary); }
.month-chip[aria-pressed=true] { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.month-chip[aria-pressed=true] small { color: #fff; }
.month-chip:disabled { opacity: 0.45; background: #fff; color: var(--text); border-color: var(--border-input); }
.feature.disabled { opacity: 0.5; }
.feature.disabled .feature-body { cursor: not-allowed; }
/* Desabilitado (ex.: movimentacao sem inventario): a chave aparece desligada. */
.feature.disabled input:checked + .feature-body { background: #fff; border-color: var(--border-subtle); }
.feature.disabled input:checked + .feature-body .switch { background: #fff; border-color: var(--text-secondary); }
.feature.disabled input:checked + .feature-body .switch::after { background: var(--text-secondary); transform: none; }
.feature.disabled input:checked + .feature-body .feature-icon { color: var(--text-secondary); }
.file.other .file-icon { background: var(--text-secondary); }
.file-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.file-text strong { font-weight: 600; }
.file-text small { color: var(--text-secondary); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-actions { display: flex; gap: 4px; flex-shrink: 0; }
.file-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  background: none;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}
.file-action:hover:not(:disabled) { background: var(--primary-tint); }

/* Janela do diagrama */
body.modal-open { overflow: hidden; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.4);
}
.modal-box {
  display: flex;
  flex-direction: column;
  width: min(1400px, 100%);
  height: min(900px, 100%);
  background: #fff;
  box-shadow: 0 25.6px 57.6px rgba(0, 0, 0, 0.22), 0 4.8px 14.4px rgba(0, 0, 0, 0.18);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px 14px 24px; border-bottom: 1px solid var(--border-subtle); }
.modal-header h2 { font-size: 20px; line-height: 28px; font-weight: 600; }
.modal-header small { color: var(--text-secondary); font-size: 12px; }
.modal-actions { display: flex; align-items: center; gap: 8px; }
.button {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 16px;
  border: 1px solid var(--border-input);
  border-radius: 2px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.button.secondary { color: var(--primary); border-color: var(--primary); }
.button.secondary:hover { background: var(--primary-tint); }
.icon-button { min-height: 32px; width: 32px; padding: 0; border: 0; background: none; }
.icon-button svg { width: 18px; height: 18px; }
.modal-body { position: relative; flex: 1; min-height: 0; overflow: auto; padding: 16px; background: var(--neutral-lighter); }
.modal-body .mxgraph { max-width: 100%; background: #fff; border: 1px solid var(--border-subtle); }
.modal-body > .waiting { justify-content: center; height: 100%; }
.expiry { margin: 0; color: var(--text-secondary); font-size: 12px; }



@media (max-width: 720px) {
  .wizard { padding: 0 12px 16px; }
  .breadcrumb, .page-header { padding-left: 12px; padding-right: 12px; }
  .panel { padding: 20px 16px; }
  .features, .field-row { grid-template-columns: 1fr; }
  .wizard-label { display: none; }
  .wizard-steps li.active .wizard-label { display: inline; }
}
@media (max-width: 480px) {
  .auth-cards { grid-template-columns: 1fr; }
}
