:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  color: #111827;
  background: #f5f7fb;
  --primary: #3457e5;
  --primary-dark: #2443c5;
  --border: #dfe5f0;
  --muted: #68738a;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 0%, rgba(75, 103, 229, 0.09), transparent 27rem),
    radial-gradient(circle at 95% 12%, rgba(23, 170, 112, 0.06), transparent 24rem), #f5f7fb;
}
body.modal-open {
  overflow: hidden;
}
.container {
  width: min(1240px, calc(100% - 48px));
  margin: 36px auto 72px;
}
header,
.section-heading,
.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  margin-bottom: 8px;
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.app-header {
  margin-bottom: 24px;
}
.brand-lockup {
  align-items: center;
  display: flex;
  gap: 16px;
}
.brand-lockup p:last-child {
  margin-bottom: 0;
}
.brand-mark {
  align-items: center;
  background: linear-gradient(145deg, #4568ed, #263fbd);
  border-radius: 15px;
  box-shadow: 0 12px 26px rgba(52, 87, 229, 0.26);
  color: #fff;
  display: flex;
  flex: 0 0 auto;
  font-size: 23px;
  font-weight: 850;
  height: 52px;
  justify-content: center;
  width: 52px;
}
.eyebrow {
  color: #3157d5;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.muted,
.hint {
  color: var(--muted);
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 12px 34px rgba(20, 34, 70, 0.055);
  margin-top: 20px;
  padding: 28px;
}
.overview-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 20px;
}
.metric-card {
  align-items: center;
  background: linear-gradient(135deg, #fff, #f8faff);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  gap: 12px;
  min-width: 0;
  padding: 18px;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}
.metric-card:hover {
  box-shadow: 0 12px 28px rgba(20, 34, 70, 0.08);
  transform: translateY(-2px);
}
.metric-card strong,
.metric-card span {
  display: block;
}
.metric-card strong {
  font-size: 24px;
  line-height: 1.1;
}
.metric-card div span {
  color: #65718a;
  font-size: 12px;
  margin-top: 4px;
}
.metric-icon {
  align-items: center;
  background: #edf1fb;
  border-radius: 10px;
  color: #3157d5;
  display: flex;
  font-size: 20px;
  height: 38px;
  justify-content: center;
  width: 38px;
}
.metric-icon.green {
  background: #eaf8ef;
  color: #176b38;
}
.metric-icon.amber {
  background: #fff7dd;
  color: #9b7200;
}
.metric-icon.red {
  background: #fff0ef;
  color: #a22c22;
}
.workspace-layout {
  align-items: start;
  display: grid;
  gap: 24px;
  grid-template-columns: 224px minmax(0, 1fr);
}
.workspace-content {
  min-width: 0;
}
.sidebar {
  background: linear-gradient(180deg, #17213f, #11182e);
  border: 1px solid #253250;
  border-radius: 18px;
  box-shadow: 0 18px 38px rgba(17, 24, 46, 0.16);
  color: #fff;
  min-height: 340px;
  padding: 18px 12px 12px;
  position: sticky;
  top: 20px;
}
.sidebar-heading {
  align-items: center;
  display: flex;
  gap: 10px;
  margin: 3px 10px 20px;
}
.sidebar-heading strong,
.sidebar-heading small {
  display: block;
}
.sidebar-heading strong {
  font-size: 14px;
}
.sidebar-heading small {
  color: #9ca9c7;
  font-size: 11px;
  margin-top: 2px;
}
.status-dot {
  background: #36d795;
  border: 3px solid rgba(54, 215, 149, 0.18);
  border-radius: 50%;
  box-sizing: content-box;
  display: inline-block;
  height: 7px;
  width: 7px;
}
.sidebar-link {
  align-items: center;
  background: transparent;
  border-left: 3px solid transparent;
  border-radius: 6px;
  color: #b6c0d8;
  display: flex;
  font-size: 14px;
  justify-content: space-between;
  margin: 2px 0;
  padding: 12px 11px;
  text-align: left;
  width: 100%;
}
.sidebar-link > span:first-child {
  align-items: center;
  display: flex;
  gap: 9px;
}
.nav-icon {
  color: #8292bb;
  display: inline-block;
  font-size: 16px;
  text-align: center;
  width: 18px;
}
.sidebar-link.active {
  background: linear-gradient(90deg, rgba(84, 113, 238, 0.28), rgba(84, 113, 238, 0.08));
  border-left-color: #7891ff;
  color: #fff;
}
.sidebar-link.active .nav-icon {
  color: #9eb0ff;
}
.sidebar .tab-count {
  background: rgba(255, 255, 255, 0.12);
  color: #dce4fa;
}
.sidebar-note {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 11px;
  bottom: 12px;
  color: #9ca9c7;
  font-size: 11px;
  line-height: 1.45;
  margin: 52px 3px 0;
  padding: 12px;
}
.sidebar-note strong,
.sidebar-note span {
  display: block;
}
.sidebar-note strong {
  color: #dfe6f7;
  font-size: 11px;
  margin-bottom: 3px;
}
.directory-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}
.directory-header h2 {
  margin-bottom: 0;
}
.button,
button {
  appearance: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: 0;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  display: inline-block;
  font: inherit;
  font-weight: 700;
  padding: 11px 17px;
  text-decoration: none;
  transition:
    box-shadow 150ms ease,
    transform 150ms ease,
    opacity 150ms ease;
}
button:not(:disabled):hover,
.button:hover {
  box-shadow: 0 8px 18px rgba(52, 87, 229, 0.2);
  transform: translateY(-1px);
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.button:focus-visible {
  outline: 3px solid rgba(52, 87, 229, 0.2);
  outline-offset: 2px;
}
.danger {
  background: #fff0ef;
  color: #a22c22;
}
.success-button {
  background: #1f8f4c;
  box-shadow: 0 8px 18px rgba(31, 143, 76, 0.22);
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button.secondary {
  background: #edf1fb;
  color: var(--primary-dark);
}
.icon-button {
  background: transparent;
  color: #65718a;
  font-size: 24px;
  line-height: 1;
  padding: 4px 8px;
}
.badge {
  background: #eaf8ef;
  border-radius: 999px;
  color: #176b38;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 10px;
}
.organization-card {
  background: linear-gradient(135deg, #fff 55%, #f2f5ff);
  overflow: hidden;
  position: relative;
}
.organization-card::after {
  border: 28px solid rgba(52, 87, 229, 0.045);
  border-radius: 50%;
  content: '';
  height: 150px;
  position: absolute;
  right: -65px;
  top: -85px;
  width: 150px;
}
.organization-card .section-heading {
  position: relative;
  z-index: 1;
}
.details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.details div {
  background: rgba(246, 248, 252, 0.9);
  border: 1px solid #edf0f6;
  border-radius: 11px;
  padding: 14px;
}
dt {
  color: #65718a;
  font-size: 12px;
  margin-bottom: 4px;
}
dd {
  margin: 0;
  font-weight: 650;
}
.domain-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tabs {
  align-items: center;
  border-bottom: 1px solid #e3e8f1;
  display: flex;
  gap: 8px;
  margin: -24px -24px 20px;
  padding: 14px 24px 0;
}
.directory-card .tabs {
  display: none;
}
.directory-toolbar {
  align-items: end;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 16px;
}
.search-label {
  max-width: 320px;
  width: 100%;
}
.actions-column {
  width: 150px;
}
.table-actions {
  white-space: nowrap;
}
.small-button {
  font-size: 12px;
  padding: 7px 9px;
}
.table-actions .danger {
  margin-left: 6px;
}
.tab {
  background: transparent;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  color: #65718a;
  padding: 10px 12px 12px;
}
.tab.active {
  border-bottom-color: #3157d5;
  color: #2547b7;
}
.tab-count {
  background: #edf1fb;
  border-radius: 999px;
  font-size: 11px;
  margin-left: 4px;
  padding: 3px 7px;
}
.tabs .compact {
  margin-left: auto;
}
.domain {
  background: #f8faff;
  border: 1px solid #dce3ef;
  border-radius: 9px;
  padding: 9px 11px;
}
.prepare-heading {
  align-items: flex-start;
  margin-bottom: 20px;
}
.prepare-heading h2 {
  margin-bottom: 5px;
}
.prepare-heading p:last-child {
  margin-bottom: 0;
}
.step-badge {
  background: #eef1ff;
  border-radius: 999px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 750;
  padding: 7px 10px;
  white-space: nowrap;
}
.generator {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr auto;
  align-items: end;
  gap: 12px;
}
.password-row {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(240px, 420px) auto;
  margin-bottom: 22px;
}
.compact {
  white-space: nowrap;
}
label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
}
input,
select,
textarea {
  background: #fff;
  border: 1px solid #bdc8da;
  border-radius: 10px;
  color: #172033;
  font: inherit;
  padding: 11px 12px;
  width: 100%;
}
input:hover,
select:hover,
textarea:hover {
  border-color: #98a8c4;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(52, 87, 229, 0.09);
  outline: none;
}
textarea {
  background: #fafbfe;
  line-height: 1.55;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  resize: vertical;
}
.action-footer {
  border-top: 1px solid #e8ecf3;
  margin-top: 18px;
  padding-top: 18px;
}
.separator {
  align-items: center;
  color: #7a8599;
  display: flex;
  font-size: 12px;
  gap: 12px;
  margin: 24px 0;
  text-transform: uppercase;
}
.separator::before,
.separator::after {
  background: #dce3ef;
  content: '';
  flex: 1;
  height: 1px;
}
.file-label {
  margin-bottom: 8px;
}
.warning {
  background: #fff7dd;
  border: 1px solid #f2d87a;
  border-radius: 8px;
  color: #6c5100;
  padding: 12px;
}
.confirmation {
  align-items: center;
  display: flex;
  font-weight: 500;
  margin: 18px 0;
}
.confirmation input {
  width: auto;
}
.review-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}
.selection-summary {
  color: #65718a;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.checkbox-column {
  padding-left: 4px;
  padding-right: 4px;
  width: 38px;
}
.checkbox-column input {
  accent-color: #3157d5;
  width: auto;
}
.alert {
  background: #fff1f0;
  border: 1px solid #efb5b0;
  border-radius: 8px;
  color: #8b2119;
  margin-top: 16px;
  padding: 12px;
}
.success {
  color: #176b38;
  font-weight: 700;
}
.failure {
  color: #a22c22;
  font-weight: 700;
}
.table-wrap {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
}
th,
td {
  border-bottom: 1px solid #e3e8f1;
  padding: 11px;
  text-align: left;
}
tbody tr {
  transition: background 120ms ease;
}
tbody tr:hover {
  background: #f8faff;
}
th {
  color: #65718a;
  font-size: 12px;
  text-transform: uppercase;
}
.hidden {
  display: none !important;
}
.modal-backdrop {
  align-items: center;
  backdrop-filter: blur(8px);
  background: rgba(14, 24, 48, 0.55);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 100;
}
.form-modal {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(8, 20, 52, 0.28);
  max-width: 460px;
  padding: 26px;
  width: 100%;
}
.form-modal form {
  display: grid;
  gap: 16px;
}
.toggle-label {
  align-items: center;
  display: flex;
  font-weight: 500;
}
.toggle-label input {
  accent-color: #3157d5;
  width: auto;
}
.creation-modal {
  background: radial-gradient(circle at top right, rgba(71, 105, 232, 0.16), transparent 40%), #fff;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 22px;
  box-shadow: 0 28px 80px rgba(8, 20, 52, 0.28);
  max-width: 460px;
  overflow: hidden;
  padding: 38px;
  text-align: center;
  width: 100%;
}
.modal-visual {
  align-items: center;
  display: flex;
  height: 92px;
  justify-content: center;
  margin: 0 auto 18px;
  position: relative;
  width: 92px;
}
.modal-icon {
  align-items: center;
  background: linear-gradient(135deg, #3157d5, #6d8cff);
  border-radius: 50%;
  box-shadow: 0 12px 30px rgba(49, 87, 213, 0.35);
  color: #fff;
  display: flex;
  font-size: 30px;
  height: 58px;
  justify-content: center;
  width: 58px;
}
.orbit {
  border: 2px solid rgba(49, 87, 213, 0.24);
  border-radius: 50%;
  inset: 4px;
  position: absolute;
}
.orbit::after {
  background: #3157d5;
  border-radius: 50%;
  content: '';
  height: 8px;
  left: 7px;
  position: absolute;
  top: 10px;
  width: 8px;
}
.orbit-one {
  animation: spin 1.7s linear infinite;
}
.orbit-two {
  animation: spin 2.4s linear infinite reverse;
  inset: -4px;
  opacity: 0.5;
}
.creation-modal.complete .orbit {
  animation: none;
  border-color: rgba(31, 143, 76, 0.3);
}
.creation-modal.complete .orbit::after {
  background: #1f8f4c;
}
.creation-modal.complete .modal-icon {
  background: linear-gradient(135deg, #168243, #4fbd7b);
}
.progress-track {
  background: #e6ebf5;
  border-radius: 999px;
  height: 8px;
  margin: 24px 0 0;
  overflow: hidden;
}
.progress-track span {
  animation: progress 1.35s ease-in-out infinite;
  background: linear-gradient(90deg, #3157d5, #829cff);
  border-radius: inherit;
  display: block;
  height: 100%;
  width: 40%;
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 22px;
}
.modal-existing {
  background: #fff7dd;
  border: 1px solid #f2d87a;
  border-radius: 8px;
  color: #6c5100;
  font-size: 13px;
  margin: 16px 0 0;
  overflow-wrap: anywhere;
  padding: 10px;
}
#view-results {
  margin-top: 22px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes progress {
  from {
    transform: translateX(-110%);
  }
  to {
    transform: translateX(360%);
  }
}
@media (max-width: 980px) {
  .container {
    width: min(100% - 32px, 900px);
  }
  .workspace-layout {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 16px;
  }
  .overview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .generator {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 720px) {
  .overview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .workspace-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 8px;
    position: static;
    min-height: auto;
  }
  .sidebar-heading,
  .sidebar-note {
    display: none;
  }
  .sidebar-link {
    border-bottom: 3px solid transparent;
    border-left: 0;
    justify-content: center;
    white-space: nowrap;
  }
  .sidebar-link.active {
    border-bottom-color: #3157d5;
    border-left: 0;
  }
  .generator,
  .password-row,
  .details {
    grid-template-columns: 1fr;
  }
  header,
  .section-heading,
  .directory-toolbar,
  .review-actions {
    align-items: flex-start;
    flex-direction: column;
  }
  .app-header {
    align-items: flex-start;
  }
  .brand-mark {
    height: 44px;
    width: 44px;
  }
  .card {
    padding: 20px;
  }
}
@media (max-width: 440px) {
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .container {
    width: min(100% - 20px, 420px);
    margin-top: 20px;
  }
  .brand-mark {
    display: none;
  }
  .sidebar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
  .sidebar-link {
    font-size: 12px;
    padding-inline: 7px;
  }
  .nav-icon {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .orbit,
  .progress-track span {
    animation-duration: 4s;
  }
}

.mailbox-options {
  border: 1px solid #dedbd5;
  padding: 18px;
  margin: 16px 0;
  display: grid;
  gap: 14px;
  min-width: 0;
}
.mailbox-options .mailbox-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mailbox-options .mailbox-checkbox input {
  width: 16px;
  height: 16px;
  margin: 0;
  flex: 0 0 16px;
}
.mailbox-profile {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
