/* SEIDOS modal — native <dialog>, scoped to SEIDOS tokens.
   No Bootstrap dependency, no jQuery, native focus-trap from the browser. */

.modal {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  max-width: min(560px, calc(100vw - 32px));
  width: 100%;
  font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  font-size: 13.5px;
}

.modal::backdrop {
  background: rgba(20, 17, 12, 0.40);
  backdrop-filter: blur(2px);
}

/* Inner card */
.modal .sm-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 24px 48px rgba(20, 17, 12, 0.18), 0 4px 12px rgba(20, 17, 12, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal .sm-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.modal .sm-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  flex: 1;
}
.modal .sm-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  cursor: pointer;
  transition: all 120ms;
  font-family: inherit;
}
.modal .sm-close:hover { background: var(--surface-2); color: var(--text); }

.modal .sm-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: calc(100vh - 220px);
  overflow-y: auto;
}

.modal .sm-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.modal .sm-foot .spacer { flex: 1; }

/* Form fields inside the modal */
.modal .sm-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.modal .sm-field label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
}
.modal .sm-field input[type="text"],
.modal .sm-field input[type="number"],
.modal .sm-field input[type="email"],
.modal .sm-field input[type="password"],
.modal .sm-field select,
.modal .sm-field textarea {
  height: 32px;
  padding: 0 10px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 120ms, box-shadow 120ms;
}
.modal .sm-field textarea {
  height: auto;
  min-height: 64px;
  padding: 8px 10px;
  resize: vertical;
}
.modal .sm-field input:focus,
.modal .sm-field select:focus,
.modal .sm-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

/* Modal buttons */
.modal .sm-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 120ms;
}
.modal .sm-btn:hover {
  background: var(--surface);
  border-color: var(--text-3);
}
.modal .sm-btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.modal .sm-btn-primary:hover {
  filter: brightness(1.06);
  background: var(--accent);
}
.modal .sm-btn-danger {
  background: oklch(0.55 0.18 25);
  color: #fff;
  border-color: oklch(0.55 0.18 25);
}
.modal .sm-btn-danger:hover { filter: brightness(1.06); }

.modal .sm-hint {
    margin: 0;
    font-size: 11.5px;
    color: var(--text-3);
}
