:root {
  color-scheme: light;
  --bg: #f3f5fb;
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --surface-soft: #f8f9fd;
  --surface-hover: #f5f7fb;
  --text: #171833;
  --text-strong: #12142b;
  --muted: #687085;
  --border: #e0e4ec;
  --border-strong: #cbd2de;
  --primary: #ed6c22;
  --primary-dark: #d95a12;
  --primary-soft: #fff1e7;
  --brand-navy: #1b174f;
  --brand-navy-2: #29256c;
  --success: #087443;
  --danger: #b42318;
  --warning: #9a4d00;
  --blue: #175cd3;
  --shadow-sm: 0 5px 18px rgba(25, 31, 58, .055);
  --shadow: 0 18px 52px rgba(25, 31, 58, .095);
  --shadow-lg: 0 34px 100px rgba(12, 17, 37, .28);
  --radius: 20px;
  --header-bg: rgba(255, 255, 255, .88);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c1020;
  --surface: #14192c;
  --surface-elevated: #191f35;
  --surface-soft: #101527;
  --surface-hover: #1b2239;
  --text: #eef1f8;
  --text-strong: #ffffff;
  --muted: #9fa9bb;
  --border: #293147;
  --border-strong: #3a445e;
  --primary-soft: rgba(237, 108, 34, .14);
  --brand-navy: #e9e7ff;
  --brand-navy-2: #c9c6ff;
  --shadow-sm: 0 6px 20px rgba(0, 0, 0, .18);
  --shadow: 0 20px 60px rgba(0, 0, 0, .25);
  --shadow-lg: 0 34px 100px rgba(0, 0, 0, .5);
  --header-bg: rgba(12, 16, 32, .86);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 94% 4%, rgba(237, 108, 34, .10), transparent 26rem),
    radial-gradient(circle at 5% 22%, rgba(35, 28, 100, .06), transparent 23rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: background .25s ease, color .25s ease;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { color: inherit; }
[hidden] { display: none !important; }

.icon { width: 18px; height: 18px; flex: 0 0 auto; }

.animate-in { animation: pageIn .42s cubic-bezier(.2,.8,.2,1) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes rowIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .45; } }

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
}

.header-inner {
  width: min(1400px, calc(100% - 36px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.app-brand { display: flex; align-items: center; gap: 15px; min-width: 0; }
.app-brand > img { width: 185px; height: 50px; padding: 6px 9px; object-fit: contain; object-position: left center; background: #fff; border: 1px solid rgba(20,24,50,.08); border-radius: 11px; }
.brand-product { display: grid; line-height: 1.12; padding-left: 14px; border-left: 1px solid var(--border); }
.brand-product strong { color: var(--text-strong); font-size: 14px; letter-spacing: -.01em; }
.brand-product small { margin-top: 4px; color: var(--muted); font-size: 11px; }

.header-actions { display: flex; align-items: center; gap: 9px; }
.header-icon-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--muted);
  background: var(--surface);
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, color .16s ease;
}
.header-icon-btn:hover { transform: translateY(-1px); color: var(--primary); border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }

.profile-trigger {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 9px 4px 5px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
}
.avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #ff9d55);
  font-size: 13px;
  font-weight: 850;
  box-shadow: 0 7px 16px rgba(237, 108, 34, .22);
}
.profile-copy { display: grid; min-width: 88px; text-align: left; line-height: 1.15; }
.profile-copy strong { color: var(--text-strong); font-size: 12px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.profile-chevron { color: var(--muted); font-size: 14px; }

.page-shell { width: min(1400px, calc(100% - 36px)); margin: 0 auto; padding: 36px 0 70px; }
.page-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 24px; }
.page-intro h1 { margin: 4px 0 8px; color: var(--text-strong); font-size: clamp(31px, 4vw, 46px); letter-spacing: -.045em; line-height: 1.02; }
.page-intro p:not(.eyebrow) { max-width: 780px; margin: 0; color: var(--muted); line-height: 1.65; }
.eyebrow { margin: 0; color: var(--primary); font-size: 10px; font-weight: 860; letter-spacing: .15em; text-transform: uppercase; }
.mobile-new-button { display: none !important; }
.muted { color: var(--muted); }

.stats-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 21px; }
.stat-card {
  position: relative;
  overflow: hidden;
  min-height: 116px;
  padding: 18px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.stat-card::after { content: ""; position: absolute; right: -22px; bottom: -35px; width: 95px; height: 95px; border-radius: 50%; background: var(--primary-soft); transition: transform .25s ease; }
.stat-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--primary) 26%, var(--border)); box-shadow: var(--shadow); }
.stat-card:hover::after { transform: scale(1.15); }
.stat-card span { position: relative; z-index: 1; display: block; color: var(--muted); font-size: 12px; font-weight: 680; }
.stat-card strong { position: relative; z-index: 1; display: block; margin-top: 7px; color: var(--text-strong); font-size: 31px; line-height: 1; letter-spacing: -.04em; }
.stat-card small { position: relative; z-index: 1; display: block; margin-top: 8px; color: var(--muted); font-size: 10px; }

.content-card { overflow: visible; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.content-card.is-loading { cursor: progress; }
.content-card.is-loading .issue-table-wrap { opacity: .55; pointer-events: none; transition: opacity .15s ease; }

.filter-panel { padding: 17px; background: var(--surface-soft); border-radius: var(--radius) var(--radius) 0 0; border-bottom: 1px solid var(--border); }
.filter-main-row { display: grid; grid-template-columns: minmax(280px, 1fr) 175px auto auto auto auto; gap: 10px; align-items: center; }
.search-field { position: relative; }
.search-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 21px; pointer-events: none; }
.search-field input { padding-left: 40px; }

input, select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .2s ease;
}
textarea { min-height: 132px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(237, 108, 34, .12); }

.advanced-filter-grid { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 11px; margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--border); animation: rowIn .22s ease both; }
.compact-field { margin: 0 !important; }
.compact-field label { margin-bottom: 6px; }

.btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, opacity .16s ease, box-shadow .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn:disabled { opacity: .58; cursor: wait; transform: none; }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--primary), #ff9850); box-shadow: 0 8px 18px rgba(237, 108, 34, .19); }
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); box-shadow: 0 11px 23px rgba(237, 108, 34, .24); }
.btn-secondary { color: var(--text); background: var(--surface); border-color: var(--border-strong); }
.btn-dark { color: #fff; background: linear-gradient(135deg, #171347, #272267); }
.btn-ghost { color: var(--muted); background: transparent; }
.btn-block { width: 100%; }
.btn-small { min-height: 36px; padding: 0 11px; font-size: 11px; }

.list-heading { min-height: 56px; padding: 0 18px; display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--border); font-size: 12px; }
.list-status { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #12b76a; box-shadow: 0 0 0 4px rgba(18,183,106,.12); }
.content-card.is-loading .live-dot { background: var(--primary); animation: pulse .8s infinite; }

.issue-table-wrap { overflow-x: auto; border-radius: 0 0 var(--radius) var(--radius); }
.issue-table { width: 100%; min-width: 1160px; border-collapse: collapse; }
.issue-table th { padding: 12px 14px; color: var(--muted); background: color-mix(in srgb, var(--surface-soft) 76%, transparent); border-bottom: 1px solid var(--border); text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .075em; }
.issue-table td { padding: 14px; border-bottom: 1px solid color-mix(in srgb, var(--border) 72%, transparent); vertical-align: middle; font-size: 12px; }
.issue-table tbody tr { transition: background .16s ease; }
.issue-table tbody tr:hover { background: var(--surface-hover); }
.issue-table tbody tr:last-child td { border-bottom: 0; }
.actions-column { text-align: right !important; }
.rows-refreshed .issue-row { animation: rowIn .25s ease both; }
.rows-refreshed .issue-row:nth-child(2) { animation-delay: .025s; }
.rows-refreshed .issue-row:nth-child(3) { animation-delay: .05s; }
.rows-refreshed .issue-row:nth-child(4) { animation-delay: .075s; }

.issue-title-cell { display: flex; align-items: center; gap: 12px; min-width: 350px; }
.issue-thumb { flex: 0 0 auto; width: 60px; height: 50px; object-fit: cover; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-soft); }
.issue-thumb.placeholder { display: grid; place-items: center; padding: 10px; }
.issue-thumb.placeholder img { width: 28px; height: 28px; object-fit: contain; }
.issue-main-copy { min-width: 0; }
.issue-title-cell p { max-width: 390px; margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.link-button { padding: 0; border: 0; background: transparent; cursor: pointer; text-align: left; }
.issue-title { color: var(--text-strong); font-weight: 800; }
.issue-title:hover { color: var(--primary); }
.mobile-meta { display: none; }
.date-text { color: var(--muted); white-space: nowrap; }

.status-badge, .priority-pill, .type-pill, .role-badge {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 820;
  white-space: nowrap;
}
.type-pill { color: var(--brand-navy-2); background: color-mix(in srgb, #dcd9ff 54%, var(--surface)); }
.status-open { color: #9a4d00; background: #fff0df; }
.status-progress { color: #175cd3; background: #e8f1ff; }
.status-hold { color: #8a6116; background: #fff4ce; }
.status-solved { color: #087443; background: #dff7eb; }
.priority-critical { color: #b42318; background: #fee4e2; }
.priority-high { color: #b54708; background: #ffead5; }
.priority-medium { color: #175cd3; background: #e8f1ff; }
.priority-low { color: #087443; background: #ecfdf3; }
html[data-theme="dark"] .status-open { color: #ffd293; background: rgba(154,77,0,.22); }
html[data-theme="dark"] .status-progress, html[data-theme="dark"] .priority-medium { color: #9ec5ff; background: rgba(23,92,211,.22); }
html[data-theme="dark"] .status-hold { color: #ffe09a; background: rgba(138,97,22,.23); }
html[data-theme="dark"] .status-solved, html[data-theme="dark"] .priority-low { color: #90e3bc; background: rgba(8,116,67,.23); }
html[data-theme="dark"] .priority-critical { color: #ffaaa4; background: rgba(180,35,24,.23); }
html[data-theme="dark"] .priority-high { color: #ffc083; background: rgba(181,71,8,.23); }

.row-actions { display: flex; justify-content: flex-end; align-items: center; gap: 7px; overflow: visible; }
.action-icon {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  background: var(--surface);
  cursor: pointer;
  transition: transform .15s ease, color .15s ease, border-color .15s ease, background .15s ease;
}
.action-icon:hover { transform: translateY(-1px); color: var(--primary); border-color: color-mix(in srgb, var(--primary) 36%, var(--border)); }
.primary-action { color: var(--brand-navy-2); }
.status-action { min-height: 37px; display: inline-flex; align-items: center; gap: 6px; padding: 0 11px; border: 1px solid rgba(237,108,34,.3); border-radius: 10px; color: var(--primary-dark); background: var(--primary-soft); cursor: pointer; font-size: 11px; font-weight: 800; white-space: nowrap; }
.status-action:hover { transform: translateY(-1px); border-color: var(--primary); }
.status-action .icon { width: 16px; height: 16px; }

.menu-wrap { position: relative; display: inline-flex; }
.action-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 90;
  width: 218px;
  padding: 7px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px) scale(.985);
  transform-origin: top right;
  color: var(--text);
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 13px;
  box-shadow: var(--shadow-lg);
  transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
}
.menu-wrap.is-open > .action-menu { opacity: 1; visibility: visible; transform: none; }
.action-menu a, .action-menu button { width: 100%; min-height: 36px; display: flex; align-items: center; gap: 9px; padding: 7px 9px; color: var(--text); background: transparent; border: 0; border-radius: 8px; cursor: pointer; font-size: 11px; font-weight: 680; text-align: left; }
.action-menu a:hover, .action-menu button:hover { background: var(--surface-hover); }
.action-menu .icon { width: 16px; height: 16px; color: var(--muted); }
.menu-subtitle { padding: 8px 9px 5px; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.menu-divider { height: 1px; margin: 6px 4px; background: var(--border); }
.action-menu .danger-item { color: var(--danger); }
.profile-dropdown { top: calc(100% + 10px); width: 190px; }
.export-dropdown { width: 225px; }

.empty-state { padding: 75px 20px; text-align: center; }
.empty-state.compact { padding: 26px; }
.empty-state h2 { margin: 14px 0 5px; color: var(--text-strong); }
.empty-state p { margin: 0 0 17px; color: var(--muted); }
.empty-icon { width: 58px; height: 58px; margin: 0 auto; display: grid; place-items: center; padding: 14px; border-radius: 17px; background: var(--primary-soft); }
.empty-icon img { width: 30px; height: 30px; object-fit: contain; }

.notice { padding: 13px 15px; margin-bottom: 17px; border: 1px solid var(--border); border-radius: 12px; font-size: 12px; line-height: 1.5; }
.notice.success { color: var(--success); background: color-mix(in srgb, #ecfdf3 88%, var(--surface)); border-color: #abefc6; }
.notice.error { color: var(--danger); background: color-mix(in srgb, #fef3f2 88%, var(--surface)); border-color: #fecdca; }

.modal {
  width: min(660px, calc(100% - 24px));
  max-height: calc(100vh - 28px);
  padding: 0;
  color: var(--text);
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 21px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(12px) scale(.988);
  transition: opacity .14s ease, transform .14s ease;
}
.modal.modal-visible { opacity: 1; transform: none; }
.modal.wide-modal { width: min(960px, calc(100% - 24px)); }
.modal.users-modal { width: min(1080px, calc(100% - 24px)); }
.modal::backdrop { background: rgba(8, 12, 27, .66); backdrop-filter: blur(5px); }
.modal form { margin: 0; }
.modal-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 19px 21px; border-bottom: 1px solid var(--border); }
.modal-header h2 { margin: 3px 0 0; color: var(--text-strong); font-size: 20px; }
.modal-close { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; color: var(--muted); background: var(--surface-soft); cursor: pointer; }
.modal-close:hover { color: var(--primary); transform: rotate(4deg); }
.modal-body { max-height: calc(100vh - 190px); overflow: auto; padding: 21px; }
.modal-footer { display: flex; justify-content: flex-end; align-items: center; gap: 9px; padding: 15px 21px; border-top: 1px solid var(--border); background: var(--surface-soft); border-radius: 0 0 21px 21px; }

.field { margin-bottom: 15px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; margin-bottom: 7px; color: var(--text); font-size: 11px; font-weight: 790; }
.field small { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 13px; }
.span-2 { grid-column: 1 / -1; }
.file-drop { padding: 14px; border: 1.5px dashed var(--border-strong); border-radius: 13px; background: var(--surface-soft); }
.file-drop input { min-height: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
.file-drop span { display: block; margin-top: 8px; color: var(--muted); font-size: 10px; }
.upload-preview { display: block; max-height: 210px; margin: 12px auto 0; border: 1px solid var(--border); border-radius: 10px; object-fit: contain; }
.current-screenshot { margin-top: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-soft); }
.current-screenshot img { display: block; max-height: 220px; margin: 0 auto 10px; border-radius: 9px; }
.check-row { display: flex !important; align-items: center; gap: 8px; margin: 0 !important; font-weight: 650 !important; }
.check-row input { width: 16px; min-height: 16px; }

.detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.detail-grid > div { padding: 13px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-soft); }
.detail-grid span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .065em; }
.detail-grid strong { color: var(--text-strong); font-size: 12px; }
.detail-section { margin-top: 21px; }
.detail-section h3 { margin: 0 0 8px; color: var(--primary); font-size: 13px; }
.detail-section p { margin: 0; line-height: 1.68; }
.detail-screenshot { display: block; width: 100%; max-height: 560px; object-fit: contain; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-soft); }
.loading-state { min-height: 120px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 35px 20px; color: var(--muted); text-align: center; }
.spinner, .button-spinner { width: 18px; height: 18px; border: 2px solid color-mix(in srgb, var(--muted) 28%, transparent); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
.button-spinner { width: 14px; height: 14px; border-top-color: currentColor; }

.activity-timeline { display: grid; gap: 0; }
.activity-entry { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 9px; padding-bottom: 19px; }
.activity-entry:not(:last-child)::before { content: ""; position: absolute; left: 7px; top: 15px; bottom: 0; width: 1px; background: var(--border); }
.activity-dot { position: relative; z-index: 1; width: 15px; height: 15px; margin-top: 3px; border: 4px solid color-mix(in srgb, var(--primary) 22%, var(--surface)); border-radius: 50%; background: var(--primary); }
.activity-entry-head { display: flex; justify-content: space-between; gap: 15px; }
.activity-entry-head strong { color: var(--text-strong); font-size: 12px; }
.activity-entry-head time, .activity-entry small { color: var(--muted); font-size: 10px; }
.activity-entry p { margin: 7px 0 0; padding: 10px 11px; border-radius: 10px; background: var(--surface-soft); font-size: 11px; line-height: 1.55; }

.users-layout { display: grid; grid-template-columns: 1.1fr .9fr; min-height: 520px; }
.users-list-panel { min-width: 0; border-right: 1px solid var(--border); }
.users-panel-head { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.users-panel-head > div { display: grid; }
.users-panel-head strong { color: var(--text-strong); font-size: 13px; }
.users-panel-head small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.users-list { max-height: 550px; overflow: auto; padding: 10px; }
.user-row { width: 100%; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px; border: 1px solid transparent; border-radius: 12px; background: transparent; cursor: pointer; text-align: left; transition: background .15s ease, border-color .15s ease; }
.user-row:hover { background: var(--surface-hover); border-color: var(--border); }
.user-row.inactive { opacity: .62; }
.user-avatar { width: 38px; height: 38px; }
.user-row-copy { display: grid; min-width: 0; }
.user-row-copy strong { color: var(--text-strong); font-size: 12px; }
.user-row-copy small { margin-top: 3px; color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-badge { color: var(--brand-navy-2); background: color-mix(in srgb, #dcd9ff 52%, var(--surface)); }
.active-indicator { color: var(--muted); font-size: 10px; font-weight: 760; }
.active-indicator.active { color: var(--success); }
.user-form-panel { padding: 21px; background: var(--surface-soft); }
.user-form-heading { margin-bottom: 18px; }
.user-form-heading h3 { margin: 0 0 4px; color: var(--text-strong); }
.user-form-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.user-form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.switch-row { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; }
.switch-row span { display: grid; }
.switch-row strong { font-size: 11px; }
.switch-row small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch-row i { position: relative; width: 42px; height: 24px; flex: 0 0 auto; border-radius: 999px; background: #cbd2dc; transition: background .17s ease; }
.switch-row i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.18); transition: transform .17s ease; }
.switch-row input:checked + i { background: var(--primary); }
.switch-row input:checked + i::after { transform: translateX(18px); }

.toast-stack { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: grid; gap: 9px; width: min(360px, calc(100% - 28px)); pointer-events: none; }
.toast { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 52px; padding: 12px 13px 12px 15px; color: var(--text); background: var(--surface-elevated); border: 1px solid var(--border); border-left: 4px solid var(--success); border-radius: 13px; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(12px); pointer-events: auto; transition: opacity .18s ease, transform .18s ease; }
.toast.show { opacity: 1; transform: none; }
.toast.error { border-left-color: var(--danger); }
.toast span { font-size: 12px; line-height: 1.45; }
.toast button { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; color: var(--muted); background: var(--surface-soft); cursor: pointer; }

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 14% 14%, rgba(237,108,34,.28), transparent 28rem), linear-gradient(145deg, #15113e, #080b18); }
.auth-theme-toggle { position: fixed; right: 22px; top: 22px; z-index: 5; width: 43px; height: 43px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(255,255,255,.17); border-radius: 13px; color: #fff; background: rgba(255,255,255,.09); backdrop-filter: blur(10px); cursor: pointer; }
.auth-theme-toggle svg { width: 19px; height: 19px; }
.auth-shell { width: min(1000px, 100%); min-height: 610px; display: grid; grid-template-columns: 1.08fr .92fr; overflow: hidden; background: var(--surface); border: 1px solid rgba(255,255,255,.09); border-radius: 27px; box-shadow: 0 34px 120px rgba(0,0,0,.38); }
.auth-brand-panel { position: relative; overflow: hidden; padding: 52px; display: flex; flex-direction: column; justify-content: center; color: #fff; background: radial-gradient(circle at 17% 18%, rgba(237,108,34,.44), transparent 19rem), linear-gradient(145deg, #211c5b, #0d1028); }
.auth-brand-panel::after { content: ""; position: absolute; width: 350px; height: 350px; right: -180px; bottom: -190px; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; }
.auth-logo { position: relative; z-index: 1; width: 310px; max-height: 80px; object-fit: contain; object-position: left center; margin-bottom: 32px; filter: brightness(0) invert(1); opacity: .96; }
.auth-brand-panel .eyebrow { position: relative; z-index: 1; color: #ffae77; }
.auth-brand-panel h1 { position: relative; z-index: 1; margin: 13px 0 12px; font-size: clamp(35px, 5vw, 52px); line-height: 1.02; letter-spacing: -.045em; }
.auth-brand-panel p:not(.eyebrow) { position: relative; z-index: 1; max-width: 430px; margin: 0; color: #d1d5e5; line-height: 1.75; }
.auth-card { align-self: center; padding: 48px; }
.auth-card h2 { margin: 0 0 6px; color: var(--text-strong); font-size: 28px; }
.auth-card > .muted { margin: 0 0 25px; line-height: 1.5; }
.setup-shell { width: min(1080px, 100%); }
.setup-card { max-height: 88vh; overflow: auto; align-self: stretch; }
.section-label { margin: 8px 0 15px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--primary); font-size: 11px; font-weight: 820; text-transform: uppercase; letter-spacing: .08em; }
.manual-config { margin-top: 20px; }
.manual-config textarea { min-height: 240px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; }

@media (max-width: 1180px) {
  .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filter-main-row { grid-template-columns: minmax(220px, 1fr) 165px auto auto auto; }
  .export-menu { grid-column: 1 / -1; justify-self: start; }
  .advanced-filter-grid { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .app-brand > img { width: 160px; }
}

@media (max-width: 860px) {
  .header-inner, .page-shell { width: min(100% - 22px, 1400px); }
  .header-inner { min-height: 67px; }
  .brand-product, .profile-copy, .profile-chevron { display: none; }
  .app-brand > img { width: 150px; height: 42px; }
  .header-new-button { display: none; }
  .profile-trigger { min-height: 42px; padding: 3px; border-radius: 12px; }
  .mobile-new-button { display: inline-flex !important; }
  .page-shell { padding-top: 25px; }
  .page-intro { align-items: flex-start; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-main-row { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .export-menu { grid-column: auto; justify-self: stretch; }
  .export-menu > .btn { width: 100%; }
  .advanced-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .issue-table-wrap { overflow: visible; }
  .issue-table { min-width: 0; }
  .issue-table thead { display: none; }
  .issue-table, .issue-table tbody, .issue-table tr, .issue-table td { display: block; width: 100%; }
  .issue-table tbody { padding: 12px; display: grid; gap: 12px; }
  .issue-table tr { padding: 14px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow-sm); }
  .issue-table td { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; align-items: center; padding: 7px 0; border: 0; }
  .issue-table td::before { content: attr(data-label); color: var(--muted); font-size: 9px; font-weight: 820; text-transform: uppercase; letter-spacing: .065em; }
  .issue-table td:first-child { display: block; padding-top: 0; }
  .issue-table td:first-child::before { display: none; }
  .issue-title-cell { min-width: 0; align-items: flex-start; }
  .row-actions { display: flex !important; justify-content: flex-start; padding-top: 11px !important; border-top: 1px solid var(--border) !important; margin-top: 5px; }
  .row-actions::before { display: none; }
  .action-menu { left: 0; right: auto; transform-origin: top left; }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .users-layout { grid-template-columns: 1fr; }
  .users-list-panel { border-right: 0; border-bottom: 1px solid var(--border); }
  .users-list { max-height: 330px; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand-panel { min-height: 280px; padding: 35px; }
  .auth-logo { width: 260px; margin-bottom: 18px; }
  .auth-card { padding: 34px; }
}

@media (max-width: 560px) {
  .page-intro { display: block; }
  .page-intro .btn { width: 100%; margin-top: 16px; }
  .page-intro h1 { font-size: 31px; }
  .app-brand > img { width: 128px; }
  .header-icon-btn { width: 39px; height: 39px; }
  .header-actions { gap: 6px; }
  .stats-grid { gap: 9px; }
  .stat-card { min-height: 98px; padding: 15px; }
  .stat-card strong { font-size: 26px; }
  .stat-card small { display: none; }
  .filter-panel { padding: 12px; }
  .filter-main-row, .advanced-filter-grid { grid-template-columns: 1fr; }
  .search-field, .export-menu { grid-column: auto; }
  .list-heading { align-items: flex-start; flex-direction: column; padding: 13px; gap: 4px; }
  .issue-table tbody { padding: 9px; }
  .issue-table td { grid-template-columns: 92px minmax(0, 1fr); }
  .issue-title-cell { gap: 9px; }
  .issue-thumb { width: 52px; height: 45px; }
  .issue-title-cell p { max-height: 34px; overflow: hidden; }
  .issue-table td[data-label="Type"], .issue-table td[data-label="Priority"] { display: none; }
  .mobile-meta { display: flex; gap: 6px; margin-top: 8px; }
  .row-actions { gap: 6px; }
  .status-action { flex: 1; justify-content: center; }
  .action-icon { width: 39px; }
  .modal { width: calc(100% - 10px); max-height: calc(100vh - 10px); border-radius: 16px; }
  .modal-body { max-height: calc(100vh - 166px); padding: 16px; }
  .modal-header, .modal-footer { padding: 14px 16px; }
  .modal-footer .btn { flex: 1; }
  .form-grid, .detail-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .activity-entry-head { display: block; }
  .user-row { grid-template-columns: 38px minmax(0,1fr) auto; }
  .active-indicator { display: none; }
  .user-form-panel { padding: 16px; }
  .auth-page { padding: 9px; }
  .auth-theme-toggle { right: 14px; top: 14px; }
  .auth-shell { border-radius: 19px; }
  .auth-brand-panel { min-height: 245px; padding: 27px; }
  .auth-logo { width: 220px; }
  .auth-brand-panel h1 { font-size: 35px; }
  .auth-card { padding: 28px 22px; }
  .toast-stack { right: 10px; bottom: 10px; width: calc(100% - 20px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* v2.1 cache-safe defensive UI sizing */
svg.icon {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  min-height: 18px !important;
  max-height: 18px !important;
  display: block !important;
  flex: 0 0 18px !important;
  overflow: visible;
}

.app-brand {
  flex: 0 1 auto;
  max-width: min(520px, 52vw);
  overflow: hidden;
}

.app-brand > img {
  display: block !important;
  width: 185px !important;
  height: 50px !important;
  min-width: 185px !important;
  max-width: 185px !important;
  min-height: 50px !important;
  max-height: 50px !important;
  object-fit: contain !important;
  object-position: left center !important;
}

.header-inner {
  overflow: visible;
}

.header-actions {
  flex: 0 0 auto;
  min-width: 0;
}

.header-icon-btn,
.action-icon,
.modal-close {
  overflow: hidden;
}

.header-icon-btn > svg,
.action-icon > svg,
.modal-close > svg,
.btn > svg,
.action-menu svg,
.profile-dropdown svg,
.status-action > svg {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  min-height: 18px !important;
  max-height: 18px !important;
}

.profile-trigger {
  max-width: 210px;
}

.avatar {
  overflow: hidden;
}

.profile-dropdown,
.export-dropdown,
.action-menu {
  min-width: 210px;
}

.filter-panel,
.filter-main-row,
.advanced-filter-grid {
  min-width: 0;
}

.filter-main-row > *,
.advanced-filter-grid > * {
  min-width: 0;
}

.empty-icon {
  width: 62px !important;
  height: 62px !important;
  overflow: hidden;
}

.empty-icon img,
.issue-thumb.placeholder img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

@media (max-width: 1180px) {
  .app-brand > img {
    width: 160px !important;
    min-width: 160px !important;
    max-width: 160px !important;
  }
}

@media (max-width: 860px) {
  .app-brand {
    max-width: 180px;
  }

  .app-brand > img {
    width: 150px !important;
    height: 42px !important;
    min-width: 150px !important;
    max-width: 150px !important;
    min-height: 42px !important;
    max-height: 42px !important;
  }
}

@media (max-width: 560px) {
  .app-brand {
    max-width: 140px;
  }

  .app-brand > img {
    width: 128px !important;
    min-width: 128px !important;
    max-width: 128px !important;
  }

  .profile-trigger {
    max-width: 46px;
  }
}


/* v2.2 full-page and table overflow correction */
html, body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

.header-inner,
.page-shell {
  width: 100% !important;
  max-width: none !important;
  padding-left: clamp(14px, 2vw, 34px);
  padding-right: clamp(14px, 2vw, 34px);
}

.page-shell {
  min-height: calc(100vh - 76px);
}

.content-card,
.issue-table-wrap,
.issue-table {
  width: 100%;
  max-width: none;
}

.issue-table-wrap {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  scrollbar-width: none;
}

.issue-table-wrap::-webkit-scrollbar {
  display: none;
}

.issue-table {
  min-width: 0 !important;
  table-layout: fixed;
}

.issue-table th:nth-child(1),
.issue-table td:nth-child(1) { width: 37%; }
.issue-table th:nth-child(2),
.issue-table td:nth-child(2) { width: 9%; }
.issue-table th:nth-child(3),
.issue-table td:nth-child(3) { width: 8%; }
.issue-table th:nth-child(4),
.issue-table td:nth-child(4) { width: 11%; }
.issue-table th:nth-child(5),
.issue-table td:nth-child(5) { width: 8%; }
.issue-table th:nth-child(6),
.issue-table td:nth-child(6) { width: 12%; }
.issue-table th:nth-child(7),
.issue-table td:nth-child(7) { width: 15%; }

.issue-table tr,
.issue-table td,
.row-actions {
  overflow: visible !important;
}

.issue-title-cell {
  min-width: 0 !important;
}

.issue-title-cell p {
  width: 100%;
  max-width: none;
  overflow-wrap: anywhere;
}

.actions-column,
.row-actions {
  white-space: nowrap;
}

.action-menu {
  position: fixed;
  top: auto;
  right: auto;
  z-index: 1000;
}

.menu-wrap.is-open > .action-menu {
  visibility: visible;
}

@media (max-width: 1180px) {
  .issue-table-wrap { overflow: visible !important; }
  .issue-table { min-width: 0 !important; table-layout: auto; }
  .issue-table thead { display: none; }
  .issue-table, .issue-table tbody, .issue-table tr, .issue-table td { display: block; width: 100% !important; }
  .issue-table tbody { padding: 12px; display: grid; gap: 12px; }
  .issue-table tr { padding: 14px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow-sm); }
  .issue-table td { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; align-items: center; padding: 7px 0; border: 0; }
  .issue-table td::before { content: attr(data-label); color: var(--muted); font-size: 9px; font-weight: 820; text-transform: uppercase; letter-spacing: .065em; }
  .issue-table td:first-child { display: block; padding-top: 0; }
  .issue-table td:first-child::before { display: none; }
  .issue-title-cell { min-width: 0; align-items: flex-start; }
  .row-actions { display: flex !important; justify-content: flex-start; padding-top: 11px !important; border-top: 1px solid var(--border) !important; margin-top: 5px; }
  .row-actions::before { display: none; }
}

/* Elite ERP Issue Manager v2.7.1 — safe frontend enhancements */
.selection-head,
.selection-cell {
  width: 46px !important;
  min-width: 46px;
  max-width: 46px;
  text-align: center !important;
  padding-left: 12px !important;
  padding-right: 6px !important;
}
.selection-box { display:inline-flex; align-items:center; justify-content:center; cursor:pointer; }
.selection-box input { position:absolute; opacity:0; pointer-events:none; }
.selection-box span {
  width:19px; height:19px; display:grid; place-items:center; border:1.5px solid var(--border-strong);
  border-radius:6px; background:var(--surface); transition:.16s ease;
}
.selection-box input:checked + span { background:var(--primary); border-color:var(--primary); box-shadow:0 0 0 3px rgba(237,108,34,.12); }
.selection-box input:checked + span::after { content:'✓'; color:#fff; font-size:13px; font-weight:900; line-height:1; }
.selection-box input:indeterminate + span { background:var(--brand-navy-2); border-color:var(--brand-navy-2); }
.selection-box input:indeterminate + span::after { content:'−'; color:#fff; font-size:15px; font-weight:900; line-height:1; }
.issue-row.is-selected { background:color-mix(in srgb, var(--primary-soft) 68%, var(--surface)) !important; }
.bulk-status-button { min-width:136px; }
.bulk-status-button:disabled { cursor:not-allowed; opacity:.5; }
.bulk-status-button.has-selection { color:var(--primary-dark); border-color:rgba(237,108,34,.38); background:var(--primary-soft); }
.bulk-status-mark { font-size:15px; font-weight:900; }
.bulk-status-modal { max-width:560px; }

.download-submenu { position:relative; }
.action-menu .download-submenu-trigger { justify-content:flex-start; }
.download-submenu-icon { width:16px; text-align:center; color:var(--muted); font-size:18px; line-height:1; }
.submenu-chevron { margin-left:auto; font-size:19px; color:var(--muted); }
.download-submenu-panel {
  position:absolute; left:calc(100% + 7px); top:-7px; z-index:1100; width:174px; padding:7px;
  opacity:0; visibility:hidden; transform:translateX(-4px); background:var(--surface-elevated);
  border:1px solid var(--border); border-radius:12px; box-shadow:var(--shadow-lg); transition:.14s ease;
}
.download-submenu.open-left .download-submenu-panel { left:auto; right:calc(100% + 7px); }
.download-submenu.is-open .download-submenu-panel { opacity:1; visibility:visible; transform:none; }
.download-submenu-panel a { min-height:35px; }

.row-actions { justify-content:flex-end !important; }
.row-actions > .menu-wrap { margin-left:auto; }
.row-actions .action-menu { z-index:1050; }
.menu-status-item { color:var(--primary-dark) !important; }

@media (min-width:1181px) {
  .issue-table { table-layout:auto !important; }
  .selection-head, .selection-cell { width:46px !important; }
  .issue-table th:nth-child(2), .issue-table td:nth-child(2) { width:auto; }
  .actions-column, .row-actions { width:105px !important; min-width:105px; }
}

@media (max-width:1180px) {
  .filter-main-row { grid-template-columns:minmax(0,1fr) minmax(145px,180px) repeat(4,auto) !important; }
  .selection-head { display:none !important; }
  .issue-table td.selection-cell {
    display:flex !important; position:absolute; top:14px; right:14px; width:auto !important; min-width:0; max-width:none;
    padding:0 !important; z-index:2;
  }
  .issue-table td.selection-cell::before { display:none !important; }
  .issue-row { position:relative; padding-right:48px !important; }
  .row-actions { justify-content:flex-end !important; }
  .row-actions > .menu-wrap { margin-left:0; }
}

@media (max-width:900px) {
  .header-inner { gap:10px; }
  .header-actions { flex-wrap:nowrap; }
  .page-shell { padding-left:12px !important; padding-right:12px !important; }
  .filter-main-row { grid-template-columns:1fr 1fr !important; }
  .search-field { grid-column:1/-1; }
  .bulk-status-button, .export-menu { width:100%; justify-self:stretch; }
  .bulk-status-button, .export-menu > .btn { width:100%; }
  .advanced-filter-grid { grid-template-columns:1fr 1fr !important; }
  .download-submenu-panel { position:fixed; left:50% !important; right:auto !important; top:50% !important; transform:translate(-50%,-50%) scale(.98); width:min(260px,calc(100vw - 30px)); }
  .download-submenu.is-open .download-submenu-panel { transform:translate(-50%,-50%); }
}

@media (max-width:620px) {
  .header-inner { min-height:64px; }
  .app-brand { max-width:132px !important; }
  .app-brand > img { width:122px !important; min-width:122px !important; max-width:122px !important; height:40px !important; }
  .header-actions { gap:5px; }
  .header-icon-btn, .profile-trigger { width:38px; min-width:38px; height:38px; }
  .filter-main-row, .advanced-filter-grid { grid-template-columns:1fr !important; }
  .search-field { grid-column:auto; }
  .filter-main-row .btn, .filter-main-row select, .export-menu { width:100%; }
  .issue-table tbody { padding:8px !important; }
  .issue-row { padding:13px 44px 13px 13px !important; }
  .issue-title-cell { padding-right:2px; }
  .issue-title { font-size:13px; }
  .issue-table td { grid-template-columns:88px minmax(0,1fr) !important; }
  .row-actions { justify-content:flex-end !important; gap:7px; }
  .row-actions .action-icon { width:40px; height:40px; }
  .modal.bulk-status-modal { width:calc(100% - 12px); }
}


/* v2.7.2 — stable action-menu portal positioning */
body > .action-menu.action-menu-portal {
  position: fixed !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  transform: none !important;
  transform-origin: center !important;
  z-index: 2147483000 !important;
  pointer-events: auto !important;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

body > .action-menu.action-menu-portal.action-menu-portal-open {
  opacity: 1 !important;
  visibility: visible !important;
}

body > .action-menu.action-menu-portal[data-placement="top"] {
  transform-origin: bottom right !important;
}

body > .action-menu.action-menu-portal[data-placement="bottom"] {
  transform-origin: top right !important;
}

body > .action-menu.action-menu-portal .download-submenu-panel {
  z-index: 2147483001 !important;
}

@media (max-width: 900px) {
  body > .action-menu.action-menu-portal {
    width: min(260px, calc(100vw - 20px)) !important;
    max-width: calc(100vw - 20px) !important;
  }
}


/* v2.7.3 — scroll-safe floating action menu */
.elite-menu-layer {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  pointer-events: none;
  overflow: visible;
}

.elite-menu-layer > .action-menu.action-menu-floating {
  position: fixed !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  z-index: 2147483001 !important;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

/* The download formats expand inside the same menu. This prevents the submenu
   from escaping the viewport or being hidden by table content. */
.elite-menu-layer .download-submenu-panel,
.elite-menu-layer .download-submenu.open-left .download-submenu-panel,
.elite-menu-layer .download-submenu.is-stacked .download-submenu-panel {
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  max-height: 0;
  margin: 0;
  padding: 0 5px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: none !important;
  border: 0;
  border-radius: 9px;
  box-shadow: none;
  background: color-mix(in srgb, var(--surface-hover) 82%, var(--surface-elevated));
  transition: max-height .16s ease, opacity .14s ease, padding .16s ease, margin .16s ease;
}

.elite-menu-layer .download-submenu.is-open .download-submenu-panel {
  max-height: 240px;
  margin: 4px 0 2px;
  padding: 5px;
  opacity: 1;
  visibility: visible;
}

.elite-menu-layer .download-submenu-panel a {
  min-height: 34px;
}

@media (max-width: 900px) {
  .elite-menu-layer > .action-menu.action-menu-floating {
    width: min(250px, calc(100vw - 20px)) !important;
    max-width: calc(100vw - 20px) !important;
  }
}

/* v2.7.4 — final scroll-safe row action popover and download sheet */
.elite-action-layer {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  pointer-events: none;
  overflow: visible;
}

.elite-action-layer > .action-menu.action-menu-v274 {
  position: fixed !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  z-index: 2147483001 !important;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

/* The old expanding panel is replaced by the separate format sheet. */
.elite-action-layer .download-submenu-panel {
  display: none !important;
}

.elite-download-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, .42);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .16s ease, visibility .16s ease;
}

.elite-download-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.elite-download-sheet {
  width: min(360px, 100%);
  max-height: min(520px, calc(100vh - 36px));
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  color: var(--text);
  background: var(--surface-elevated);
  box-shadow: var(--shadow-lg);
  transform: translateY(8px) scale(.985);
  transition: transform .16s ease;
}

.elite-download-overlay.is-open .elite-download-sheet {
  transform: none;
}

.elite-download-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.elite-download-sheet-head small {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .1em;
}

.elite-download-sheet-head h3 {
  margin: 0;
  font-size: 15px;
}

.elite-download-close {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--muted);
  background: var(--surface);
  cursor: pointer;
  font-size: 22px;
}

.elite-download-links {
  display: grid;
  gap: 8px;
}

.elite-download-links a {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  background: var(--surface);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  transition: border-color .14s ease, background .14s ease, transform .14s ease;
}

.elite-download-links a:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--primary) 38%, var(--border));
  background: var(--surface-hover);
}

html.elite-download-open,
html.elite-download-open body {
  overflow: hidden !important;
}

@media (max-width: 720px) {
  .elite-download-overlay {
    align-items: flex-end;
    padding: 10px;
  }

  .elite-download-sheet {
    width: 100%;
    max-height: min(72vh, 520px);
    border-radius: 20px 20px 14px 14px;
    transform: translateY(22px);
  }

  .elite-action-layer > .action-menu.action-menu-v274 {
    width: min(250px, calc(100vw - 20px)) !important;
    max-width: calc(100vw - 20px) !important;
  }
}


/* v2.7.5 — one page scrollbar and native download dialog */
html {
  overflow-x: clip !important;
  overflow-y: auto !important;
}

body {
  overflow-x: clip !important;
  overflow-y: visible !important;
  min-height: 100%;
}

.page-shell,
.content-card,
.issue-table-wrap {
  height: auto !important;
  max-height: none !important;
}

.elite-download-overlay {
  display: none !important;
}

.elite-download-dialog {
  width: min(380px, calc(100vw - 28px));
  max-width: none;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 20px;
  color: var(--text);
  background: transparent;
  overflow: visible;
}

.elite-download-dialog::backdrop {
  background: rgba(15, 23, 42, .46);
  backdrop-filter: blur(4px);
}

.elite-download-dialog[open] {
  display: block;
  animation: eliteDialogIn .16s ease both;
}

.elite-download-dialog .elite-download-sheet {
  width: 100%;
  max-height: min(520px, calc(100dvh - 36px));
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0;
}

@keyframes eliteDialogIn {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 720px) {
  .elite-download-dialog {
    width: calc(100vw - 16px);
    margin: auto 8px 8px;
  }

  .elite-download-dialog .elite-download-sheet {
    max-height: min(72dvh, 520px);
    border-radius: 20px 20px 14px 14px;
  }
}


/* v2.7.6 — download formats inside the same three-dot menu */
.elite-download-dialog,
.elite-download-overlay {
  display: none !important;
}

.elite-action-layer > .action-menu.is-download-view {
  padding: 10px !important;
  overflow-y: auto !important;
}

.elite-menu-back {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.elite-menu-back:hover,
.elite-menu-back:focus-visible {
  color: var(--text);
  background: var(--surface-hover);
  outline: none;
}

.elite-menu-view-title {
  padding: 10px 10px 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.elite-menu-format-list {
  display: grid;
  gap: 4px;
}

.elite-menu-format-list a {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border-radius: 10px;
  color: var(--text);
  background: transparent;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.elite-menu-format-list a:hover,
.elite-menu-format-list a:focus-visible {
  color: var(--primary);
  background: var(--surface-hover);
  outline: none;
}
