/* ARP FIX-3 — account cabinet visual refresh
   UI-only: existing API contracts and account business logic stay unchanged. */

#account-modal.account-modal {
  --v3-bg: #f7f9fc;
  --v3-card: #ffffff;
  --v3-border: #e4e9f1;
  --v3-border-soft: #edf1f6;
  --v3-text: #172033;
  --v3-muted: #7d8798;
  --v3-accent: var(--accent, #3b6fe0);
  --v3-accent-soft: #edf3ff;
  --v3-green: #1d8a55;
  --v3-green-soft: #eaf8f0;
  padding: clamp(8px, 1.8vh, 20px) !important;
}

body.account-modal-open .account-cabinet-dialog {
  width: min(1120px, calc(100vw - 34px)) !important;
  height: min(90dvh, 820px) !important;
  max-height: min(90dvh, 820px) !important;
  border-radius: 22px !important;
  background: var(--v3-bg) !important;
  border: 1px solid rgba(221, 228, 238, .94) !important;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .22) !important;
}

.account-v3-header {
  min-height: 68px !important;
  padding: 12px 18px !important;
  background: rgba(255,255,255,.96) !important;
  border-bottom: 1px solid var(--v3-border-soft) !important;
}

.account-v3-identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 11px;
}

.account-v3-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #4a7bec, #3466d7);
  box-shadow: 0 7px 18px rgba(59,111,224,.22);
  font-size: 15px;
  font-weight: 850;
}

.account-v3-title-block { min-width: 0; }
.account-v3-header .account-modal-title {
  color: var(--v3-text) !important;
  font-size: 17px !important;
  font-weight: 820 !important;
  line-height: 1.15 !important;
}

.account-v3-subtitle {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  min-width: 0;
  color: var(--v3-muted);
  font-size: 11px;
  line-height: 1.25;
}
.account-v3-subtitle > span { min-width: 0; }
#account-v3-header-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 300px; }
.account-v3-sep { color: #c1c8d3; }
.account-v3-status { display: inline-flex; align-items: center; gap: 5px; color: var(--v3-green); font-weight: 700; }
.account-v3-status i { width: 6px; height: 6px; border-radius: 99px; background: #2daf70; box-shadow: 0 0 0 3px rgba(45,175,112,.11); }
.account-v3-status.blocked { color: #b42318; }
.account-v3-status.blocked i { background: #d64545; box-shadow: 0 0 0 3px rgba(214,69,69,.11); }

.account-v3-header .account-modal-close {
  width: 34px !important;
  height: 34px !important;
  border-radius: 11px !important;
  border: 1px solid var(--v3-border) !important;
  background: #fff !important;
  color: #667085 !important;
  font-size: 15px !important;
}
.account-v3-header .account-modal-close:hover { background: #f5f7fa !important; color: #273348 !important; }

body.account-modal-open .account-cabinet-body {
  grid-template-columns: 224px minmax(0, 1fr) !important;
  background: var(--v3-bg) !important;
}

.account-v3-nav {
  padding: 14px 11px 16px !important;
  gap: 4px !important;
  border-right: 1px solid var(--v3-border-soft) !important;
  background: #f4f7fb !important;
}

.account-v3-nav-group {
  padding: 4px 10px 6px;
  color: #a1a9b6;
  font-size: 9.5px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.account-v3-nav-group-secondary { margin-top: 12px; }

.account-v3-nav .account-tab-btn {
  position: relative;
  min-height: 48px !important;
  padding: 7px 9px !important;
  gap: 9px !important;
  border: 1px solid transparent !important;
  border-radius: 12px !important;
  background: transparent !important;
  color: #596478 !important;
  box-shadow: none !important;
  text-align: left;
}
.account-v3-nav .account-tab-btn:hover { background: #eef2f8 !important; color: #354055 !important; }
.account-v3-nav .account-tab-btn.active {
  background: #fff !important;
  border-color: #dfe6f0 !important;
  color: var(--v3-accent) !important;
  box-shadow: 0 4px 15px rgba(15,23,42,.05) !important;
}

.account-v3-nav-icon {
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  display: grid;
  place-items: center;
  color: #9aa4b4;
}
.account-v3-nav .account-tab-btn.active .account-v3-nav-icon { color: var(--v3-accent); }
.account-v3-nav-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.account-v3-nav-text { min-width: 0; flex: 1 1 auto; }
.account-v3-nav .account-tab-btn strong { display:block; font-size: 12.2px !important; line-height: 1.15 !important; font-weight: 790 !important; color: inherit !important; }
.account-v3-nav .account-tab-btn small { display:block; margin-top:3px !important; font-size: 10px !important; line-height: 1.15 !important; color: #9aa3b1 !important; font-weight: 550 !important; }
.account-v3-nav-badge {
  min-width: 19px;
  height: 19px;
  padding: 0 6px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--v3-accent);
  font-size: 9.5px;
  font-weight: 850;
  box-shadow: 0 4px 10px rgba(59,111,224,.2);
}
.account-v3-nav-badge.hidden { display:none !important; }

.account-tab-content { background: var(--v3-bg) !important; }
.account-tab-panel { padding: 20px 22px 28px !important; }

.account-v3-pagehead {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:15px;
}
.account-v3-page-title { color: var(--v3-text); font-size: 20px; line-height:1.15; font-weight: 830; }
.account-v3-page-lead { margin-top:4px; color: var(--v3-muted); font-size: 11.5px; line-height:1.4; }

.account-v3-summary-grid {
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:10px;
  margin-bottom:12px;
}
.account-v3-summary-card {
  min-width:0;
  min-height:108px;
  padding:14px 15px;
  border:1px solid var(--v3-border);
  border-radius:15px;
  background:#fff;
  box-shadow:0 2px 8px rgba(15,23,42,.025);
}
.account-v3-summary-card.accent { background: linear-gradient(145deg,#f7faff,#edf3ff); border-color:#dae5fb; }
.account-v3-kicker { color:#8993a4; font-size:9.5px; font-weight:850; letter-spacing:.06em; text-transform:uppercase; }
.account-v3-metric { margin-top:8px; color:var(--v3-text); font-size:16px; line-height:1.18; font-weight:820; overflow-wrap:anywhere; }
.account-v3-metric.status { color:var(--v3-green); }
.account-v3-small { margin-top:5px; color:#929aa8; font-size:10.5px; line-height:1.3; }
.account-v3-link-btn { appearance:none; border:0; background:transparent; padding:0; margin-top:6px; color:var(--v3-accent); font:inherit; font-size:10.5px; font-weight:750; cursor:pointer; }
.account-v3-link-btn:hover { text-decoration:underline; }

.account-v3-two-col { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(300px,.85fr); gap:12px; align-items:start; }
.account-v3-two-col.security { grid-template-columns:minmax(0,1fr) minmax(300px,.8fr); }
.account-v3-card { margin:0 !important; padding:15px !important; border-radius:16px !important; border-color:var(--v3-border) !important; box-shadow:0 2px 10px rgba(15,23,42,.025) !important; background:#fff !important; }
.account-v3-card-head { margin-bottom:10px !important; }
.account-v3-profile-form .cabinet-field input { background:#fbfcfe; }
.account-v3-secondary-fields input, .account-v3-access-field input { color:#6e7889 !important; background:#f8fafc !important; }

.account-v3-events { display:grid; gap:4px; }
.account-v3-event { display:grid; grid-template-columns:8px minmax(0,1fr); gap:9px; padding:8px 7px; border-radius:10px; }
.account-v3-event:hover { background:#f7f9fc; }
.account-v3-event-dot { width:6px; height:6px; margin-top:5px; border-radius:99px; background:#c7ced9; }
.account-v3-event.unread .account-v3-event-dot { background:var(--v3-accent); box-shadow:0 0 0 3px rgba(59,111,224,.1); }
.account-v3-event-body { min-width:0; }
.account-v3-event-body strong { display:block; color:#334057; font-size:11.5px; line-height:1.25; }
.account-v3-event-body span { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; margin-top:2px; color:#8a93a2; font-size:10.5px; line-height:1.35; }
.account-v3-event-body small { display:block; margin-top:3px; color:#adb4bf; font-size:9.5px; }
.account-v3-empty { min-height:90px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; text-align:center; color:#959eac; font-size:11px; border:1px dashed #e1e6ee; border-radius:12px; background:#fafbfd; }
.account-v3-empty strong { color:#667085; font-size:11.5px; }
.account-v3-empty span { max-width:260px; }

.account-v3-security-info { display:grid; gap:11px; }
.account-v3-security-item { display:grid; grid-template-columns:26px minmax(0,1fr); gap:9px; align-items:start; padding:10px; border:1px solid var(--v3-border-soft); border-radius:12px; background:#fbfcfe; }
.account-v3-security-icon { width:22px; height:22px; display:grid; place-items:center; border-radius:99px; color:var(--v3-green); background:var(--v3-green-soft); font-size:11px; font-weight:850; }
.account-v3-security-item strong { display:block; color:#3d485d; font-size:11.5px; }
.account-v3-security-item small { display:block; margin-top:2px; color:#8c95a4; font-size:10.5px; line-height:1.35; }
.account-v3-security-note { padding:11px 12px; border-radius:12px; background:#f4f7fb; color:#758094; font-size:10.5px; line-height:1.45; }

/* Existing sections inherit the new visual system without changing their IDs or logic. */
#account-modal .account-panel-card { border:1px solid var(--v3-border) !important; box-shadow:0 2px 10px rgba(15,23,42,.025) !important; background:#fff !important; }
#account-modal .cabinet-section-title { color:var(--v3-text) !important; font-weight:800 !important; }
#account-modal .cabinet-text, #account-modal .cabinet-hint, #account-modal .cabinet-muted { color:#7d8798 !important; }
#account-modal .account-btn { border-radius:10px !important; box-shadow:none !important; }
#account-modal .account-btn.primary { background:var(--v3-accent) !important; }
#account-modal input, #account-modal textarea { border-color:#dfe5ed !important; box-shadow:none !important; }
#account-modal input:focus, #account-modal textarea:focus { border-color:#91afea !important; box-shadow:0 0 0 3px rgba(59,111,224,.09) !important; }

@media (max-width: 980px) {
  body.account-modal-open .account-cabinet-body { grid-template-columns:190px minmax(0,1fr) !important; }
  .account-v3-two-col, .account-v3-two-col.security { grid-template-columns:1fr; }
  .account-v3-summary-grid { grid-template-columns:1fr 1fr; }
  .account-v3-summary-card:first-child { grid-column:1 / -1; }
}

@media (max-width: 900px) {
  body.account-modal-open .account-cabinet-dialog { width:calc(100vw - 18px) !important; height:calc(100dvh - 18px) !important; max-height:calc(100dvh - 18px) !important; border-radius:18px !important; }
  body.account-modal-open .account-cabinet-body { grid-template-columns:1fr !important; grid-template-rows:auto minmax(0,1fr) !important; }
  .account-v3-nav { display:flex !important; flex-direction:row !important; gap:5px !important; padding:8px 10px !important; overflow-x:auto !important; border-right:0 !important; border-bottom:1px solid var(--v3-border-soft) !important; }
  .account-v3-nav-group { display:none !important; }
  .account-v3-nav .account-tab-btn { min-width:max-content !important; width:auto !important; min-height:42px !important; padding:7px 10px !important; }
  .account-v3-nav .account-tab-btn small { display:none !important; }
  .account-v3-nav-icon { width:20px; height:20px; flex-basis:20px; }
  .account-tab-panel { padding:16px 16px 24px !important; }
}

@media (max-width: 640px) {
  #account-modal.account-modal { padding:4px !important; }
  body.account-modal-open .account-cabinet-dialog { width:calc(100vw - 8px) !important; height:calc(100dvh - 8px) !important; max-height:calc(100dvh - 8px) !important; border-radius:15px !important; }
  .account-v3-header { min-height:58px !important; padding:9px 11px !important; }
  .account-v3-avatar { width:33px; height:33px; flex-basis:33px; border-radius:10px; }
  .account-v3-header .account-modal-title { font-size:15px !important; }
  .account-v3-subtitle { font-size:9.5px; gap:4px; }
  #account-v3-header-email, .account-v3-sep:nth-of-type(2) { display:none; }
  .account-v3-pagehead { align-items:stretch; flex-direction:column; }
  .account-v3-pagehead > .account-btn { width:100%; }
  .account-v3-summary-grid { grid-template-columns:1fr; }
  .account-v3-summary-card:first-child { grid-column:auto; }
  .account-v3-summary-card { min-height:88px; }
  .account-tab-panel { padding:12px 10px 20px !important; }
  .account-v3-page-title { font-size:18px; }
  .account-v3-two-col { gap:9px; }
}

/* ARP FIX-3.1 — cabinet UX polish + laboratory verification guidance */
.account-v3-title-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}
.account-v3-avatar {
  overflow: hidden;
  background: #fff;
  border: 1px solid #e1e7f0;
  box-shadow: 0 5px 16px rgba(15, 23, 42, .08);
}
.account-v3-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
  box-sizing: border-box;
}
.account-v3-header .account-modal-title { display: block !important; }
.account-v3-subtitle { display: flex !important; margin-top: 5px !important; }

/* Nothing from the search workspace should float over the account cabinet. */
body.account-modal-open .floating-edit-search-btn,
body.account-modal-open .mobile-back-to-search,
body.account-modal-open #floating-edit-search-btn,
body.account-modal-open #mobile-back-to-search,
body.account-modal-open .results-edit-search-btn,
body.account-modal-open .results-toolbar-edit-btn {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.account-lab-verify-guide {
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid #dce5f3;
  border-radius: 15px;
  background: linear-gradient(145deg, #fbfdff, #f3f7ff);
}
.account-lab-verify-guide-title {
  color: var(--v3-text);
  font-size: 13px;
  font-weight: 820;
  margin-bottom: 10px;
}
.account-lab-verify-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.account-lab-verify-step {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 9px;
  border: 1px solid #e4eaf3;
  border-radius: 11px;
  background: rgba(255,255,255,.86);
}
.account-lab-verify-step > span {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 99px;
  background: var(--v3-accent-soft);
  color: var(--v3-accent);
  font-size: 10px;
  font-weight: 850;
}
.account-lab-verify-step strong { display:block; color:#465269; font-size:10.8px; line-height:1.25; }
.account-lab-verify-step small { display:block; margin-top:3px; color:#8b95a5; font-size:9.8px; line-height:1.35; }
.account-lab-verify-note {
  margin-top: 9px;
  color: #718096;
  font-size: 10.3px;
  line-height: 1.4;
}

.account-verification-method-block { margin-top: 14px !important; }
.account-verification-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 9px;
}
.account-verification-method {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0,1fr);
  gap: 9px;
  align-items: start;
  min-height: 112px;
  padding: 12px;
  border: 1px solid #dfe5ed;
  border-radius: 13px;
  background: #fbfcfe;
  cursor: pointer;
}
.account-verification-method:has(input:checked) {
  border-color: #9db8ee;
  background: #f4f8ff;
  box-shadow: 0 0 0 2px rgba(59,111,224,.06);
}
.account-verification-method input { margin-top: 2px; accent-color: var(--v3-accent); }
.account-verification-method strong { display:block; color:#334057; font-size:11.4px; line-height:1.3; }
.account-verification-method small { display:block; margin-top:4px; color:#7f8999; font-size:10.2px; line-height:1.4; }
.account-verification-method em { display:block; margin-top:7px; color:#5870a1; font-size:9.8px; line-height:1.3; font-style:normal; font-weight:700; overflow-wrap:anywhere; }
.account-letter-rules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin-top: 10px;
  padding: 11px 12px;
  border: 1px solid #e4e9f1;
  border-radius: 12px;
  background: #fff;
}
.account-letter-rules.hidden { display:none !important; }
.account-letter-rules > div strong { display:block; color:#49566d; font-size:10.5px; }
.account-letter-rules > div span { display:block; margin-top:3px; color:#818b9a; font-size:9.8px; line-height:1.4; }
.account-template-download { width:max-content; align-self:center; text-decoration:none !important; }
.account-letter-rules > small { align-self:center; color:#8b95a5; font-size:9.5px; line-height:1.35; }
#account-lab-application-field.hidden { display:none !important; }

.account-support-preview {
  display: grid;
  grid-template-columns: 42px minmax(0,1fr);
  gap: 13px;
  align-items: start;
  max-width: 720px;
}
.account-support-preview-icon {
  width: 38px;
  height: 38px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:var(--v3-accent-soft);
  color:var(--v3-accent);
  font-size:16px;
  font-weight:850;
}

@media (max-width: 760px) {
  .account-lab-verify-steps,
  .account-verification-methods,
  .account-letter-rules { grid-template-columns: 1fr; }
  .account-verification-method { min-height: auto; }
  .account-template-download { width: 100%; justify-content:center; }
}
.account-cabinet-header-minimal .account-v3-title-block {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
}

/* ARP FIX-4 — unified support chat + modern native file buttons */
.account-support-root { min-height: 220px; }
.account-support-list { display: grid; gap: 9px; }
.account-support-ticket {
  width: 100%; text-align: left; display: block; padding: 13px 14px;
  border: 1px solid var(--v3-border); border-radius: 14px; background: #fff;
  color: var(--v3-text); cursor: pointer; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.account-support-ticket:hover { border-color: #c9d7ee; box-shadow: 0 7px 18px rgba(15,23,42,.055); transform: translateY(-1px); }
.account-support-ticket.unread { border-color: #b8caf0; background: #fbfdff; }
.account-support-ticket-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.account-support-ticket-head > div { min-width:0; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.account-support-ticket-head strong { font-size:12.5px; line-height:1.35; color:#26334a; }
.account-support-status { display:inline-flex; align-items:center; min-height:20px; padding:0 7px; border-radius:99px; background:#f1f4f8; color:#778296; font-size:9.5px; font-weight:780; }
.account-support-status.new { background:#fff5dd; color:#9a650d; }
.account-support-status.in_progress { background:#edf3ff; color:#3b6fe0; }
.account-support-status.closed { background:#f1f3f6; color:#7b8493; }
.account-support-unread { min-width:22px; height:22px; padding:0 6px; display:grid; place-items:center; border-radius:99px; background:var(--v3-accent); color:#fff; font-size:10px; font-weight:850; }
.account-support-ticket p { margin:8px 0 0; color:#778296; font-size:10.7px; line-height:1.45; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.account-support-ticket-meta { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:9px; color:#9aa3b1; font-size:9.5px; }
.account-support-ticket-meta time { white-space:nowrap; }
.account-support-empty { display:grid; justify-items:start; gap:7px; max-width:720px; }
.account-support-empty .account-btn { margin-top:6px; }
.account-support-loading { color:#7d8798; font-size:11px; }
.account-support-subhead, .account-support-thread-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.account-support-subhead > div, .account-support-thread-head > div { min-width:0; }
.account-support-subhead strong, .account-support-thread-head strong { display:block; color:#26334a; font-size:13px; }
.account-support-subhead span, .account-support-thread-head span { display:block; margin-top:3px; color:#8791a0; font-size:10.2px; }
.account-support-form { display:grid; gap:10px; }
.account-support-form label { display:grid; gap:5px; }
.account-support-form label > span { color:#5e697c; font-size:10.5px; font-weight:750; }
.account-support-form input, .account-support-form select, .account-support-form textarea,
.account-support-reply-form textarea {
  width:100%; box-sizing:border-box; border:1px solid #dfe5ed; border-radius:11px; background:#fff;
  color:#26334a; padding:9px 10px; font:inherit; outline:none;
}
.account-support-form textarea, .account-support-reply-form textarea { resize:vertical; min-height:88px; }
.account-support-form input:focus, .account-support-form select:focus, .account-support-form textarea:focus,
.account-support-reply-form textarea:focus { border-color:#9db8ee; box-shadow:0 0 0 3px rgba(59,111,224,.08); }
.account-support-thread { display:grid; gap:9px; max-height:430px; overflow:auto; padding:3px 4px 8px; scroll-behavior:smooth; }
.account-support-message { max-width:min(78%,650px); padding:10px 12px; border:1px solid #e1e6ee; border-radius:14px; background:#fff; color:#344054; font-size:11px; line-height:1.5; white-space:pre-wrap; overflow-wrap:anywhere; }
.account-support-message.user { justify-self:end; background:#f1f6ff; border-color:#cfe0fb; }
.account-support-message.admin { justify-self:start; }
.account-support-message small { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:7px; color:#929cab; font-size:9px; }
.account-support-message small time { white-space:nowrap; }
.account-support-reply-card { margin-top:10px !important; }
.account-support-reply-form { display:grid; gap:8px; }

/* Chromium/Firefox native file picker button: keep browser accessibility, remove the old grey button look. */
#account-modal input[type="file"]:not([hidden]),
#feedback-modal input[type="file"]:not([hidden]),
#error-report-modal input[type="file"]:not([hidden]) {
  width:100%; box-sizing:border-box; padding:5px 7px; border:1px solid #dfe5ed; border-radius:11px;
  background:#fff; color:#7b8493; font-size:10.5px;
}
#account-modal input[type="file"]::file-selector-button,
#feedback-modal input[type="file"]::file-selector-button,
#error-report-modal input[type="file"]::file-selector-button {
  margin:0 9px 0 0; padding:7px 11px; border:1px solid #d7e0ee; border-radius:9px;
  background:#f7f9fc; color:#355dba; font:inherit; font-weight:760; cursor:pointer;
  transition:background .15s ease,border-color .15s ease,box-shadow .15s ease;
}
#account-modal input[type="file"]::file-selector-button:hover,
#feedback-modal input[type="file"]::file-selector-button:hover,
#error-report-modal input[type="file"]::file-selector-button:hover { background:#edf3ff; border-color:#b9ccef; box-shadow:0 3px 9px rgba(59,111,224,.08); }
#account-modal input[type="file"]::-webkit-file-upload-button,
#feedback-modal input[type="file"]::-webkit-file-upload-button,
#error-report-modal input[type="file"]::-webkit-file-upload-button {
  margin:0 9px 0 0; padding:7px 11px; border:1px solid #d7e0ee; border-radius:9px; background:#f7f9fc;
  color:#355dba; font:inherit; font-weight:760; cursor:pointer;
}

@media (max-width:760px) {
  .account-support-ticket-meta, .account-support-message small { align-items:flex-start; flex-direction:column; gap:2px; }
  .account-support-ticket-meta time, .account-support-message small time { white-space:normal; }
  .account-support-message { max-width:90%; }
  .account-support-subhead, .account-support-thread-head { align-items:stretch; flex-direction:column; }
  .account-support-subhead .account-btn, .account-support-thread-head .account-btn { width:100%; }
}

/* FIX5 — compact account card in the main sidebar */
.account-box.account-box-modern {
  box-sizing:border-box; display:grid; gap:9px; width:100%; padding:10px;
  border:1px solid #dfe6ef; border-radius:14px; background:#fff;
  box-shadow:0 4px 16px rgba(37,55,88,.05);
}
.account-box.account-box-modern.empty { gap:8px; }
.account-modern-user { display:flex; align-items:center; gap:9px; min-width:0; }
.account-modern-avatar {
  flex:0 0 31px; width:31px; height:31px; display:grid; place-items:center;
  border-radius:10px; background:#edf3ff; color:#2f67d8; font-size:13px; font-weight:850;
}
.account-modern-user-copy { min-width:0; line-height:1.15; }
.account-modern-kicker { color:#8c96a7; font-size:9px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.account-modern-name { margin-top:2px; color:#1f2b3d; font-size:13px; font-weight:850; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.account-modern-email { margin-top:2px; color:#768195; font-size:9.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.account-modern-guest { color:#697589; font-size:10px; line-height:1.35; }
.account-modern-main-btn { width:100%; justify-content:center; }
.account-modern-access {
  display:flex; align-items:center; justify-content:space-between; gap:7px; min-width:0;
  padding:8px 9px; border:1px solid #d9e5fb; border-radius:10px; background:#f6f9ff;
  color:#315fae; font-size:9.8px; font-weight:760; line-height:1.3;
}
.account-modern-access > span { min-width:0; }
.account-modern-access.inactive { border-color:#eadfe0; background:#fff8f8; color:#a25157; }
.account-modern-link { padding:0; border:0; background:transparent; color:#3569d6; font:inherit; font-size:9px; text-decoration:underline; cursor:pointer; white-space:nowrap; }
.account-modern-event {
  width:100%; box-sizing:border-box; display:grid; grid-template-columns:24px minmax(0,1fr) auto; align-items:center; gap:8px;
  padding:8px; border:1px solid #ccdcfb; border-radius:10px; background:#f5f8ff; color:#26334a;
  text-align:left; text-decoration:none; cursor:pointer; transition:background .15s ease,border-color .15s ease,transform .15s ease;
}
.account-modern-event:hover { background:#edf3ff; border-color:#adc5f3; transform:translateY(-1px); }
.account-modern-event.admin { border-color:#d8e2f0; background:#fafcff; }
.account-modern-event-icon { width:24px; height:24px; display:grid; place-items:center; border-radius:8px; background:#fff; color:#3569d6; font-size:12px; font-weight:900; }
.account-modern-event-copy { min-width:0; }
.account-modern-event-copy strong { display:block; color:#2a3850; font-size:9.8px; }
.account-modern-event-copy small { display:block; margin-top:1px; color:#7d8797; font-size:8.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.account-modern-event-badge {
  min-width:20px; height:20px; padding:0 6px; display:grid; place-items:center; box-sizing:border-box;
  border-radius:7px; background:#376fdf; color:#fff; font-size:9px; font-weight:850;
}
.account-modern-actions { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px; }
.account-modern-cabinet-btn { min-width:0; justify-content:center; gap:6px; }
.account-modern-cabinet-btn > span { min-width:18px; height:18px; padding:0 5px; display:grid; place-items:center; border-radius:6px; background:#fff; color:#3569d6; font-size:8.5px; }
.account-modern-logout-btn { padding-left:11px !important; padding-right:11px !important; }
.account-modern-admin-link { color:#5d6a7e; font-size:9px; font-weight:740; text-align:center; text-decoration:none; }
.account-modern-admin-link:hover { color:#3569d6; text-decoration:underline; }

/* FIX5 — account deletion */
.account-delete-zone { margin-top:12px !important; display:flex; align-items:center; justify-content:space-between; gap:18px; border-color:#f0d8d8 !important; background:#fffafa !important; }
.account-delete-zone-copy { max-width:720px; }
.account-btn.danger-outline { border:1px solid #e4b9bd; background:#fff; color:#b24750; }
.account-btn.danger-outline:hover { background:#fff3f4; border-color:#d88f96; }
.account-btn.danger { border:1px solid #c84f58; background:#c84f58; color:#fff; }
.account-btn.danger:hover { background:#b9444d; }
.account-delete-dialog,
.account-deletion-pending { position:fixed; inset:0; z-index:5000; display:grid; place-items:center; padding:20px; background:rgba(22,32,50,.48); backdrop-filter:blur(5px); }
.account-delete-dialog.hidden,
.account-deletion-pending.hidden { display:none !important; }
.account-delete-dialog-card { width:min(460px,calc(100vw - 32px)); overflow:hidden; border:1px solid #e0e6ef; border-radius:17px; background:#fff; box-shadow:0 24px 70px rgba(18,30,50,.22); }
.account-delete-dialog-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:17px 18px 13px; border-bottom:1px solid #edf0f4; }
.account-delete-dialog-head strong { display:block; color:#202c3d; font-size:14px; }
.account-delete-dialog-head span { display:block; margin-top:4px; color:#7b8697; font-size:10.5px; line-height:1.45; }
.account-delete-dialog-head button { width:30px; height:30px; border:1px solid #e2e7ee; border-radius:9px; background:#fff; color:#68758a; cursor:pointer; }
.account-delete-dialog-body { display:grid; gap:11px; padding:15px 18px; }
.account-delete-dialog-body label { display:grid; gap:5px; color:#536077; font-size:10.5px; font-weight:750; }
.account-delete-dialog-body input { width:100%; box-sizing:border-box; padding:9px 10px; border:1px solid #dfe5ed; border-radius:10px; background:#fff; color:#26334a; outline:none; }
.account-delete-dialog-body input:focus { border-color:#a7bdec; box-shadow:0 0 0 3px rgba(59,111,224,.08); }
.account-delete-warning { padding:9px 10px; border-radius:10px; background:#fff7f2; color:#8b5b42; font-size:9.6px; line-height:1.45; }
.account-delete-dialog-actions { display:flex; justify-content:flex-end; gap:8px; padding:0 18px 17px; }
.account-deletion-pending-card { width:min(520px,calc(100vw - 32px)); box-sizing:border-box; padding:26px; border:1px solid #dfe6ef; border-radius:20px; background:#fff; box-shadow:0 24px 70px rgba(18,30,50,.24); text-align:center; }
.account-deletion-pending-mark { width:42px; height:42px; margin:0 auto 12px; display:grid; place-items:center; border-radius:13px; background:#fff0f1; color:#bd4650; font-size:20px; font-weight:900; }
.account-deletion-pending-kicker { color:#a65a61; font-size:9px; font-weight:850; letter-spacing:.08em; text-transform:uppercase; }
.account-deletion-pending-card h2 { margin:5px 0 7px; color:#202c3d; font-size:19px; }
.account-deletion-pending-card p { margin:0 auto; max-width:430px; color:#6e7a8d; font-size:11px; line-height:1.55; }
.account-deletion-date { margin:16px 0; padding:10px 12px; border-radius:11px; background:#f6f8fb; color:#526079; font-size:10.5px; }
.account-deletion-pending-actions { display:flex; justify-content:center; gap:8px; }
.account-deletion-pending-card > small { display:block; margin-top:13px; color:#939dac; font-size:9px; line-height:1.4; }
body.account-deletion-pending-open { overflow:hidden; }

@media (max-width:760px) {
  .account-delete-zone { align-items:stretch; flex-direction:column; }
  .account-delete-zone .account-btn { width:100%; }
  .account-delete-dialog-actions,.account-deletion-pending-actions { flex-direction:column-reverse; }
  .account-delete-dialog-actions .account-btn,.account-deletion-pending-actions .account-btn { width:100%; }
}
.account-modern-email-warning { margin-top:3px; color:#b16a48; font-size:8.6px; font-weight:720; }

/* Billing documents stage 2 */
.billing-document-list{display:grid;gap:10px;margin-top:4px}.billing-document-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,.7fr) auto;gap:12px;align-items:center;padding:12px 14px;border:1px solid rgba(148,163,184,.28);border-radius:16px;background:rgba(255,255,255,.82)}.billing-document-row strong{display:block;color:#152238;font-size:14px;margin-bottom:4px}.billing-document-row span,.billing-document-row small{display:block;color:#667085;font-size:12px;line-height:1.45;word-break:break-word}.billing-document-row .account-btn{justify-self:end}@media(max-width:760px){.billing-document-row{grid-template-columns:1fr}.billing-document-row .account-btn{justify-self:start}}


/* Billing documents UI fix 1 — readable payments/receipts in account cabinet */
.payment-history.compact { margin-top:12px; }
.payment-history-section-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin:0 0 10px;
  padding:0 1px;
}
.payment-history-section-head > div { min-width:0; }
.payment-history-section-head strong {
  display:block;
  color:#243147;
  font-size:12.5px;
  font-weight:850;
  line-height:1.25;
}
.payment-history-section-head span {
  display:block;
  margin-top:3px;
  color:#7c8799;
  font-size:10px;
  line-height:1.4;
}
.payment-history-list { display:grid; gap:9px; }
.payment-history-row.payment-history-card {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:16px;
  align-items:center;
  min-width:0;
  padding:13px 14px;
  border:1px solid #e3e8f0;
  border-radius:14px;
  background:#fff;
  box-shadow:0 1px 1px rgba(16,24,40,.015);
}
.payment-history-main { min-width:0; display:grid; gap:7px; }
.payment-history-titleline {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px 9px;
  min-width:0;
}
.payment-history-row.payment-history-card .payment-history-titleline > strong {
  display:block;
  min-width:0;
  margin:0;
  color:#26344b;
  font-size:11.8px;
  font-weight:850;
  line-height:1.3;
  overflow-wrap:anywhere;
}
.payment-history-row.payment-history-card .cabinet-pill {
  display:inline-flex;
  flex:0 0 auto;
  width:auto;
  margin:0;
  font-size:8.8px;
  line-height:1;
}
.payment-history-meta {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:4px 6px;
  min-width:0;
  color:#7a8597;
  font-size:9.8px;
  line-height:1.35;
}
.payment-history-row.payment-history-card .payment-history-meta span {
  display:inline;
  color:inherit;
  font-size:inherit;
}
.payment-history-meta b { color:#556176; font-weight:750; }
.payment-history-dot { color:#b0b8c5 !important; }
.payment-receipt-summary {
  display:grid;
  grid-template-columns:24px minmax(0,1fr);
  gap:8px;
  align-items:center;
  min-width:0;
  margin-top:1px;
  padding:7px 9px;
  border:1px solid #e7ebf1;
  border-radius:10px;
  background:#f8fafc;
}
.payment-receipt-icon {
  width:22px;
  height:22px;
  display:grid !important;
  place-items:center;
  border-radius:7px;
  background:#eef2f7;
  color:#7c8799 !important;
  font-size:11px !important;
  font-weight:900;
}
.payment-receipt-summary > div { min-width:0; }
.payment-receipt-summary strong {
  display:block;
  margin:0 !important;
  color:#526077 !important;
  font-size:9.8px !important;
  font-weight:800;
  line-height:1.25;
}
.payment-receipt-summary small {
  display:block;
  margin-top:2px;
  color:#8a94a4 !important;
  font-size:8.9px !important;
  line-height:1.35;
  overflow-wrap:anywhere;
}
.payment-receipt-summary.success { border-color:#d8ebe1; background:#f7fbf8; }
.payment-receipt-summary.success .payment-receipt-icon { background:#e7f5ec; color:#27805a !important; }
.payment-receipt-summary.success strong { color:#3c6d56 !important; }
.payment-receipt-summary.pending { border-color:#eee5cf; background:#fffcf5; }
.payment-receipt-summary.pending .payment-receipt-icon { background:#f8efd9; color:#9b7422 !important; }
.payment-history-actions {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex:0 0 auto;
}
.payment-history-action {
  min-width:104px;
  justify-content:center;
  white-space:nowrap;
}

/* Commercial documents: same visual language, no stretched metadata columns */
.billing-document-list { gap:9px; }
.billing-document-row {
  grid-template-columns:minmax(0,1fr) auto !important;
  gap:14px !important;
  padding:12px 14px !important;
  border-radius:14px !important;
  background:#fff !important;
}
.billing-document-row > div { min-width:0; }
.billing-document-row > div:nth-child(2) { display:none; }
.billing-document-row strong { font-size:11.5px !important; color:#26344b !important; }
.billing-document-row span,.billing-document-row small { font-size:9.5px !important; color:#7a8597 !important; overflow-wrap:anywhere; }
.billing-document-row .account-btn { min-width:92px; justify-content:center; white-space:nowrap; }

@media (max-width:760px) {
  .payment-history-section-head { align-items:stretch; flex-direction:column; gap:8px; }
  .payment-history-section-head .account-btn { width:100%; justify-content:center; }
  .payment-history-row.payment-history-card { grid-template-columns:1fr; gap:10px; }
  .payment-history-actions { justify-content:flex-start; }
  .payment-history-action { width:100%; }
  .billing-document-row { grid-template-columns:1fr !important; }
  .billing-document-row .account-btn { width:100%; justify-self:stretch !important; }
}
