/* ── NewYard SSL Checker ────────────────────────────────────────────────── */

#nysc-wrapper {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #414141;
  max-width: 900px;
  margin: 0 auto;
}

/* Form card */
#nysc-form-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 32px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

#nysc-form-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
  color: #196290;
}

#nysc-form-card > p {
  margin: 0 0 24px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

.nysc-field {
  margin-bottom: 18px;
}

.nysc-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.nysc-optional {
  font-weight: 400;
  color: #94a3b8;
  font-size: 12px;
}

.nysc-field input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 14px;
  color: #1e293b;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.nysc-field input:focus {
  outline: none;
  border-color: #196290;
  box-shadow: 0 0 0 3px rgba(25,98,144,0.1);
}

#nysc-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #196290;
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

#nysc-submit:hover { background: #144f77; }
#nysc-submit:disabled { opacity: 0.7; cursor: default; }

/* Spinner */
.nysc-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: nysc-spin 0.7s linear infinite;
}

@keyframes nysc-spin { to { transform: rotate(360deg); } }

/* Messages */
#nysc-message {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
}

.nysc-msg-success { background: #f0fdf4; color: #166534; border-left: 4px solid #22c55e; }
.nysc-msg-error   { background: #fff5f5; color: #b91c1c; border-left: 4px solid #ef4444; }

/* ── Results ──────────────────────────────────────────────────────────── */

#nysc-results {
  margin-top: 28px;
}

.nysc-results-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Summary bar */
.nysc-summary-bar {
  display: flex;
  gap: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 20px 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.nysc-stat {
  flex: 1;
  text-align: center;
}

.nysc-stat-value {
  font-size: 30px;
  font-weight: 700;
  color: #196290;
  line-height: 1;
}

.nysc-stat-label {
  font-size: 11px;
  color: #64748b;
  margin-top: 6px;
}

/* Alerts */
.nysc-alert {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 20px 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.nysc-alert-danger  { border-left: 5px solid #ef4444; }
.nysc-alert-warning { border-left: 5px solid #ffb700; }
.nysc-alert-info    { border-left: 5px solid #009ee2; }

.nysc-alert-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #1e293b;
}

.nysc-alert p {
  font-size: 13px;
  color: #414141;
  line-height: 1.6;
  margin: 0 0 12px;
}

.nysc-small {
  font-size: 11px !important;
  color: #64748b !important;
}

/* Wildcard groups */
.nysc-wildcard-group {
  background: #fff5f5;
  border-left: 4px solid #ef4444;
  border-radius: 0 6px 6px 0;
  padding: 12px 16px;
  margin-bottom: 10px;
}

.nysc-wildcard-name {
  font-size: 13px;
  font-weight: 700;
  color: #ef4444;
  margin-bottom: 4px;
}

.nysc-wildcard-hosts {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 8px;
}

.nysc-wildcard-advice {
  font-size: 12px;
  color: #414141;
}

/* Expiry rows */
.nysc-expiry-row {
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.nysc-expiry-critical { background: #fff5f5; color: #b91c1c; }
.nysc-expiry-warn     { background: #fffbeb; color: #92400e; }

/* Management table */
.nysc-mgmt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 12px 0;
}

.nysc-mgmt-table th,
.nysc-mgmt-table td {
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  text-align: left;
}

.nysc-mgmt-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #64748b;
}

.nysc-highlight-row {
  background: #fff5f5;
}

/* Subdomein tabel */
.nysc-table-section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 20px 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.nysc-section-title {
  font-size: 15px;
  font-weight: 700;
  color: #196290;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #009ee2;
}

.nysc-table-wrap {
  overflow-x: auto;
}

.nysc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.nysc-table th {
  background: #f8fafc;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
}

.nysc-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.nysc-table tr:last-child td { border-bottom: none; }
.nysc-table tr:hover td { background: #f8fafc; }

.nysc-row-inactive td { color: #94a3b8; }

.nysc-hostname { font-weight: 600; color: #196290; }
.nysc-issuer   { font-size: 12px; color: #64748b; }
.nysc-bold     { font-weight: 700; }

/* Badges */
.nysc-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

.nysc-badge-red   { background: #ef4444; color: #fff; }
.nysc-badge-green { background: #22c55e; color: #fff; }
.nysc-badge-gray  { background: #e2e8f0; color: #64748b; }

/* Colors */
.nysc-green  { color: #22c55e; }
.nysc-orange { color: #f59e0b; }
.nysc-red    { color: #ef4444; }

/* Link */
.nysc-link {
  color: #196290;
  font-size: 12px;
  text-decoration: none;
}

.nysc-link:hover { text-decoration: underline; }

/* Toggle inactive button */
.nysc-toggle-inactive {
  background: none;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  color: #64748b;
  font-size: 12px;
  padding: 4px 12px;
  cursor: pointer;
  margin-top: 12px;
}
.nysc-toggle-inactive:hover { background: #f8fafc; }

/* ── Responsive ───────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  #nysc-form-card { padding: 20px; }

  .nysc-summary-bar {
    flex-wrap: wrap;
  }

  .nysc-stat {
    flex: 0 0 calc(50% - 6px);
  }
}
