/**
 * Algo Forms admin — professional product shell.
 */

.algo-forms-admin {
  --af-ink: #1c2430;
  --af-muted: #5b6675;
  --af-line: #e6ebf0;
  --af-white: #ffffff;
  --af-sky: #5a8fb0;
  --af-mint: #6a9eb8;
  --af-peach: #7eb8d8;
  --af-lavender: #6d8fa8;
  --af-rose: #5a8fb0;
  --af-radius: 12px;
  --af-shadow: 0 1px 2px rgba(28, 36, 48, 0.04);
  max-width: 1180px;
  margin: 1.25rem 1.25rem 2.5rem 0;
  color: var(--af-ink);
}

.algo-forms-admin .af-shell {
  display: grid;
  gap: 1.25rem;
}

.algo-forms-admin .af-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  border-radius: var(--af-radius);
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--af-line);
  background: #fff;
  box-shadow: var(--af-shadow);
}

.algo-forms-admin .af-hero-main {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  min-width: 0;
  flex: 1 1 auto;
}

.algo-forms-admin .af-logo {
  flex: 0 0 auto;
  display: inline-flex;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--af-line);
  background: #fff;
}

.algo-forms-admin .af-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.algo-forms-admin .af-hero-copy {
  min-width: 0;
}

.algo-forms-admin .af-product-name {
  margin: 0;
  font-size: clamp(1.45rem, 2vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--af-ink);
  line-height: 1.2;
}

.algo-forms-admin .af-page-title {
  margin: 0.2rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #3d4a5c;
  line-height: 1.3;
}

.algo-forms-admin .af-hero-sub {
  margin: 0.4rem 0 0;
  max-width: 40rem;
  color: var(--af-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  font-weight: 400;
}

.algo-forms-admin .af-hero-meta {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding-top: 0.15rem;
}

.algo-forms-admin .af-powered {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.algo-forms-admin .af-powered-label {
  color: #8a93a0;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.algo-forms-admin .af-powered-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}

.algo-forms-admin .af-powered-logo img {
  display: block;
  height: 16px;
  width: auto;
  max-width: 100px;
}

.algo-forms-admin .af-powered-text {
  color: #2c358f;
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
}

.algo-forms-admin .af-powered-logo:hover,
.algo-forms-admin .af-powered-text:hover {
  opacity: 0.85;
}

@media (max-width: 782px) {
  .algo-forms-admin .af-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .algo-forms-admin .af-hero-meta {
    padding-top: 0;
  }
}

.algo-forms-admin .af-body {
  display: grid;
  gap: 1.25rem;
}

.algo-forms-admin .af-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.9rem;
}

.algo-forms-admin .af-stat {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border-radius: var(--af-radius);
  border: 1px solid rgba(36, 50, 71, 0.06);
  background: #fff;
  box-shadow: var(--af-shadow);
}

.algo-forms-admin .af-stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 14px;
  flex: 0 0 auto;
}

.algo-forms-admin .af-stat-icon .af-icon {
  fill: currentColor;
}

.algo-forms-admin .af-stat--forms .af-stat-icon {
  background: rgba(168, 200, 228, 0.42);
  color: #4a6f8a;
}

.algo-forms-admin .af-stat--inbox .af-stat-icon {
  background: rgba(184, 212, 236, 0.45);
  color: #5a8fb0;
}

.algo-forms-admin .af-stat--week .af-stat-icon {
  background: rgba(197, 220, 240, 0.5);
  color: #3a5a72;
}

.algo-forms-admin .af-stat--smtp-ok .af-stat-icon {
  background: rgba(168, 200, 228, 0.42);
  color: #4a6f8a;
}

.algo-forms-admin .af-stat--smtp-warn .af-stat-icon {
  background: rgba(184, 212, 236, 0.45);
  color: #5a8fb0;
}

.algo-forms-admin .af-stat-label {
  margin: 0;
  color: var(--af-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.algo-forms-admin .af-stat-value {
  margin: 0.15rem 0 0;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.algo-forms-admin .af-stat-value--text {
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.algo-forms-admin .af-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.85rem;
}

.algo-forms-admin .af-action {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.05rem;
  border-radius: var(--af-radius);
  border: 1px solid rgba(36, 50, 71, 0.06);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--af-shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.algo-forms-admin .af-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(36, 50, 71, 0.1);
  color: inherit;
}

.algo-forms-admin .af-action strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.algo-forms-admin .af-action em {
  display: block;
  margin-top: 0.15rem;
  font-style: normal;
  color: var(--af-muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.algo-forms-admin .af-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 13px;
  flex: 0 0 auto;
}

.algo-forms-admin .af-action-icon .af-icon {
  fill: currentColor;
}

.algo-forms-admin .af-action--mint,
.algo-forms-admin .af-action--sky,
.algo-forms-admin .af-action--peach,
.algo-forms-admin .af-action--lavender,
.algo-forms-admin .af-action--rose {
  background: #fff;
}

.algo-forms-admin .af-action--mint .af-action-icon {
  background: #eaf3fa;
  color: #4a6f8a;
}

.algo-forms-admin .af-action--sky .af-action-icon {
  background: #e8f2f8;
  color: #5a8fb0;
}

.algo-forms-admin .af-action--peach .af-action-icon {
  background: #eef5fb;
  color: #6a9eb8;
}

.algo-forms-admin .af-action--lavender .af-action-icon {
  background: #eaf3fa;
  color: #3a5a72;
}

.algo-forms-admin .af-action--rose .af-action-icon {
  background: #e8f2f8;
  color: #5a8fb0;
}

.algo-forms-admin .af-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}

@media (min-width: 960px) {
  .algo-forms-admin .af-grid-2 {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

.algo-forms-admin .af-panel {
  background: var(--af-white);
  border: 1px solid rgba(36, 50, 71, 0.06);
  border-radius: var(--af-radius);
  box-shadow: var(--af-shadow);
  padding: 1.15rem 1.25rem 1.25rem;
}

.algo-forms-admin .af-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.algo-forms-admin .af-panel-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.algo-forms-admin .af-panel-head a {
  color: #4a6f8a;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
}

.algo-forms-admin .af-panel-head a:hover {
  color: #243247;
}

.algo-forms-admin .af-form-list,
.algo-forms-admin .af-recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.algo-forms-admin .af-form-list li,
.algo-forms-admin .af-recent-list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  background: #f7fafc;
  border: 1px solid #e8eef5;
}

.algo-forms-admin .af-form-list-main,
.algo-forms-admin .af-recent-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.algo-forms-admin .af-form-list-icon,
.algo-forms-admin .af-recent-icon,
.algo-forms-admin .af-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 11px;
  background: rgba(142, 184, 216, 0.25);
  color: #4a6f8a;
  flex: 0 0 auto;
}

.algo-forms-admin .af-form-list-icon .af-icon,
.algo-forms-admin .af-recent-icon .af-icon,
.algo-forms-admin .af-status-icon .af-icon {
  fill: currentColor;
  width: 18px;
  height: 18px;
}

.algo-forms-admin .af-form-list strong,
.algo-forms-admin .af-recent-list strong {
  display: block;
  font-size: 0.92rem;
}

.algo-forms-admin .af-form-list code {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  background: #fff;
  border: 1px solid #e4ebf4;
  border-radius: 6px;
  padding: 0.15rem 0.4rem;
}

.algo-forms-admin .af-form-list-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  color: var(--af-muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.algo-forms-admin .af-recent-list p {
  margin: 0.2rem 0;
  color: var(--af-muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.algo-forms-admin .af-recent-list time {
  color: #7b8798;
  font-size: 0.75rem;
}

.algo-forms-admin .af-empty {
  padding: 1.25rem 0.5rem;
  text-align: center;
  color: var(--af-muted);
}

.algo-forms-admin .af-status-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 800px) {
  .algo-forms-admin .af-status-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.algo-forms-admin .af-status-card {
  display: flex;
  gap: 0.85rem;
  padding: 1rem 1.05rem;
  border-radius: 14px;
  border: 1px solid #e8eef5;
  background: #f8fafc;
}

.algo-forms-admin .af-status-card.is-ok {
  background: #f2faf7;
  border-color: #cfe8e2;
}

.algo-forms-admin .af-status-card.is-ok .af-status-icon {
  background: rgba(142, 207, 196, 0.35);
  color: #5a8fb0;
}

.algo-forms-admin .af-status-card.is-warn {
  background: #fdf6f2;
  border-color: #f0d8ce;
}

.algo-forms-admin .af-status-card.is-warn .af-status-icon {
  background: rgba(224, 160, 144, 0.32);
  color: #a86b56;
}

.algo-forms-admin .af-status-card.is-info .af-status-icon {
  background: rgba(183, 168, 212, 0.3);
  color: #6d5f8f;
}

.algo-forms-admin .af-status-card strong {
  display: block;
  margin-bottom: 0.25rem;
}

.algo-forms-admin .af-status-card p {
  margin: 0 0 0.45rem;
  color: var(--af-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.algo-forms-admin .af-status-card a {
  color: #4a6f8a;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.86rem;
}

.algo-forms-admin .af-status-card a:hover {
  color: #243247;
}

.algo-forms-admin .form-table th {
  color: var(--af-ink);
  font-weight: 700;
}

.algo-forms-admin .notice {
  border-radius: 12px;
}

.algo-forms-admin .wp-list-table {
  border-radius: 14px;
  overflow: hidden;
  border-color: #e4ebf4;
  box-shadow: var(--af-shadow);
}

.algo-forms-admin .algo-company-recipients-card {
  border-left: 0 !important;
}

/* Soften WP admin chrome inside our shell */
.algo-forms-admin h1.wp-heading-inline,
.algo-forms-admin .page-title-action {
  display: none;
}

.algo-forms-admin .af-pro-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #d4a0b0, #b7a8d4);
  color: #3a2f4a;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
}

.algo-forms-admin .af-pro-upsell {
  text-align: center;
  padding: 2rem 1.5rem;
}

.algo-forms-admin .af-pro-upsell-icon {
  display: inline-flex;
  width: 3rem;
  height: 3rem;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(183, 168, 212, 0.28);
  color: #6d5f8f;
  margin-bottom: 0.75rem;
}

.algo-forms-admin .af-pro-upsell-icon .af-icon {
  fill: currentColor;
}

.algo-forms-admin .af-pro-list {
  text-align: left;
  max-width: 28rem;
  margin: 1.25rem auto 0;
  padding-left: 1.2rem;
  color: var(--af-muted);
  line-height: 1.6;
}

.algo-forms-admin .af-log-status {
  display: inline-flex;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 750;
}

.algo-forms-admin .af-log-status--sent {
  background: #e7f7f1;
  color: #5a8fb0;
}

.algo-forms-admin .af-log-status--failed {
  background: #fdf0ea;
  color: #a86b56;
}

.algo-forms-admin tr.af-row-unread td {
  font-weight: 650;
  background: #fffaf7;
}
