/* Source-only Phase 2E: Ainreen white enterprise Backoffice and mobile Guide surfaces. */
body[data-portal=backoffice]{--surface:#fafbfc;--line:#e5e9eb;background:#fafbfc}
body[data-portal=backoffice] .workspace{background:#fafbfc}
body[data-portal=backoffice] .topbar{background:#fff;border-color:#e5e9eb}
body[data-portal] .e2e-button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 18px;border-radius:9px;background:#a78946;color:#fff;text-decoration:none;font-size:13px}
body[data-portal] .e2e-two-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}
body[data-portal] .e2e-two-columns>*{min-width:0}
body[data-portal] .e2e-sales-stats{grid-template-columns:repeat(3,minmax(0,1fr));margin-top:24px}
body[data-portal] .e2e-guide-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}
body[data-portal] .e2e-guide-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:24px;align-items:end;gap:14px}
body[data-portal] .e2e-guide-filters label,body[data-portal] .e2e-dates label{display:flex;flex-direction:column;gap:7px;font-size:11px;font-weight:500;color:#526762;min-width:0}
body[data-portal] .e2e-guide-filters input,body[data-portal] .e2e-guide-filters select{width:100%;min-width:0}
body[data-portal] .e2e-dates{align-items:end;margin-bottom:25px}
body[data-portal] .e2e-dates input{max-width:175px}
body[data-portal] .e2e-profile-summary{display:flex;align-items:center;gap:20px;background:#fff;border:1px solid var(--line);padding:25px;border-radius:16px;margin-bottom:24px;flex-wrap:wrap}
body[data-portal] .e2e-avatar{width:68px;height:68px;display:grid;place-items:center;background:#eaf2ef;color:#123f3a;border-radius:50%;font-size:27px;font-weight:600}
body[data-portal] .e2e-alerts{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
body[data-portal] .e2e-quick-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
body[data-portal] .e2e-notification{display:flex;justify-content:space-between;gap:22px;align-items:center;padding:20px 0;border-bottom:1px solid var(--line)}
body[data-portal] .e2e-notification h3{font-size:16px;margin-bottom:7px}
body[data-portal] .e2e-candidates{border:1px solid var(--line);border-radius:12px;padding:18px;margin-bottom:20px}
body[data-portal] .e2e-candidates .filter-bar input{width:150px}
body[data-portal] .e2e-candidates .table-scroll{max-height:330px;overflow:auto}
body[data-portal=guide] .section-card{margin-bottom:22px}
body[data-portal=guide] .e2e-profile-summary h2{margin-bottom:6px}
@media(max-width:1199px){body[data-portal] .e2e-guide-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}body[data-portal] .e2e-guide-filters{grid-template-columns:repeat(3,minmax(0,1fr))}body[data-portal] .e2e-quick-actions{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){body[data-portal] .e2e-two-columns{grid-template-columns:1fr;gap:0}body[data-portal] .e2e-sales-stats{grid-template-columns:repeat(2,minmax(0,1fr))}body[data-portal] .e2e-guide-filters{grid-template-columns:repeat(2,minmax(0,1fr))}body[data-portal] .e2e-quick-actions .quick-tile{padding:16px}body[data-portal] .e2e-notification{align-items:start;flex-direction:column;gap:12px}body[data-portal] .e2e-profile-summary{padding:20px}body[data-portal=guide] .mobile-bottom button{font-size:10px}body[data-portal=guide] main{padding-bottom:100px}}
body[data-portal] .e2e-form-section{grid-column:1/-1;border-bottom:1px solid var(--line);padding:14px 0 10px;color:#123f3a;margin:8px 0 0}
body[data-portal] .e2e-guide-table small.sub{display:block;color:#637872;font-size:10px;margin-top:5px;overflow-wrap:anywhere}
body[data-portal] .e2e-guide-table table{width:100%;table-layout:fixed}
body[data-portal] .e2e-guide-table th,body[data-portal] .e2e-guide-table td{white-space:normal;overflow-wrap:anywhere;padding:14px 10px}
body[data-portal] .e2e-guide-table th:first-child{width:17%}
body[data-portal] .e2e-guide-table .badge{display:inline-block;margin:2px 0;font-size:9px;max-width:100%}
body[data-portal] .e2e-registration{max-width:1000px;margin:auto;padding:36px 24px 70px}
body[data-portal] .e2e-registration .typed-fields>label:has(>.typed-fields){grid-column:1/-1}
@media(max-width:1100px){body[data-portal] .e2e-guide-table table,body[data-portal] .e2e-guide-table tbody{display:block}body[data-portal] .e2e-guide-table thead{display:none}body[data-portal] .e2e-guide-table tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:14px;border-bottom:1px solid var(--line)}body[data-portal] .e2e-guide-table td{display:block;border:none}body[data-portal] .e2e-guide-table td:before{content:attr(data-label);display:block;text-transform:uppercase;font-size:9px;color:#637872;margin-bottom:7px}body[data-portal] .e2e-guide-table .row-actions{align-self:end}}
@media(max-width:700px){body[data-portal] .e2e-registration{padding:25px 16px 65px}body[data-portal] .e2e-guide-table tr{grid-template-columns:repeat(2,minmax(0,1fr))}}

body[data-portal] .e2e-commission-sources table{table-layout:fixed;width:100%}
body[data-portal] .e2e-commission-sources th,body[data-portal] .e2e-commission-sources td{white-space:normal;overflow-wrap:anywhere}
@media(max-width:1200px){body[data-portal] .e2e-commission-sources{grid-template-columns:1fr}}


/* AINREEN GUIDE REGISTRATION LAYOUT FIX */

body[data-portal="guide"] .e2e-registration
form[data-workflow="guide-registration"] .typed-fields {
  align-items: start;
}

body[data-portal="guide"] .e2e-registration
form[data-workflow="guide-registration"] .typed-fields > h3 {
  grid-column: 1 / -1;
}

body[data-portal="guide"] .e2e-registration
form[data-workflow="guide-registration"] .typed-fields > label {
  min-width: 0;
  align-self: start;
}

body[data-portal="guide"] .e2e-registration
form[data-workflow="guide-registration"]
.typed-fields > label:has(> .checkbox-group) {
  grid-column: 1 / -1;
}

body[data-portal="guide"] .e2e-registration
form[data-workflow="guide-registration"] .checkbox-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

body[data-portal="guide"] .e2e-registration
form[data-workflow="guide-registration"] .checkbox-option {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #d9e2e7;
  border-radius: 10px;
  background: #f9fbfc;
}

body[data-portal="guide"] .e2e-registration
form[data-workflow="guide-registration"]
.checkbox-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  flex: none;
  accent-color: #146347;
}

body[data-portal="guide"] .e2e-registration
form[data-workflow="guide-registration"]
.typed-fields input:not([type="checkbox"]),
body[data-portal="guide"] .e2e-registration
form[data-workflow="guide-registration"] .typed-fields textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

@media (max-width: 700px) {
  body[data-portal="guide"] .e2e-registration
  form[data-workflow="guide-registration"] .typed-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-portal="guide"] .e2e-registration
  form[data-workflow="guide-registration"] .checkbox-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 380px) {
  body[data-portal="guide"] .e2e-registration
  form[data-workflow="guide-registration"] .checkbox-group {
    grid-template-columns: minmax(0, 1fr);
  }
}
