.primary-button,
.secondary-button,
.ghost-button,
.danger-action-button,
.danger-button,
button:not(.nav-item):not(.mobile-menu-toggle):not(.icon-button) {
  min-height: 44px;
  border-radius: 13px;
  font-weight: 800;
}

.primary-button,
button.primary-button {
  border: 1px solid rgba(15, 126, 168, 0.2);
  color: #fff;
  background: linear-gradient(135deg, var(--cm-primary), var(--cm-accent));
  box-shadow: 0 12px 24px rgba(15, 126, 168, 0.22);
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(15, 126, 168, 0.28);
}

.primary-button:active,
.secondary-button:active,
.ghost-button:active,
button:active {
  transform: translateY(1px) scale(0.99);
}

.secondary-button,
.ghost-button {
  border: 1px solid var(--cm-border);
  color: var(--cm-text);
  background: #fff;
}

.secondary-button:hover,
.ghost-button:hover {
  color: var(--cm-primary-dark);
  border-color: rgba(15, 126, 168, 0.28);
  background: var(--cm-accent-soft);
}

.danger-action-button,
.danger-button {
  color: #fff;
  background: linear-gradient(135deg, #DC2626, #F97316);
  border: 1px solid rgba(220, 38, 38, 0.16);
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-height: 42px;
  border-radius: 13px;
  color: var(--cm-soft-text);
  background: #EEF4F8;
  border: 1px solid transparent;
}

.icon-button:hover {
  color: var(--cm-primary-dark);
  background: var(--cm-accent-soft);
}

.card,
.feature-card,
.step-card,
.stat-card,
.metric-card,
.post-card,
.person-card,
.member-card,
.company-card,
.project-card,
.pricing-card,
.booking-card,
.message-card,
.chat-card,
.crm-card,
.report-card,
.tool-card,
.panel,
.section-card,
.dashboard-card,
.admin-card,
.mini-item,
.template-box p,
.policy-content,
.support-card,
.empty-state {
  border-color: var(--cm-border) !important;
  border-radius: var(--cm-radius) !important;
  background: var(--cm-card);
  box-shadow: var(--cm-shadow-sm);
  transition: transform var(--cm-transition), box-shadow var(--cm-transition),
    border-color var(--cm-transition), background-color var(--cm-transition);
}

.card:hover,
.feature-card:hover,
.step-card:hover,
.stat-card:hover,
.metric-card:hover,
.post-card:hover,
.person-card:hover,
.member-card:hover,
.company-card:hover,
.project-card:hover,
.pricing-card:hover,
.booking-card:hover,
.message-card:hover,
.chat-card:hover,
.crm-card:hover,
.report-card:hover,
.tool-card:hover,
.panel:hover,
.section-card:hover,
.dashboard-card:hover,
.admin-card:hover {
  border-color: rgba(15, 126, 168, 0.24) !important;
  transform: translateY(-3px);
  box-shadow: var(--cm-shadow);
}

.stat-card strong,
.metric-card strong,
.hero-panel strong,
.dashboard-card strong {
  color: var(--cm-primary-dark);
  font-size: clamp(30px, 3vw, 44px);
  font-weight: 900;
  animation: cm-count-pop 0.48s ease both;
}

@keyframes cm-count-pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

input:not([type="checkbox"]):not([type="radio"]),
textarea,
select {
  min-height: 52px;
  border: 1px solid var(--cm-border-strong);
  border-radius: 12px;
  color: var(--cm-text);
  background: #fff;
  padding: 12px 14px;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.02);
}

input:not([type="checkbox"]):not([type="radio"])::placeholder,
textarea::placeholder {
  color: #94A3B8;
  font-weight: 500;
}

input:not([type="checkbox"]):not([type="radio"]):focus,
textarea:focus,
select:focus {
  border-color: var(--cm-primary);
  box-shadow: var(--cm-focus);
}

textarea {
  line-height: 1.7;
  resize: vertical;
}

input[type="checkbox"] {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--cm-primary);
}

.signup-consent {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--cm-border);
  border-radius: 14px;
  background: #F8FBFD;
}

.signup-consent label,
.check-row,
.checkbox-row,
.agreement-row,
.terms-row,
label:has(> input[type="checkbox"]) {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  min-height: 34px;
  font-weight: 700;
  line-height: 1.35;
}

dialog {
  width: min(590px, calc(100vw - 28px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 18px;
  padding: 0;
  background: #fff;
  box-shadow: var(--cm-shadow-lg);
  animation: cm-dialog-in 0.22s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

dialog::backdrop {
  background: rgba(7, 24, 39, 0.52);
  backdrop-filter: blur(6px);
  animation: cm-backdrop-in 0.18s ease both;
}

.dialog-form {
  padding: 28px;
  gap: 16px;
}

.dialog-header {
  align-items: center;
  padding-bottom: 4px;
}

.dialog-header h2 {
  font-size: 24px;
  font-weight: 900;
}

.dialog-form label {
  color: var(--cm-text);
  font-weight: 800;
}

.dialog-actions {
  gap: 10px;
  align-items: center;
}

.badge,
.tag,
.pill,
.status-badge,
.plan-badge {
  border-radius: 999px;
  border: 1px solid rgba(15, 126, 168, 0.14);
  color: var(--cm-primary-dark);
  background: var(--cm-accent-soft);
  font-weight: 800;
}

.toast {
  border-radius: 16px;
  box-shadow: var(--cm-shadow);
}

.loading-overlay {
  backdrop-filter: blur(4px);
}

.spinner,
[aria-busy="true"]::after,
.is-loading::after {
  border-color: rgba(15, 126, 168, 0.18);
  border-top-color: var(--cm-primary);
}

@keyframes cm-dialog-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes cm-backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .hero,
  .landing-hero,
  .card,
  .post-card,
  .person-card,
  .member-card,
  .booking-card,
  .message-card,
  .pricing-card {
    border-radius: 18px !important;
  }

  dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }

  .dialog-form {
    padding: 20px;
  }

  .dialog-actions {
    position: sticky;
    bottom: -20px;
    z-index: 2;
    margin: 0 -20px -20px;
    padding: 14px 20px 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), #fff 45%);
  }

  .dialog-actions button {
    flex: 1;
  }
}
