/* ePopis V48 — canonical interface layer */

/* V48.17 — The navigation trigger exists only while the fixed sidebar is hidden. */
@media (min-width:1024px) {
  .neo-command button[aria-label="Otvori navigaciju"] {
    display:none !important;
  }
}
@media (max-width:1023px) {
  .neo-command button[aria-label="Otvori navigaciju"] {
    display:grid !important;
  }
}
:root {
  --ep48-primary:#2563eb;
  --ep48-primary-hover:#1d4ed8;
  --ep48-accent:#06b6d4;
  --ep48-danger:#dc2626;
  --ep48-text:#0f172a;
  --ep48-muted:#64748b;
  --ep48-line:#dbe3ee;
  --ep48-surface:#fff;
  --ep48-soft:#f8fafc;
  --ep48-control-h:46px;
  --ep48-control-r:14px;
  --ep48-card-r:22px;
  --ep48-hero-r:24px;
  --ep48-hero-x:28px;
  --ep48-hero-y:25px;
  --ep48-shadow:0 6px 20px rgba(15,23,42,.055);
}

/* =========================================================
   V48.6 — Annual inventory, scanner and reports responsive lock
   ========================================================= */

/* Annual inventory: preserve the dedicated card view on phones and keep
   every wider table inside its own shell. */
.neo-app main .ep-annual-create,
.neo-app main .ep-annual-list,
.neo-app main .ep-annual-detail-card,
.neo-app main .ep-annual-detail-panel,
.neo-app main .ep-annual-detail-table {
  min-width:0 !important;
  max-width:100% !important;
}
.neo-app main .ep-annual-list > .overflow-x-auto,
.neo-app main .ep-annual-detail-table > div {
  max-width:100% !important;
  overflow-x:auto !important;
  overscroll-behavior-inline:contain;
  -webkit-overflow-scrolling:touch;
}
.neo-app main .ep-annual-list :where(th,td),
.neo-app main .ep-annual-detail-table :where(th,td) {
  vertical-align:middle !important;
}
.neo-app main .ep-annual-detail-card :where(button,a),
.neo-app main .ep-annual-detail-panel :where(button,a) {
  min-height:42px;
}
.neo-app main .ep-annual-filter,
.neo-app main .ep-annual-filter .ep-custom-select-trigger {
  min-width:0 !important;
  max-width:100% !important;
}

/* Scanner: stable two-column workflow on tablets, without clipped controls. */
.neo-app main .ep-scanner-hero,
.neo-app main .ep-scanner-hero > div,
.neo-app main .ep-scanner-hero .mt-6.grid,
.neo-app main .ep-scanner-hero .mt-6.grid > div {
  min-width:0 !important;
  max-width:100% !important;
}
.neo-app main .ep-scanner-input {
  min-width:0 !important;
  width:100% !important;
}
.neo-app main .ep-scanner-camera,
.neo-app main .ep-scanner-camera :where(video,canvas,img) {
  display:block;
  width:100% !important;
  max-width:100% !important;
  height:auto;
}
.neo-app main .ep-scanner-hero :where(p,span) {
  overflow-wrap:anywhere;
}

/* Reports: the page owns many utility-only cards, so scope all corrections
   through its unique hero instead of changing generic grids application-wide. */
.neo-app main div:has(> .ep-reports-hero) {
  min-width:0 !important;
  max-width:100% !important;
}
.neo-app main div:has(> .ep-reports-hero) > :where(div,section),
.neo-app main div:has(> .ep-reports-hero) [class*="grid"] > * {
  min-width:0 !important;
}
.neo-app main div:has(> .ep-reports-hero) :where(h2,h3,p,span) {
  overflow-wrap:anywhere;
}

@media(max-width:1023px) {
  .neo-app main .ep-annual-detail-card > div:first-child {
    align-items:stretch !important;
  }
  .neo-app main .ep-reports-hero > div {
    align-items:stretch !important;
  }
  .neo-app main .ep-reports-hero > div > div:last-child {
    max-width:none !important;
    justify-content:flex-start !important;
  }
}

@media(max-width:767px) {
  .neo-app main .ep-annual-create,
  .neo-app main .ep-annual-detail-card,
  .neo-app main .ep-annual-detail-panel {
    padding:16px !important;
  }
  .neo-app main .ep-annual-create form {
    grid-template-columns:1fr !important;
  }
  .neo-app main .ep-annual-create form > div,
  .neo-app main .ep-annual-create :where(button,input) {
    width:100% !important;
  }
  .neo-app main .ep-annual-list > .md\:hidden {
    display:block !important;
  }
  .neo-app main .ep-annual-list > .hidden.md\:block {
    display:none !important;
  }
  .neo-app main .ep-annual-detail-card > div:first-child > div:last-child {
    width:100% !important;
  }
  .neo-app main .ep-annual-detail-card > div:first-child > div:last-child > :where(button,a) {
    width:100% !important;
    justify-content:center !important;
  }

  .neo-app main .ep-scanner-hero .mt-6.grid {
    grid-template-columns:1fr !important;
    gap:16px !important;
  }
  .neo-app main .ep-scanner-input {
    font-size:16px !important;
  }
  .neo-app main .ep-scanner-hero button {
    min-height:46px !important;
  }

  .neo-app main .ep-reports-hero {
    padding:20px !important;
  }
  .neo-app main .ep-reports-hero > div > div:last-child {
    display:grid !important;
    grid-template-columns:1fr !important;
    width:100% !important;
  }
  .neo-app main .ep-reports-hero > div > div:last-child > * {
    width:100% !important;
    max-width:none !important;
  }
  .neo-app main div:has(> .ep-reports-hero) > [class*="grid"] {
    grid-template-columns:1fr !important;
  }
}

@media(max-width:479px) {
  .neo-app main .ep-annual-list > div > div {
    padding:14px !important;
  }
  .neo-app main .ep-annual-list .grid-cols-2 {
    grid-template-columns:1fr 1fr !important;
    gap:8px !important;
  }
  .neo-app main .ep-scanner-hero {
    padding:18px 16px !important;
  }
  .neo-app main .ep-scanner-hero h1,
  .neo-app main .ep-reports-hero h1 {
    font-size:1.75rem !important;
    line-height:1.15 !important;
  }
}

html.dark .neo-app main .ep-annual-list > .md\:hidden > div,
html.dark .neo-app main div:has(> .ep-reports-hero) > :where(div,section) {
  border-color:#263244;
}

/* V48.10 — Activities select uses its real React option buttons.
   This exact override intentionally reverses the legacy 1px source-menu rule. */
.neo-app main .ep-activities-filter-card,
.neo-app main form:has(.ep-activity-filter) {
  overflow:visible !important;
}
.neo-app main .ep-activity-filter {
  position:relative !important;
  z-index:100 !important;
  overflow:visible !important;
}
.neo-app main .ep-activity-filter[open] {
  z-index:2147483000 !important;
}
.neo-app main .ep-activity-filter > .ep-custom-select-menu {
  position:absolute !important;
  top:calc(100% + 8px) !important;
  right:auto !important;
  bottom:auto !important;
  left:0 !important;
  display:block !important;
  width:100% !important;
  height:auto !important;
  min-width:100% !important;
  max-width:none !important;
  min-height:0 !important;
  max-height:280px !important;
  margin:0 !important;
  padding:6px !important;
  overflow-x:hidden !important;
  overflow-y:auto !important;
  visibility:visible !important;
  pointer-events:auto !important;
  border:1px solid var(--ep48-line,#dbe3ee) !important;
  border-radius:14px !important;
  background:var(--ep48-surface,#fff) !important;
  box-shadow:0 18px 42px rgba(15,23,42,.18) !important;
  transform:none !important;
  opacity:1 !important;
}
.neo-app main .ep-activity-filter:not([open]) > .ep-custom-select-menu {
  display:none !important;
}
.neo-app main .ep-activity-filter > .ep-custom-select-menu > button {
  display:flex !important;
  width:100% !important;
  min-height:40px !important;
  justify-content:flex-start !important;
  padding:9px 12px !important;
  border:0 !important;
  border-radius:9px !important;
  background:transparent !important;
  color:var(--ep48-text,#0f172a) !important;
  box-shadow:none !important;
  text-align:left !important;
}
.neo-app main .ep-activity-filter > .ep-custom-select-menu > button:hover {
  background:#eff6ff !important;
  color:#1d4ed8 !important;
}
html.dark .neo-app main .ep-activity-filter > .ep-custom-select-menu > button:hover {
  background:#172554 !important;
  color:#bfdbfe !important;
}

html.dark {
  --ep48-text:#f8fafc;
  --ep48-muted:#9aa9bd;
  --ep48-line:#2b3b52;
  --ep48-surface:#0f172a;
  --ep48-soft:#111c30;
  --ep48-shadow:0 8px 24px rgba(0,0,0,.18);
}

/* One page and hero rhythm. */
.neo-app main > section { color:var(--ep48-text); }
.neo-app main :where(.ep-dashboard-hero,.ep-assets-hero,.ep-annual-hero,.ep-scanner-hero,
  .ep-reports-hero,.ep-activities-hero,.ep-admin-hero,.ep-settings-hero,
  .ep-trash-hero,.ep-comparison-hero,.ep-account-hero) {
  box-sizing:border-box!important;
  width:100%!important;
  min-height:148px!important;
  margin:0!important;
  padding:var(--ep48-hero-y) var(--ep48-hero-x)!important;
  border:1px solid rgba(148,163,184,.16)!important;
  border-radius:var(--ep48-hero-r)!important;
  box-shadow:0 12px 30px rgba(15,23,42,.10)!important;
}
.neo-app main :where(.ep-dashboard-hero,.ep-assets-hero,.ep-annual-hero,.ep-scanner-hero,
  .ep-reports-hero,.ep-activities-hero,.ep-admin-hero,.ep-settings-hero,
  .ep-trash-hero,.ep-comparison-hero,.ep-account-hero) h1 {
  margin:0!important;color:#fff!important;font-size:30px!important;line-height:1.15!important;letter-spacing:-.025em!important;
}
.neo-app main :where(.ep-dashboard-hero,.ep-assets-hero,.ep-annual-hero,.ep-scanner-hero,
  .ep-reports-hero,.ep-activities-hero,.ep-admin-hero,.ep-settings-hero,
  .ep-trash-hero,.ep-comparison-hero,.ep-account-hero) h1 + p {
  max-width:760px!important;margin:10px 0 0!important;color:#cbd5e1!important;font-size:14px!important;line-height:1.55!important;
}

/* Canonical card surface; special overlays keep their own geometry. */
.neo-app main :where(.ep-kpi,.ep-dashboard-panel,.ep-assets-filter-card,.ep-annual-detail-card,
  .ep-annual-detail-panel,.ep-annual-detail-table,.ep-activities-filter-card,.ep-activity-card,
  .ep-settings-theme,.ep-settings-branding,.ep-settings-companies,.ep-settings-labels,
  .ep-settings-backup,.ep-settings-catalog,.ep-account-photo,.ep-account-personal,
  .ep-account-password,.ep-comparison-controls,.ep-comparison-stat,.ep-comparison-table) {
  border:1px solid var(--ep48-line)!important;
  border-radius:var(--ep48-card-r)!important;
  background:var(--ep48-surface)!important;
  box-shadow:var(--ep48-shadow)!important;
}
.neo-app main :where(.ep-kpi,.ep-dashboard-panel,.ep-assets-filter-card,.ep-annual-detail-card,
  .ep-annual-detail-panel,.ep-activities-filter-card,.ep-activity-card,.ep-settings-theme,
  .ep-settings-branding,.ep-settings-companies,.ep-settings-labels,.ep-settings-backup,
  .ep-settings-catalog,.ep-account-photo,.ep-account-personal,.ep-account-password,
  .ep-comparison-controls,.ep-comparison-stat) :where(h2,h3,strong,label) { color:var(--ep48-text); }
.neo-app main :where(.ep-kpi,.ep-dashboard-panel,.ep-assets-filter-card,.ep-annual-detail-card,
  .ep-annual-detail-panel,.ep-activities-filter-card,.ep-activity-card,.ep-settings-page,
  .ep-account-personal,.ep-account-password,.ep-comparison-controls,.ep-comparison-stat) p { color:var(--ep48-muted); }

/* One form-control geometry. */
.neo-app main :where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]),textarea,select),
.neo-app main .ep-custom-select-trigger {
  box-sizing:border-box!important;min-height:var(--ep48-control-h)!important;
  border:1px solid var(--ep48-line)!important;border-radius:var(--ep48-control-r)!important;
  background-color:var(--ep48-surface)!important;color:var(--ep48-text)!important;
  outline:0!important;box-shadow:none!important;
}
.neo-app main :where(input,textarea,select):focus,
.neo-app main .ep-custom-select[open] .ep-custom-select-trigger {
  border-color:#3b82f6!important;box-shadow:0 0 0 4px rgba(37,99,235,.11)!important;
}
.neo-app main :where(input,textarea)::placeholder { color:#94a3b8!important;opacity:1!important; }

/* Shared actions. Explicit destructive and secondary actions win below. */
.neo-app main :where(button,a)[class*="bg-blue-600"],
.neo-app main :where(button,a)[class*="from-blue-600"],
.neo-app main :where(button,a)[class*="from-blue-500"] {
  display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;
  min-height:44px;border-radius:var(--ep48-control-r)!important;line-height:1.2!important;text-align:center!important;
  border-color:transparent!important;background:linear-gradient(110deg,var(--ep48-primary),var(--ep48-accent))!important;
  color:#fff!important;font-weight:800!important;box-shadow:0 8px 20px rgba(37,99,235,.16)!important;
}
.neo-app main :where(button,a)[class*="bg-blue-600"]:hover:not(:disabled),
.neo-app main :where(button,a)[class*="from-blue"]:hover:not(:disabled) { filter:brightness(1.04); }
.neo-app main :where(button,a)[class*="bg-red-600"] {
  display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;
  min-height:44px;border:1px solid var(--ep48-danger)!important;border-radius:var(--ep48-control-r)!important;line-height:1.2!important;text-align:center!important;
  background:var(--ep48-danger)!important;color:#fff!important;box-shadow:none!important;
}
.neo-app main button[class*="border-slate"]:not([class*="bg-blue"]):not([class*="bg-red"]),
.neo-app main a[class*="border-slate"][class*="px-"]:not([class*="bg-blue"]):not([class*="bg-red"]) {
  display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;
  min-height:44px;border-color:var(--ep48-line)!important;border-radius:var(--ep48-control-r)!important;line-height:1.2!important;text-align:center!important;
  background:var(--ep48-surface)!important;color:var(--ep48-text)!important;box-shadow:none!important;
}
.neo-app main .ep-secondary-metric {
  display:block!important;min-height:0!important;line-height:normal!important;text-align:left!important;
}
.neo-app main button:disabled,.neo-app main a[aria-disabled="true"] { cursor:not-allowed!important;opacity:.48!important;box-shadow:none!important; }

/* Predictable loading, empty and error states. */
.neo-app main .ep-state { box-sizing:border-box;border-radius:16px!important;font-size:13px!important;line-height:1.55!important; }
.neo-app main .ep-empty-state { border:1px dashed var(--ep48-line)!important;background:var(--ep48-soft)!important;color:var(--ep48-muted)!important; }
.neo-app main .ep-error-state { border:1px solid #fecaca!important;background:#fef2f2!important;color:#b91c1c!important; }
.neo-app main .ep-loading-state { min-height:82px!important;border:1px solid var(--ep48-line)!important;background:var(--ep48-surface)!important; }
html.dark .neo-app main .ep-error-state { border-color:#7f1d1d!important;background:#2a1117!important;color:#fca5a5!important; }

/* Long values never force horizontal page scrolling. */
.neo-app main :where(h1,h2,h3,p,strong,small,td,th) { overflow-wrap:anywhere; }
.neo-app main :where(.ep-annual-detail-table,.ep-comparison-table) { overflow:hidden!important; }
.neo-app main :where(.ep-annual-detail-table,.ep-comparison-table)>div { overflow-x:auto!important;overscroll-behavior-inline:contain; }

@media(max-width:1023px) {
  :root { --ep48-hero-x:24px;--ep48-hero-y:23px; }
  .neo-app main :where(.ep-dashboard-hero,.ep-assets-hero,.ep-annual-hero,.ep-scanner-hero,
    .ep-reports-hero,.ep-activities-hero,.ep-admin-hero,.ep-settings-hero,
    .ep-trash-hero,.ep-comparison-hero,.ep-account-hero) { min-height:138px!important; }
}
@media(max-width:767px) {
  :root { --ep48-card-r:19px;--ep48-hero-r:21px;--ep48-hero-x:20px;--ep48-hero-y:21px; }
  .neo-app main :where(.ep-dashboard-hero,.ep-assets-hero,.ep-annual-hero,.ep-scanner-hero,
    .ep-reports-hero,.ep-activities-hero,.ep-admin-hero,.ep-settings-hero,
    .ep-trash-hero,.ep-comparison-hero,.ep-account-hero) { min-height:0!important; }
  .neo-app main :where(.ep-dashboard-hero,.ep-assets-hero,.ep-annual-hero,.ep-scanner-hero,
    .ep-reports-hero,.ep-activities-hero,.ep-admin-hero,.ep-settings-hero,
    .ep-trash-hero,.ep-comparison-hero,.ep-account-hero) h1 { font-size:26px!important; }
  .neo-app main :where(.ep-dashboard-hero,.ep-assets-hero,.ep-annual-hero,.ep-scanner-hero,
    .ep-reports-hero,.ep-activities-hero,.ep-admin-hero,.ep-settings-hero,
    .ep-trash-hero,.ep-comparison-hero,.ep-account-hero) h1 + p { font-size:13px!important; }
}
@media(max-width:479px) {
  :root { --ep48-hero-x:17px;--ep48-hero-y:19px;--ep48-card-r:18px; }
  .neo-app main :where(.ep-dashboard-hero,.ep-assets-hero,.ep-annual-hero,.ep-scanner-hero,
    .ep-reports-hero,.ep-activities-hero,.ep-admin-hero,.ep-settings-hero,
    .ep-trash-hero,.ep-comparison-hero,.ep-account-hero) h1 { font-size:24px!important; }
  .neo-app main :where(button,a)[class*="bg-blue-600"],
  .neo-app main :where(button,a)[class*="bg-red-600"] { min-height:46px; }
}

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

/* V48 phase 3A — Dashboard and Assets responsive lock. */
.neo-app main .ep-kpi { min-width:0!important;height:100%!important;overflow:hidden!important; }
.neo-app main .ep-kpi > div:nth-child(2) > div:first-child {
  max-width:100%;font-size:clamp(24px,2.15vw,34px)!important;line-height:1.12!important;overflow-wrap:anywhere;
}
.neo-app main .ep-secondary-metric { height:100%!important;padding:20px!important; }
.neo-app main .ep-secondary-metric:hover { border-color:#93c5fd!important;background:#f8fbff!important; }
html.dark .neo-app main .ep-secondary-metric:hover { border-color:#31558a!important;background:#111c30!important; }

.neo-app main .ep-assets-filter-card { min-width:0!important;padding:0!important;overflow:visible!important; }
.neo-app main .ep-assets-filter-card > div:first-child { border-radius:var(--ep48-card-r) var(--ep48-card-r) 0 0!important; }
.neo-app main .ep-assets-filter-card input[placeholder*="Pretraga po nazivu"] { width:100%!important;padding-left:42px!important; }
.neo-app main .ep-assets-results-row { min-width:0!important; }
.neo-app main .ep-assets-results-row > p { min-width:0!important;white-space:normal!important;line-height:1.45!important; }
.neo-app main .ep-assets-results-row > div { min-width:0!important; }
.neo-app main .ep-assets-filter-card .md\\:hidden button > div:last-child > div { min-width:0!important; }
.neo-app main .ep-assets-filter-card .md\\:hidden button > div:last-child > div > div:last-child {
  overflow-wrap:anywhere!important;word-break:normal!important;
}

@media(min-width:768px) and (max-width:1279px) {
  .neo-app main .ep-kpi > div:nth-child(2) > div:first-child { font-size:clamp(25px,3vw,32px)!important; }
  .neo-app main .ep-assets-filter-card > div:first-child > div:first-child { align-items:stretch!important; }
  .neo-app main .ep-assets-filter-card .ep-custom-select-trigger { width:100%!important; }
}

@media(max-width:767px) {
  .neo-app main .ep-dashboard-hero > div,
  .neo-app main .ep-assets-hero > div { gap:18px!important; }
  .neo-app main .ep-dashboard-hero a[href="/app/assets/new"],
  .neo-app main .ep-dashboard-hero a[href="/app/scanner"],
  .neo-app main .ep-assets-hero a[href="/app/assets/new"] { min-height:46px!important; }
  .neo-app main .ep-secondary-metric { padding:18px!important; }
  .neo-app main .ep-assets-filter-card > div:first-child { padding:14px!important; }
  .neo-app main .ep-assets-results-row { gap:10px!important;align-items:stretch!important; }
  .neo-app main .ep-assets-results-row > div { width:100%!important;justify-content:space-between!important; }
  .neo-app main .ep-page-size { width:100%!important;justify-content:space-between!important; }
  .neo-app main .ep-page-size-select { flex:0 0 92px!important; }
  .neo-app main .ep-saved-filters,.neo-app main .ep-saved-filters summary { width:100%!important;max-width:none!important; }
  .neo-app main .ep-saved-filter-menu { max-width:none!important; }
}

@media(max-width:479px) {
  .neo-app main .ep-dashboard-hero > div > div:last-child,
  .neo-app main .ep-assets-hero > div > div:last-child { display:grid!important;grid-template-columns:1fr 1fr!important;width:100%!important;gap:9px!important; }
  .neo-app main .ep-dashboard-hero a[href="/app/assets/new"],
  .neo-app main .ep-dashboard-hero a[href="/app/scanner"],
  .neo-app main .ep-assets-hero a[href="/app/assets/new"] { width:100%!important;padding-inline:12px!important; }
  .neo-app main .ep-kpi > div:nth-child(2) > div:first-child { font-size:clamp(24px,7.5vw,31px)!important; }
  .neo-app main .ep-assets-filter-card .md\\:hidden button { padding:14px!important; }
  .neo-app main .ep-assets-filter-card .md\\:hidden button > div:last-child { gap:8px!important; }
  .neo-app main .ep-assets-filter-card .md\\:hidden button > div:last-child > div { padding:10px!important; }
}

/* =========================================================
   V48.12 — Phase 3C responsive lock
   Activities, users, settings, account, trash and comparison
   ========================================================= */

/* Every page-local shell may shrink without forcing the application width. */
.neo-app main :where(.ep-activities-shell,.ep-activities-stats,.ep-activities-filter-card,
  .ep-activity-card,.ep-settings-page,.ep-settings-tabs,.ep-settings-theme,
  .ep-settings-branding,.ep-settings-companies,.ep-settings-labels,
  .ep-settings-backup,.ep-settings-catalog-grid,.ep-settings-catalog,
  .ep-account-page,.ep-account-photo,.ep-account-personal,.ep-account-password,
  .ep-comparison-controls,.ep-comparison-result-head,.ep-comparison-stat,
  .ep-comparison-table) {
  min-width:0 !important;
  max-width:100% !important;
}

/* Activities */
.neo-app main .ep-activities-hero > div { min-width:0 !important; }
.neo-app main .ep-activities-hero button { flex:0 0 auto; }
.neo-app main .ep-activities-stats > div { min-width:0 !important; }
.neo-app main .ep-activities-stats > div > div:last-child {
  overflow-wrap:anywhere;
}
.neo-app main .ep-activities-filter-card > div,
.neo-app main form:has(.ep-activity-filter) > div {
  min-width:0 !important;
}
.neo-app main .ep-activity-card :where(p,span,strong) { overflow-wrap:anywhere; }
.neo-app main .ep-activity-card > div > div:first-child { min-width:0 !important; }

/* Users: keep long names, email addresses and membership actions contained. */
.neo-app main .ep-users-search-wrap,
.neo-app main .ep-users-search { min-width:0 !important;max-width:100% !important; }
.neo-app main .ep-activity-card:has(.ep-users-search-wrap) { min-width:0 !important; }
.neo-app main .ep-activity-card:has(.ep-users-search-wrap) ~ .space-y-4 > div {
  min-width:0 !important;
  max-width:100% !important;
}
.neo-app main .ep-activity-card:has(.ep-users-search-wrap) ~ .space-y-4 :where(p,span,strong) {
  overflow-wrap:anywhere;
}
.neo-app main :where(.ep-user-add-company,.ep-user-reset-password) {
  min-height:44px !important;
  align-items:center !important;
  justify-content:center !important;
  text-align:center !important;
}

/* Settings */
.neo-app main .ep-settings-tabs {
  scrollbar-width:thin;
  overscroll-behavior-inline:contain;
}
.neo-app main .ep-settings-tab { min-height:42px !important; }
.neo-app main .ep-settings-page :where(input,textarea,button,label) { max-width:100%; }
.neo-app main .ep-settings-catalog > div:last-of-type {
  max-width:100% !important;
  overflow-x:hidden !important;
}
.neo-app main .ep-settings-catalog :where(p,span,strong) { overflow-wrap:anywhere; }

/* Account */
.neo-app main .ep-account-hero > div:last-child { width:100%; }
.neo-app main .ep-account-photo > div,
.neo-app main .ep-account-personal,
.neo-app main .ep-account-password { min-width:0 !important; }
.neo-app main .ep-account-page :where(input,button,label) { max-width:100%; }
.neo-app main .ep-account-page :where(p,span,strong) { overflow-wrap:anywhere; }

/* Trash */
.neo-app main div:has(> .ep-trash-hero) > section:not(.ep-trash-hero) {
  min-width:0 !important;
  max-width:100% !important;
  border-color:var(--ep48-line) !important;
  border-radius:var(--ep48-card-r) !important;
  background:var(--ep48-surface) !important;
}
.neo-app main div:has(> .ep-trash-hero) > section:not(.ep-trash-hero) > div {
  min-width:0 !important;
}
.neo-app main div:has(> .ep-trash-hero) > section:not(.ep-trash-hero) :where(p,strong) {
  overflow-wrap:anywhere;
}

/* Comparison */
.neo-app main .ep-comparison-controls > div:last-child > * { min-width:0 !important; }
.neo-app main .ep-comparison-controls .ep-custom-select,
.neo-app main .ep-comparison-controls .ep-custom-select-trigger { width:100% !important; }
.neo-app main .ep-comparison-result-head :where(h2,p) { overflow-wrap:anywhere; }
.neo-app main .ep-comparison-table > div {
  max-width:100% !important;
  overflow-x:auto !important;
  overscroll-behavior-inline:contain;
  -webkit-overflow-scrolling:touch;
}

@media(min-width:768px) and (max-width:1279px) {
  .neo-app main .ep-activities-stats { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
  .neo-app main .ep-settings-branding > div { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
  .neo-app main .ep-comparison-controls > div:last-child {
    grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) !important;
  }
  .neo-app main .ep-comparison-controls > div:last-child > button:last-child {
    grid-column:1 / -1 !important;
    width:100% !important;
  }
}

@media(max-width:767px) {
  .neo-app main .ep-activities-hero > div { align-items:stretch !important; }
  .neo-app main .ep-activities-hero button { width:100% !important;min-height:46px !important; }
  .neo-app main .ep-activities-stats { grid-template-columns:1fr !important;padding:14px !important; }
  .neo-app main form:has(.ep-activity-filter) { position:relative !important;top:auto !important;padding:14px !important; }
  .neo-app main form:has(.ep-activity-filter) > div { grid-template-columns:1fr !important; }
  .neo-app main form:has(.ep-activity-filter) button[type="submit"] { width:100% !important; }
  .neo-app main .ep-activity-card { padding:16px !important; }

  .neo-app main .ep-activity-card:has(.ep-users-search-wrap) { padding:14px !important; }
  .neo-app main .ep-activity-card:has(.ep-users-search-wrap) > div { grid-template-columns:1fr !important; }
  .neo-app main .ep-activity-card:has(.ep-users-search-wrap) ~ .space-y-4 > div > div:first-child {
    padding:16px !important;
  }
  .neo-app main .ep-activity-card:has(.ep-users-search-wrap) ~ .space-y-4 > div > div:first-child > div:last-child {
    width:100% !important;
  }
  .neo-app main .ep-activity-card:has(.ep-users-search-wrap) ~ .space-y-4 > div > div:first-child > div:last-child > button {
    flex:1 1 150px !important;
  }

  .neo-app main .ep-settings-page { grid-template-columns:1fr !important;gap:16px !important; }
  .neo-app main .ep-settings-page > * { grid-column:1 !important;grid-row:auto !important; }
  .neo-app main .ep-settings-tabs { display:flex !important;overflow-x:auto !important;padding:5px !important; }
  .neo-app main .ep-settings-tab { flex:0 0 auto !important;white-space:nowrap !important;padding-inline:13px !important; }
  .neo-app main .ep-settings-theme,
  .neo-app main .ep-settings-branding,
  .neo-app main .ep-settings-companies,
  .neo-app main .ep-settings-labels,
  .neo-app main .ep-settings-backup,
  .neo-app main .ep-settings-catalog { padding:16px !important; }
  .neo-app main .ep-settings-branding > div,
  .neo-app main .ep-settings-catalog-grid { grid-template-columns:1fr !important; }

  .neo-app main .ep-account-photo,
  .neo-app main .ep-account-personal,
  .neo-app main .ep-account-password { padding:16px !important; }
  .neo-app main .ep-account-photo > div { align-items:stretch !important; }
  .neo-app main .ep-account-photo > div > div:last-child { width:100% !important; }
  .neo-app main .ep-account-photo > div > div:last-child > :where(button,label) {
    flex:1 1 150px !important;
    justify-content:center !important;
  }
  .neo-app main .ep-account-personal button,
  .neo-app main .ep-account-password button { width:100% !important; }

  .neo-app main div:has(> .ep-trash-hero) > section:not(.ep-trash-hero) > div {
    align-items:stretch !important;
    padding:16px !important;
  }
  .neo-app main div:has(> .ep-trash-hero) > section:not(.ep-trash-hero) button {
    width:100% !important;
  }

  .neo-app main .ep-comparison-controls { padding:16px !important; }
  .neo-app main .ep-comparison-controls > div:last-child { grid-template-columns:1fr !important; }
  .neo-app main .ep-comparison-controls > div:last-child > button { width:100% !important; }
  .neo-app main .ep-comparison-swap { min-height:44px !important; }
  .neo-app main .ep-comparison-result-head { align-items:stretch !important;padding:16px !important; }
  .neo-app main .ep-comparison-result-head button { width:100% !important; }
  .neo-app main .ep-comparison-table table { min-width:680px !important; }
}

@media(max-width:479px) {
  .neo-app main .ep-activities-stats > div { padding:14px !important; }
  .neo-app main .ep-activity-card > div > div:first-child { gap:11px !important; }
  .neo-app main .ep-activity-card > div > div:first-child > div:first-child {
    width:46px !important;height:46px !important;border-radius:14px !important;
  }
  .neo-app main .ep-account-photo > div > div:first-child { align-items:flex-start !important; }
  .neo-app main .ep-account-photo img { width:64px !important;height:64px !important; }
  .neo-app main .ep-comparison-stat { padding:16px !important; }
}

html.dark .neo-app main .ep-activities-stats,
html.dark .neo-app main .ep-activities-stats > div,
html.dark .neo-app main div:has(> .ep-trash-hero) > section:not(.ep-trash-hero) {
  border-color:var(--ep48-line) !important;
  background:var(--ep48-surface) !important;
}
