:root { --massar-logo-url: url("../../assets/massar_logo_small.png"); }

  .logo-icon,
  .sidebar-logo .logo-icon,
  .logo .logo-icon,
  .left-logo-icon,
  .right-logo-icon,
  .topbar-logo .logo-icon {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    border-radius: 9px !important;
    background: var(--massar-logo-url) center / cover no-repeat !important;
    color: transparent !important;
    font-size: 0 !important;
    overflow: hidden !important;
    box-shadow: none !important;
  }

  .logo-icon > *,
  .left-logo-icon > *,
  .right-logo-icon > * {
    display: none !important;
  }

  .sidebar-logo,
  .logo,
  .left-logo,
  .right-logo,
  .topbar-logo,
  .footer-logo,
  .preview-logo {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
  }

  .footer-logo::before,
  .preview-logo::before {
    content: "";
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 9px;
    background: var(--massar-logo-url) center / cover no-repeat;
    display: inline-block;
    vertical-align: middle;
  }


/* Required legal terms acceptance */
.terms-acceptance {
  margin: 6px 0 20px;
  padding: 14px 16px;
  border: 1px solid #dfe4e1;
  border-radius: 10px;
  background: #fafbfa;
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.terms-acceptance.has-error {
  border-color: var(--error, #c0392b);
  background: var(--error-bg, #fdecea);
  box-shadow: 0 0 0 3px rgba(192, 57, 43, .08);
}

.terms-checkbox-label {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  cursor: pointer;
  color: var(--dark, #1e1f21);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.8;
}

.terms-checkbox-label input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.terms-custom-checkbox {
  width: 19px;
  height: 19px;
  margin-top: 3px;
  border: 1.5px solid #aeb7b1;
  border-radius: 5px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: .2s ease;
}

.terms-checkbox-label input:checked + .terms-custom-checkbox {
  border-color: var(--primary, #2d8653);
  background: var(--primary, #2d8653);
}

.terms-checkbox-label input:checked + .terms-custom-checkbox::after {
  content: "";
  width: 8px;
  height: 4px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}

html[dir="ltr"] .terms-checkbox-label input:checked + .terms-custom-checkbox::after {
  transform: rotate(-45deg) translateY(-1px);
}

.terms-checkbox-label input:focus-visible + .terms-custom-checkbox {
  outline: 3px solid rgba(45, 134, 83, .18);
  outline-offset: 2px;
}

.terms-link-button {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0 3px;
  background: transparent;
  color: var(--primary, #2d8653);
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.terms-link-button:hover { color: var(--primary-dk, #1f6b3e); }

.terms-help {
  margin: 6px 30px 0 0;
  color: var(--gray, #6b6f76);
  font-size: 12px;
  line-height: 1.6;
}

html[dir="ltr"] .terms-help { margin: 6px 0 0 30px; }

body.terms-modal-open { overflow: hidden; }

.terms-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.terms-modal.is-open { display: flex; }

.terms-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 24, 22, .58);
  backdrop-filter: blur(2px);
}

.terms-modal-dialog {
  position: relative;
  width: min(620px, 100%);
  max-height: min(680px, calc(100vh - 40px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e3e7e4;
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(16, 24, 20, .25);
}

.terms-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid #e8ebe9;
}

.terms-modal-header h2 {
  margin: 0;
  color: var(--dark, #1e1f21);
  font-size: 21px;
  line-height: 1.45;
}

.terms-modal-close {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid #dfe4e1;
  border-radius: 8px;
  background: #fff;
  color: #59615c;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.terms-modal-close:hover { background: #f4f6f4; }

.terms-modal-body {
  overflow-y: auto;
  padding: 24px;
  color: #3f4742;
  font-size: 15px;
  line-height: 2;
}

.terms-modal-body p { margin: 0; }

.terms-modal-footer {
  display: flex;
  gap: 10px;
  padding: 16px 24px 22px;
  border-top: 1px solid #e8ebe9;
}

.terms-modal-confirm,
.terms-modal-secondary {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.terms-modal-confirm {
  border: 1px solid var(--primary, #2d8653);
  background: var(--primary, #2d8653);
  color: #fff;
}

.terms-modal-secondary {
  border: 1px solid #d8ded9;
  background: #fff;
  color: #444d47;
}

@media (max-width: 560px) {
  .terms-modal { padding: 12px; }
  .terms-modal-header,
  .terms-modal-body,
  .terms-modal-footer { padding-left: 18px; padding-right: 18px; }
  .terms-modal-footer { flex-direction: column; }
  .terms-modal-confirm,
  .terms-modal-secondary { width: 100%; }
}

/* massarLAB: custom-styled plan selector on register.html */
.plan-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.plan-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  font-family: 'Tajawal', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #1E1F21;
  border: 1.5px solid #2D8653;
  border-radius: 10px;
  padding: 9px 34px 9px 16px;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-width: 150px;
  text-align: right;
}
.plan-select:hover {
  border-color: #1F6B3E;
  box-shadow: 0 2px 10px rgba(45,134,83,0.18);
}
.plan-select:focus {
  outline: none;
  border-color: #1F6B3E;
  box-shadow: 0 0 0 3px rgba(45,134,83,0.18);
}
.plan-select option {
  font-family: 'Tajawal', sans-serif;
  font-weight: 600;
  padding: 10px;
  background: #ffffff;
  color: #1E1F21;
}
.plan-select-arrow {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #2D8653;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}
