/* ── Model Settings Layout ────────────────────────────────── */
.ms-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--paper-200);
  overflow-y: auto;
}

.ms-nav {
  height: 52px;
  background: var(--ink-900);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 24px;
  flex-shrink: 0;
}

.ms-nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 400;
  font-size: 15px;
  text-decoration: none;
}
.ms-nav-logo span {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
}

.admin-logo-mark {
  width: 30px;
  height: 30px;
  background: var(--lime-300);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 17px;
  font-weight: 400;
  color: var(--ink-900);
}

.ms-nav-title {
  color: var(--ink-300);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
}

.ms-nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-400);
  font-size: 13px;
}

/* ── Container ───────────────────────────────────────────── */
.ms-container {
  max-width: 640px;
  margin: 32px auto;
  padding: 0 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Cards ───────────────────────────────────────────────── */
.ms-card {
  background: var(--paper-100);
  border: 1px solid var(--ink-200);
  border-radius: var(--r-lg);
  padding: 24px;
}

.ms-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.ms-card-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-900);
}

.ms-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--r-full);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.ms-badge.platform {
  background: var(--blue);
  color: #fff;
}
.ms-badge.custom {
  background: var(--green);
  color: #fff;
}

.ms-muted {
  color: var(--ink-500);
  font-size: 13px;
  line-height: 1.5;
}
.ms-desc {
  color: var(--ink-600);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* ── Info Grid ───────────────────────────────────────────── */
.ms-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ms-info-item {
  background: var(--paper-200);
  padding: 10px 14px;
  border-radius: var(--r-md);
}
.ms-info-item label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-400);
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-bottom: 4px;
}
.ms-info-item span {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-800);
}

.ms-key-masked {
  font-family: var(--font-mono);
  letter-spacing: 2px;
}
.ms-no-limit {
  color: var(--green) !important;
}

/* ── Form ────────────────────────────────────────────────── */
#ms-form .form-group select {
  width: 100%;
  padding: 11px 40px 11px 14px;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-md);
  font-family: var(--font);
  font-size: 14px;
  color: var(--ink-900);
  background: var(--ink-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: all .15s;
}
#ms-form .form-group select:focus {
  outline: none;
  border-color: var(--lime-500);
  box-shadow: 0 0 0 3px rgba(168,204,42,.15);
  background-color: #fff;
}
#ms-form .form-group select:disabled {
  opacity: .5;
  cursor: not-allowed;
}
#ms-form .form-group select option {
  padding: 8px;
}

.ms-form-actions {
  margin-top: 20px;
}

.ms-key-hint {
  font-size: 11px;
  color: var(--ink-400);
  margin-top: 6px;
  line-height: 1.4;
}

.ms-success {
  background: color-mix(in srgb, var(--green), transparent 90%);
  color: var(--green);
  padding: 10px 14px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 600;
  margin-top: 12px;
}

/* ── Help Card ───────────────────────────────────────────── */
.ms-card-help {
  background: var(--paper-100);
  border-color: var(--ink-200);
}
.ms-card-help h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-700);
  margin-bottom: 12px;
}
.ms-help-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ms-help-list li {
  font-size: 12px;
  color: var(--ink-600);
  line-height: 1.6;
  padding: 6px 0;
  border-bottom: 1px solid var(--ink-100);
}
.ms-help-list li:last-child {
  border-bottom: none;
}
.ms-help-list li strong {
  color: var(--ink-800);
}
