@import url('https://fonts.googleapis.com/css2?family=Cal+Sans&family=Manrope:wght@200..800&display=swap');

/* M2M Affiliates Portal (Light, simple, card-based) */
body.m2m-aff-page {
  background: #f5f5f5 !important;
  color: #111 !important;
}

.m2m-aff-wrap {
  max-width: 100%;
  font-size: 16px;
  font-family: "Manrope", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.m2m-card {
  background: #fff;
  border: 1px solid #e3e3e38c;
  border-radius: 14px;
  padding: 25px;
  box-shadow: 0 2px 10px rgb(0 0 0 / 5%);
}

.m2m-affiliate-dashboard {
  display: flex;
  min-height: 100vh;
}

.m2m-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.m2m-col {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
}

.m2m-col>.m2m-card {
  flex: 1;
}

.m2m-h1 {
  font-family: "Cal Sans", sans-serif;
  font-size: 30px;
  margin: 0 0 4px 0;
}

.m2m-h2 {
  font-family: "Cal Sans", sans-serif;
  font-size: 24px;
  margin: 0 0 10px 0;
}

.m2m-muted {
  color: #666;
  font-size: 15px;
  line-height: 1.35;
}

.m2m-tabs {
  display: flex;
  gap: 8px;
  padding: 20px 10px 20px 10px;
  flex-direction: column;
  min-width: 230px;
  justify-content: space-between;
  background: #fff;
  border-right: 1px solid #f1f1f1;
}

.m2m-tabs div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
}

.m2m-tab {
  background: transparent !important;
  color: #627483 !important;
  border: none;
  width: 100%;
  text-align: left;
  padding: 12px 24px !important;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px !important;
  border-radius: 100px !important;
  text-decoration: none !important;
  cursor: pointer !important;
  font-family: "Manrope", sans-serif !important;
}

.m2m-tab:hover {
  background: #f1f1f1 !important;
  color: #404040 !important;
}

.m2m-tab.active,
.m2m-tab:focus {
  background: #0069e1 !important;
  color: #fff !important;
}

.m2m-profile-wrapper {
  display: flex;
  gap: 60px;
}

.m2m-profile-wrapper .m2m-modal-content {
  flex: 60%;
}

.m2m-profile-wrapper .m2m-field {
  margin-bottom: 20px;
}

.m2m-user-info-wrapper {
  flex: 40%;
}

.m2m-field {
  margin: 12px 0;
}

div.m2m-tab-content {
  flex: 1;
  padding: 30px;
  background: #ffffffe3;
  overflow-y: auto;
  max-height: 100vh;
}

.m2m-btn.apply-filter-btn {
  padding: 8px 24px !important;
  font-size: 14px !important;
}

.m2m-save-paypal-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.m2m-field label {
  display: block;
  margin: 0 0 6px 0;
  font-size: 14px;
}

.m2m-field input,
.m2m-field select {
  width: 100%;
  border: 1px solid #d1d5db;
  font-size: 14px;
  background: #fff;
  color: #111;
  padding: 14px;
  border-radius: 100px;
  outline: none;
}

.m2m-field input:focus-visible,
.m2m-field select:focus-visible {
  outline: none;
}

.m2m-field input:focus,
.m2m-field select:focus {
  border-color: transparent;
  background-color: #0000000f;
}

.m2m-field input[readonly] {
  color: #666;
  overflow: hidden;
  white-space: nowrap;
  /* text-overflow: ellipsis; */
  border: none;
  padding: 0;
  max-width: 220px;
}

.m2m-field input[readonly]:focus {
  background: none;
}

.m2m-remember {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
}

.m2m-forgot-pass {
  display: flex;
  justify-content: flex-end;
  margin-top: -8px;
}

.m2m-forgot-pass button {
  font-size: 12px !important;
}

.m2m-field-full input {
  width: 100%;
}

.edit-code-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.m2m-copy-wrapper {
  margin-bottom: 15px;
  background: transparent;
  width: 70%;
  display: flex;
  align-items: center;
}

.m2m-save-code-wrapper {
  border-radius: 20px;
  border: 1px solid #d1d5db;
  padding: 0px 20px 0px 0px;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 200px;
}

#m2m-save-code-btn {
  display: flex;
  align-items: center;
  gap: 2px;
}

.m2m-save-code-wrapper input {
  border: none;
  border-radius: 20px;
  background: white !important;
  padding: 10px 20px;
}

.m2m-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 10px;
}

.m2m-date-field {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
}

.m2m-date-input {
  padding: 10px;
  border: 1px solid #d1d5db !important;
  border-radius: 10px !important;
  font-size: 14px;
}

#m2m-current-code {
  color: #666;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  margin-left: 4px;
  padding: 4px 8px;
}

.m2m-code-edit-wrapper {
  color: #666;
  font-size: 16px;
  line-height: 1.35;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.m2m-code-edit {
  background: #fff;
  padding: 20px 30px;
  border-radius: 20px;
}

.m2m-btn.secondary {
  background-color: transparent !important;
  color: #00000099 !important;
  border-color: #00000038;
}

.m2m-btn.secondary:hover {
  background-color: #00000014 !important;
  border-color: #0000001c;
}

.m2m-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.m2m-code-status {
  width: 12px;
  height: 12px;
}

.m2m-btn-link {
  background: none !important;
  border: none;
  font-family: 'Manrope', sans-serif !important;
  color: #0069E1 !important;
  cursor: pointer !important;
  padding: 0 !important;
  font-size: 14px !important;
}

.m2m-btn-link:hover {
  color: #1d4ed8;
  background: none;
}

.m2m-copy-butn {
  display: flex;
  gap: 5px;
  margin-left: 12px;
}

.m2m-kpis {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.m2m-kpi {
  flex: 1;
  min-width: 200px;
  padding: 14px;
  border-radius: 12px;
  background: #0069e11f;
  color: #0069e1 !important;
}

.m2m-kpi:nth-child(2) {
  background: #00a32a1c;
  color: #00a32a !important;
}

.m2m-kpi:nth-child(3) {
  background: #d636381c;
  color: #d63638 !important;
}

.m2m-kpi .v {
  font-size: 28px;
  font-family: 'Cal Sans', sans-serif;
  margin-top: 4px;
}

.m2m-alert {
  padding: 10px 12px;
  border-radius: 10px;
  margin: 12px 0;
  font-size: 14px;
}

.m2m-alert.ok {
  background: #ecfdf5;
  border: 1px solid #10b981;
  color: #065f46;
}

.m2m-alert.err {
  background: #fef2f2;
  border: 1px solid #ef444426;
  color: #7f1d1d;
}

.m2m-table {
  width: 100%;
  border-collapse: collapse;
}

.m2m-table th,
.m2m-table td {
  padding: 10px;
  border-bottom: 1px solid #eee;
  text-align: left;
  font-size: 14px;
  color: #111;
}

.m2m-sortable-aff th.sortable-aff {
  cursor: pointer;
  user-select: none;
  position: relative;
}

.m2m-sortable-aff th.sortable-aff:hover {
  background: #f9fafb;
}

.m2m-sortable-aff th.sortable-aff:after {
  content: '⇅';
  margin-left: 4px;
  opacity: 0.3;
  font-size: 12px;
}

.m2m-sortable-aff th.sorted-asc:after {
  content: '↑';
  opacity: 1;
}

.m2m-sortable-aff th.sorted-desc:after {
  content: '↓';
  opacity: 1;
}

.m2m-canvas {
  width: 100%;
  height: 260px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
}

.user-info {
  margin-top: 8px;
  display: flex;
  gap: 10px;
}

.user-info .basic-tab {
  font-weight: 700;
}

.user-info p {
  margin: 0;
}

/* Modal Styles */
.m2m-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
}

.col-chk-affiliate.m2m-card {
  margin-bottom: 20px;
}

.m2m-actions a.m2m-btn.log_out {
  width: 100%;
  border: none;
  color: #d63638 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  padding: 10px 22px !important;
  background-color: #d6363817 !important;
  display: flex;
  align-items: center;
  gap: 10px;
}

.m2m-actions a.m2m-btn.log_out:hover {
  background-color: #d6363826 !important;
  color: #d63638;
}

.m2m-btn {
  height: auto;
  background-color: #0069E1 !important;
  border: 1px solid #0069E1;
  padding: 12px 30px !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  position: unset;
  border-radius: 100px !important;
  text-decoration: none;
  cursor: pointer !important;
  font-family: 'Manrope' !important;
}

.m2m-btn:hover {
  background-color: #051268 !important;
  border-color: #051268;
}

.m2m-btn.loading {
  position: relative !important;
  color: transparent !important;
  pointer-events: none;
  min-width: 100px;
  padding-right: 60px;
}

.m2m-btn.loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: m2m-spin 0.6s linear infinite;
  z-index: 10;
}

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

button.m2m-tab svg {
  stroke: #627483;
}

button.m2m-tab:hover svg {
  stroke: #404040;
}

button.m2m-tab.active svg,
button.m2m-tab:focus svg {
  stroke: #fff;
}

.m2m-actions a.m2m-btn.secondary svg {
  stroke: #d63638;
}

.m2m-user-info {
  display: flex !important;
  align-items: flex-start !important;
  width: 100%;
  flex-direction: row !important;
  gap: 15px !important;
}

.m2m-user-info div {
  gap: 7px;
}

.logo-check a {
  display: flex;
  align-items: center;
  gap: 15px;
  color: #000;
  font-size: 20px;
}

.logo-check {
  margin-bottom: 16px;
  width: 100%;
  align-items: center !important;
}

/* .m2m-modal-content{
  background:#fff;
  border-radius:14px;
  width:70%;
  max-width:900px;
  max-height:85vh;
  overflow:auto;
  box-shadow:0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  padding:5px;
} */

.m2m-tab-content .m2m-modal-header {
  padding: 34px 0px 15px 0px;
  border-bottom: 1px solid #e5e7eb;
}

.m2m-modal-header h3 {
  margin: 0;
  font-size: 18px;
  color: #111;
}

.m2m-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  flex-shrink: 0;
  margin-left: 16px;
}

.m2m-modal-close:hover {
  background: #f3f4f6;
  color: #111;
}

.m2m-tab-content .m2m-modal-body {
  padding: 20px;
}

.m2m-modal-body .m2m-field input,
.m2m-modal-body .m2m-field select {
  width: 94%;
}

.m2m-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Email Verification */
.verification-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  background-image: url(./images/section-bg.jpg);
  background-size: cover;
  min-height: 100vh;
}

.verification-card {
  background: #ffffff;
  max-width: 450px;
  width: 100%;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.m2m-alert:has(.verification-container) {
  margin: 0;
  padding: 0;
}

.icon-wrapper {
  width: 80px;
  height: 80px;
  background: #EEF2FF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.icon-wrapper svg {
  width: 50px;
  height: 50px;
}

.verification-card .m2m-h2 {
  font-size: 28px;
  margin-bottom: 16px;
  color: #111;
}

.verification-card p {
  color: #6B7280;
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 32px;
}

.button-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

/* Mobile Nav */
.m2m-mobile-nav {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background-color: #fff;
  border-bottom: 1px solid #f1f1f1;
}

.mobile-menu-icon svg {
  transform: rotate(180deg);
}

.mobile-close-icon {
  display: none !important;
  background: none !important;
  border: none;
  font-size: 30px !important;
  line-height: 1;
  color: #999 !important;
  cursor: pointer !important;
  padding: 0 !important;
  width: 36px;
  height: 36px;
  border-radius: 6px !important;
  position: absolute;
  right: 10px;
  top: 10px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .m2m-mobile-nav {
    display: flex;
  }

  .mobile-close-icon {
    display: block !important;
  }

  .m2m-modal-content {
    width: 95%;
    max-width: 95%;
    margin: 10px;
  }

  .m2m-affiliate-dashboard {
    flex-direction: column;
  }

  .m2m-tabs .logo-check {
    display: none;
  }

  .m2m-tabs {
    position: fixed;
    left: -100%;
    top: 0;
    bottom: 0;
    transition: left 0.3s ease;
    padding-top: 50px;
    padding-bottom: 30px;
  }

  div.m2m-tab-content {
    padding: 20px 10px 30px 10px;
    overflow-y: visible;
    max-height: 100%;
  }

  .m2m-copy-wrapper {
    width: 100%;
    flex-direction: column;
    align-items: start;
    gap: 6px;
  }

  .m2m-copy-butn {
    margin-left: 0;
  }

  .m2m-card {
    padding: 25px 20px;
  }

  .apply-filter-btn-wrapper {
    width: 100%;
  }

  .m2m-date-input {
    width: 125px;
  }

  .m2m-btn {
    font-size: 14px;
  }

  .m2m-btn.apply-filter-btn {
    padding: 6px 20px !important;
    font-size: 14px !important;
  }

  .m2m-save-paypal-wrapper {
    flex-direction: column;
    gap: 0px;
  }

  .m2m-save-paypal-wrapper .m2m-field {
    width: 100% !important;
  }

  .m2m-profile-wrapper {
    flex-direction: column;
    gap: 0px;
  }

  .m2m-profile-wrapper .m2m-modal-content {
    margin: 0;
    width: 100%;
    max-width: 100%;
  }

  .user-info {
    flex-direction: column;
    gap: 0;
    margin-top: 10px;
  }

  .m2m-code-edit {
    padding: 10px 15px;
    width: 95%;
  }

  .m2m-remember {
    width: 100%;
    text-align: center;
    position: unset;
    transform: none;
    margin-top: 24px;
    margin-bottom: 0;
  }
}

/* Admin inline form buttons */
.m2m-inline-form {
  display: inline-block;
  vertical-align: top;
  margin-left: 4px;
}