/* =====================================================
   EDIT PROFILE DIALOG — BizMetry Design System
   ===================================================== */

.edit-profile-dialog {
  max-width: 680px;
  width: 92vw;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
}

/* =====================================================
   TOOLBAR
   ===================================================== */

.edit-profile-dialog .epd-toolbar {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  min-height: 68px !important;
  box-shadow: 0 2px 12px rgba(102, 126, 234, 0.3) !important;
}

.edit-profile-dialog .epd-toolbar-tools {
  padding: 0 16px !important;
  min-height: 68px !important;
  display: flex !important;
  align-items: center !important;
}

.epd-toolbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.epd-toolbar-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.epd-toolbar-icon-wrap md-icon {
  font-size: 20px !important;
  width: 20px !important;
  height: 20px !important;
  color: white !important;
}

.epd-title {
  font-size: 17px;
  font-weight: 700;
  color: white;
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.2px;
}

.epd-subtitle {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  margin: 2px 0 0;
  font-weight: 400;
}

.epd-close-btn {
  color: rgba(255, 255, 255, 0.8) !important;
  transition: all 0.15s ease !important;
}

.epd-close-btn:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  color: white !important;
}

.epd-close-btn md-icon {
  color: inherit !important;
}

/* =====================================================
   CONTENT
   ===================================================== */

.edit-profile-dialog .epd-content {
  padding: 0 !important;
  background: #f0f2f7 !important;
  max-height: 78vh;
  overflow-y: auto;
}

.edit-profile-dialog .epd-content::-webkit-scrollbar { width: 5px; }
.edit-profile-dialog .epd-content::-webkit-scrollbar-track { background: #f0f2f7; }
.edit-profile-dialog .epd-content::-webkit-scrollbar-thumb { background: #c5c9d6; border-radius: 3px; }
.edit-profile-dialog .epd-content::-webkit-scrollbar-thumb:hover { background: #a8adb8; }

/* =====================================================
   IDENTITY BANNER
   ===================================================== */

.epd-identity-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: white;
  padding: 20px 24px;
  border-bottom: 1px solid #e8eaf0;
  position: relative;
  overflow: hidden;
}

.epd-identity-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #667eea, #764ba2);
}

.epd-identity-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.epd-identity-name {
  font-size: 16px;
  font-weight: 700;
  color: #1e2535;
  letter-spacing: -0.2px;
}

.epd-identity-email {
  font-size: 13px;
  color: #7c84a0;
  font-weight: 400;
}

.epd-identity-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
  font-size: 12px;
  font-weight: 600;
  color: #16a34a;
  flex-shrink: 0;
}

.epd-identity-badge md-icon {
  font-size: 14px !important;
  width: 14px !important;
  height: 14px !important;
  color: #16a34a !important;
}

/* =====================================================
   SECTIONS
   ===================================================== */

.epd-section {
  background: white;
  margin: 16px 16px 0;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e8eaf0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.epd-section:last-of-type {
  margin-bottom: 16px;
}

.epd-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f0f2f7;
}

.epd-section-icon {
  font-size: 18px !important;
  width: 18px !important;
  height: 18px !important;
  color: #667eea !important;
  flex-shrink: 0;
}

.epd-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #3d4461;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  flex: 1;
}

.epd-optional-tag {
  font-size: 10px;
  font-weight: 600;
  color: #a0a8c0;
  background: #f0f2f7;
  padding: 3px 9px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.epd-section-hint {
  font-size: 12px;
  color: #9aa0b8;
  margin: 0 0 16px;
  font-style: italic;
}

/* =====================================================
   FIELDS ROW
   ===================================================== */

.epd-fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.epd-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.epd-field-label {
  font-size: 11px;
  font-weight: 700;
  color: #6b7494;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.epd-required {
  color: #e05252;
  font-size: 13px;
  line-height: 1;
}

/* =====================================================
   INPUT WRAP
   ===================================================== */

.epd-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: #f7f8fc;
  border: 1.5px solid #dde1ee;
  border-radius: 8px;
  transition: all 0.18s ease;
  overflow: hidden;
}

.epd-input-wrap:focus-within {
  background: white;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
}

.epd-input-wrap.epd-input-error {
  border-color: #e05252;
  background: #fff8f8;
}

.epd-input-wrap.epd-input-error:focus-within {
  box-shadow: 0 0 0 3px rgba(224, 82, 82, 0.12);
}

.epd-input-wrap.epd-input-valid {
  border-color: #3dba6e;
}

.epd-input-icon {
  font-size: 16px !important;
  width: 16px !important;
  height: 16px !important;
  color: #b0b8d0 !important;
  margin-left: 12px;
  flex-shrink: 0;
  transition: color 0.18s;
}

.epd-input-wrap:focus-within .epd-input-icon {
  color: #667eea !important;
}

.epd-input {
  flex: 1;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  padding: 11px 12px !important;
  font-size: 14px !important;
  color: #1e2535 !important;
  font-weight: 500;
  min-width: 0;
}

.epd-input::placeholder {
  color: #b8bdd0 !important;
  font-weight: 400;
}

.epd-input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.epd-input-status {
  font-size: 16px !important;
  width: 16px !important;
  height: 16px !important;
  color: #3dba6e !important;
  margin-right: 12px;
  flex-shrink: 0;
}

/* =====================================================
   FIELD ERRORS
   ===================================================== */

.epd-field-errors {
  font-size: 12px;
  color: #e05252;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  padding-left: 2px;
}

.epd-field-errors::before {
  content: '!';
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e05252;
  color: white;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* =====================================================
   ALERTS
   ===================================================== */

.epd-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 16px 16px;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.epd-alert md-icon {
  font-size: 20px !important;
  width: 20px !important;
  height: 20px !important;
  flex-shrink: 0;
}

.epd-alert-error {
  background: #fff1f1;
  border: 1px solid #fca5a5;
  color: #b91c1c;
}

.epd-alert-error md-icon { color: #e05252 !important; }

.epd-alert-success {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #15803d;
}

.epd-alert-success md-icon { color: #16a34a !important; }

/* =====================================================
   READY BANNER
   ===================================================== */

.epd-ready-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 16px 16px;
  padding: 16px 20px;
  border-radius: 10px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.epd-ready-banner md-icon {
  font-size: 22px !important;
  width: 22px !important;
  height: 22px !important;
  color: rgba(255, 255, 255, 0.9) !important;
  flex-shrink: 0;
}

.epd-ready-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.epd-ready-title {
  font-size: 14px;
  font-weight: 700;
  color: white;
}

.epd-ready-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}

/* =====================================================
   DIALOG ACTIONS
   ===================================================== */

.edit-profile-dialog .epd-actions {
  background: white !important;
  border-top: 1px solid #e8eaf0 !important;
  padding: 14px 20px !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  min-height: 66px !important;
}

.epd-btn-cancel {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px;
  height: 38px !important;
  padding: 0 18px !important;
  border-radius: 8px !important;
  background: #f0f2f7 !important;
  color: #6b7494 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-transform: none !important;
  margin: 0 !important;
  transition: all 0.15s ease !important;
  border: 1px solid #dde1ee !important;
}

.epd-btn-cancel:hover:not([disabled]) {
  background: #e4e7f2 !important;
  color: #3d4461 !important;
}

.epd-btn-cancel md-icon {
  font-size: 17px !important;
  width: 17px !important;
  height: 17px !important;
  color: inherit !important;
}

.epd-btn-save {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px;
  height: 38px !important;
  padding: 0 22px !important;
  border-radius: 8px !important;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-transform: none !important;
  margin: 0 !important;
  letter-spacing: 0.2px;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3) !important;
  transition: opacity 0.15s ease !important;
}

.epd-btn-save:hover:not([disabled]) {
  opacity: 0.9;
}

.epd-btn-save[disabled] {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

.epd-btn-save md-icon {
  font-size: 17px !important;
  width: 17px !important;
  height: 17px !important;
  color: white !important;
}

.epd-btn-save md-progress-circular circle {
  stroke: white !important;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 680px) {
  .edit-profile-dialog {
    width: 96vw;
    max-width: none;
  }

  .epd-fields-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .epd-identity-banner {
    padding: 16px;
    gap: 12px;
  }

  .epd-identity-badge { display: none; }

  .epd-section {
    margin: 12px 12px 0;
    padding: 16px;
  }

  .epd-section:last-of-type {
    margin-bottom: 12px;
  }
}

@media (max-width: 480px) {
  .epd-subtitle { display: none; }

  .epd-actions {
    flex-wrap: wrap;
    gap: 8px !important;
  }

  .epd-btn-cancel,
  .epd-btn-save {
    flex: 1 !important;
    justify-content: center !important;
  }
}

/* =====================================================
   2FA SECTION
   ===================================================== */

.epd-subsection-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding-top: 16px;
}

.epd-subsection-label--mt {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #f0f2f7;
}

.epd-subsection-label md-icon {
  font-size: 16px !important;
  width: 16px !important;
  height: 16px !important;
  color: #667eea !important;
  flex-shrink: 0;
}

.epd-subsection-label span {
  font-size: 12px;
  font-weight: 700;
  color: #5a6080;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex: 1;
}

.epd-2fa-hint {
  margin-top: -4px;
  margin-bottom: 0;
}

/* ── 2FA row: phone input + validate button inline ── */
.epd-2fa-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.epd-2fa-input-wrap {
  flex: 1;
  min-width: 0;
}

.epd-2fa-input-wrap biz-phone-input {
  display: block;
  margin-bottom: 0 !important;
}

.epd-2fa-action {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* ── Validate button ── */
.epd-2fa-btn {
  flex-shrink: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  border-radius: 8px !important;
  padding: 0 16px !important;
  min-height: 44px !important;
  margin: 0 !important;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.35) !important;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  text-transform: none !important;
}

.epd-2fa-btn[disabled] {
  background: linear-gradient(135deg, #cbd5e0, #a0aec0) !important;
  color: #718096 !important;
  box-shadow: none !important;
  opacity: 0.6;
}

.epd-2fa-btn .material-icons,
.epd-2fa-btn md-icon {
  font-size: 16px !important;
  width: 16px !important;
  height: 16px !important;
  color: white !important;
}

.epd-2fa-btn--revalidate {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35) !important;
}

/* ── Verified badge ── */
.epd-2fa-verified {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(16, 185, 129, 0.10);
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  border-radius: 8px;
  color: #059669;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.epd-2fa-verified md-icon {
  font-size: 17px !important;
  width: 17px !important;
  height: 17px !important;
  color: #059669 !important;
}

/* ── Responsive ── */
@media (max-width: 520px) {
  .epd-2fa-row {
    flex-direction: column;
    align-items: stretch;
  }

  .epd-2fa-action {
    justify-content: flex-end;
  }

  .epd-2fa-btn {
    width: 100% !important;
    justify-content: center !important;
  }
}