/* App styles on top of the Phoenix theme (taken from the low-code WEB app so both look the same). */

/*
 * Compact layout: Phoenix sizes everything in rem, so a smaller root font
 * scales the whole UI (â‰ˆ 87.5% zoom) while still respecting the user's
 * browser font setting.
 */
html {
  font-size: 88.5%;
}

/*
 * Tighter page margins than Phoenix (navbar + 2rem on top, 2.5rem at the sides).
 * The selector outweighs Phoenix's ".navbar-vertical.navbar-expand-* ~ .navbar-top ~ .content".
 */
.main .navbar-vertical ~ .navbar-top ~ .content.content {
  padding-top: calc(var(--phoenix-navbar-top-height) + 1rem);
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Left menu: slightly larger text than the compact page. */
.navbar-vertical .navbar-nav .nav-link,
.navbar-vertical .navbar-vertical-footer .navbar-vertical-toggle {
  font-size: 0.85rem;
}

.navbar-vertical .navbar-nav .nav-link-icon {
  font-size: 0.85rem;
}

/* Icon in front of each sub-menu item. */
.navbar-vertical .sub-nav-icon {
  display: inline-flex;
  flex: none;
  justify-content: center;
  width: 1.1rem;
  margin-right: 0.55rem;
  font-size: 1rem;
  text-align: center;
  opacity: 0.75;
}

.navbar-vertical .nav-link.active .sub-nav-icon {
  opacity: 1;
}

/* ----- Sidebar menu (layout/sidebar): pills, icon boxes, sub-menu tree, user card -----
 * Built on Phoenix's classes so its collapsed view (icons + hover flyouts) keeps working. */
.lp-sidebar .lp-nav-content {
  display: flex;
  flex-direction: column;
  padding-top: 0.5rem;
}

.lp-nav-heading {
  margin: 0;
  padding: 0.6rem 1.25rem 0.4rem;
  color: var(--phoenix-quaternary-color);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.navbar-vertical.lp-sidebar .navbar-nav > .nav-item {
  margin: 0 0.5rem 0.15rem;
}

/* The #navbarVerticalNav id outranks Phoenix's longer class selectors (e.g. for .dropdown-indicator),
 * so group and single menus line up. */
.navbar-vertical.lp-sidebar .navbar-nav .nav-link.label-1,
.lp-sidebar #navbarVerticalNav .nav-link.label-1 {
  position: relative;
  padding: 0.35rem 0.5rem;
  border-radius: 0.65rem;
  color: var(--phoenix-body-color);
  transition:
    background-color 0.15s,
    color 0.15s;
}

.navbar-vertical.lp-sidebar .navbar-nav .nav-link.label-1:hover {
  background-color: var(--phoenix-body-highlight-bg);
  color: var(--phoenix-emphasis-color);
}

/* Phoenix's left arrow is replaced by the chevron on the right. */
.navbar-vertical.lp-sidebar .nav-link.label-1 .dropdown-indicator-icon-wrapper {
  display: none;
}

.navbar-vertical.lp-sidebar .lp-nav-icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-right: 0.7rem;
  border-radius: 0.55rem;
  background-color: var(--phoenix-body-highlight-bg);
  color: var(--phoenix-tertiary-color);
  font-size: 1rem;
  transition:
    background 0.15s,
    color 0.15s,
    box-shadow 0.15s;
}

.navbar-vertical.lp-sidebar .nav-link.label-1:hover .lp-nav-icon {
  color: var(--phoenix-primary);
}

/* Current page (or the group holding it). */
.navbar-vertical.lp-sidebar .navbar-nav .nav-link.label-1.active,
.navbar-vertical.lp-sidebar .navbar-nav .nav-link.label-1.lp-parent-active {
  background-color: var(--phoenix-primary-bg-subtle);
  color: var(--phoenix-emphasis-color);
  font-weight: 600;
}

.navbar-vertical.lp-sidebar .navbar-nav .nav-link.label-1.active::before,
.navbar-vertical.lp-sidebar .navbar-nav .nav-link.label-1.lp-parent-active::before {
  content: '';
  position: absolute;
  top: 0.45rem;
  bottom: 0.45rem;
  left: -0.5rem;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background-color: var(--phoenix-primary);
}

.navbar-vertical.lp-sidebar .nav-link.label-1.active .lp-nav-icon,
.navbar-vertical.lp-sidebar .nav-link.label-1.lp-parent-active .lp-nav-icon {
  background: linear-gradient(135deg, #3874ff, #8b5cf6);
  color: #fff;
  box-shadow: 0 0.3rem 0.75rem rgba(56, 116, 255, 0.3);
}

.lp-chevron {
  margin-left: auto;
  padding-left: 0.5rem;
  color: var(--phoenix-quaternary-color);
  font-size: 1rem;
  transition: transform 0.2s;
}

.lp-chevron.lp-open {
  transform: rotate(180deg);
}

/* Sub-menu: a thin line joins the items to their group (expanded sidebar only). */
html:not(.navbar-vertical-collapsed) .lp-sidebar #navbarVerticalNav .lp-sub {
  margin: 0.15rem 0 0.35rem 1.5rem;
  padding-left: 0.35rem;
  border-left: 1px solid var(--phoenix-border-color);
}

html:not(.navbar-vertical-collapsed) .lp-sidebar #navbarVerticalNav .lp-sub .nav-link {
  position: relative;
  margin: 1px 0;
  padding: 0.35rem 0.5rem;
  border-radius: 0.5rem;
  color: var(--phoenix-body-color);
}

html:not(.navbar-vertical-collapsed) .lp-sidebar #navbarVerticalNav .lp-sub .nav-link .nav-link-text {
  padding-left: 0;
}

html:not(.navbar-vertical-collapsed) .navbar-vertical.lp-sidebar .lp-sub .nav-link:hover {
  background-color: var(--phoenix-body-highlight-bg);
  color: var(--phoenix-emphasis-color);
}

html:not(.navbar-vertical-collapsed) .navbar-vertical.lp-sidebar .lp-sub .nav-link.active {
  background-color: var(--phoenix-primary-bg-subtle);
  color: var(--phoenix-primary);
  font-weight: 600;
}

/* The active child marks its spot on the tree line. */
html:not(.navbar-vertical-collapsed) .navbar-vertical.lp-sidebar .lp-sub .nav-link.active::before {
  content: '';
  position: absolute;
  top: 0.4rem;
  bottom: 0.4rem;
  left: calc(-0.35rem - 2px);
  width: 3px;
  border-radius: 3px;
  background-color: var(--phoenix-primary);
}

/* ----- User avatar (sidebar card, topbar chip, profile menu) ----- */
.lp-avatar {
  position: relative;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #3874ff 0%, #8b5cf6 55%, #ec4899 100%);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 0.25rem 0.75rem rgba(56, 116, 255, 0.28);
}

.lp-avatar-sm {
  width: 2.2rem;
  height: 2.2rem;
  font-size: 0.78rem;
}

.lp-avatar-md {
  width: 2.35rem;
  height: 2.35rem;
  font-size: 0.8rem;
}

.lp-avatar-lg {
  width: 3.4rem;
  height: 3.4rem;
  font-size: 1.1rem;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}

/* "Online" dot. */
.lp-avatar-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 0.7rem;
  height: 0.7rem;
  border: 2px solid var(--phoenix-body-bg);
  border-radius: 50%;
  background-color: #22c55e;
}

.lp-avatar-lg .lp-avatar-dot {
  width: 0.85rem;
  height: 0.85rem;
}

/* Signed-in user, at the bottom of the menu. */
.lp-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: auto 0.5rem 0.5rem;
  padding: 0.55rem 0.5rem 0.55rem 0.6rem;
  border: 1px solid var(--phoenix-border-color);
  border-radius: 0.85rem;
  background:
    linear-gradient(var(--phoenix-body-bg), var(--phoenix-body-bg)) padding-box,
    linear-gradient(135deg, rgba(56, 116, 255, 0.45), rgba(236, 72, 153, 0.35)) border-box;
  border-color: transparent;
  box-shadow: 0 0.35rem 1rem rgba(15, 23, 42, 0.06);
}

.lp-user-text {
  flex: 1;
  min-width: 0;
}

.lp-user-name {
  overflow: hidden;
  color: var(--phoenix-emphasis-color);
  font-size: 0.8rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lp-user-role {
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--phoenix-primary);
  font-size: 0.68rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lp-user-out {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border: 0;
  border-radius: 0.55rem;
  background: none;
  color: var(--phoenix-tertiary-color);
  font-size: 1rem;
  transition:
    background-color 0.15s,
    color 0.15s;
}

.lp-user-out:hover,
.lp-user-out:focus-visible {
  background-color: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

/* ----- Topbar: theme button, user chip, profile menu ----- */
.lp-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid var(--phoenix-border-color);
  border-radius: 50%;
  background-color: var(--phoenix-body-bg);
  color: var(--phoenix-tertiary-color);
  font-size: 1.1rem;
  transition:
    background-color 0.15s,
    color 0.15s,
    border-color 0.15s,
    transform 0.2s;
}

.lp-icon-btn:hover,
.lp-icon-btn:focus-visible {
  border-color: var(--phoenix-primary);
  background-color: var(--phoenix-primary-bg-subtle);
  color: var(--phoenix-primary);
}

.lp-icon-btn:active {
  transform: rotate(-20deg) scale(0.95);
}


/* Border is a gradient that starts grey; on hover it turns colourful and flows. */
.lp-user-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.25rem 0.6rem 0.25rem 0.25rem;
  border: 1.5px solid transparent;
  border-radius: 2rem;
  background:
    linear-gradient(var(--phoenix-body-bg), var(--phoenix-body-bg)) padding-box,
    linear-gradient(
        90deg,
        var(--phoenix-border-color),
        var(--phoenix-border-color),
        var(--phoenix-border-color)
      )
      border-box;
  background-size:
    100% 100%,
    300% 100%;
  color: inherit;
  text-decoration: none;
  transition:
    box-shadow 0.25s,
    transform 0.25s;
}

/* Phoenix underlines links on hover; the chip is a button-like link. */
.lp-user-chip,
.lp-user-chip:hover,
.lp-user-chip:focus,
.lp-user-chip * {
  text-decoration: none !important;
}

.lp-user-chip:hover,
.lp-user-chip:focus-visible,
.lp-user-chip[aria-expanded='true'] {
  background:
    linear-gradient(var(--phoenix-body-bg), var(--phoenix-body-bg)) padding-box,
    linear-gradient(90deg, #3874ff, #8b5cf6, #ec4899, #f97316, #8b5cf6, #3874ff) border-box;
  background-size:
    100% 100%,
    300% 100%;
  box-shadow: 0 0.4rem 1.2rem rgba(139, 92, 246, 0.22);
  transform: translateY(-1px);
  animation: lp-chip-flow 3s linear infinite;
}

@keyframes lp-chip-flow {
  from {
    background-position:
      0 0,
      0% 50%;
  }
  to {
    background-position:
      0 0,
      300% 50%;
  }
}

/* The name picks up the same colours. */
.lp-user-chip:hover .lp-user-chip-name,
.lp-user-chip:focus-visible .lp-user-chip-name,
.lp-user-chip[aria-expanded='true'] .lp-user-chip-name {
  background: linear-gradient(90deg, #3874ff, #8b5cf6, #ec4899, #3874ff);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: lp-chip-text 3s linear infinite;
}

@keyframes lp-chip-text {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 300% 50%;
  }
}

.lp-user-chip .lp-avatar {
  transition: transform 0.3s;
}

.lp-user-chip:hover .lp-avatar,
.lp-user-chip[aria-expanded='true'] .lp-avatar {
  transform: scale(1.06) rotate(-6deg);
}

.lp-user-chip:hover .lp-user-chip-caret {
  color: #8b5cf6;
}

@media (prefers-reduced-motion: reduce) {
  .lp-user-chip,
  .lp-user-chip .lp-avatar {
    transition: none;
  }

  .lp-user-chip:hover,
  .lp-user-chip:hover .lp-user-chip-name,
  .lp-user-chip[aria-expanded='true'],
  .lp-user-chip[aria-expanded='true'] .lp-user-chip-name {
    animation: none;
    transform: none;
  }
}

.lp-user-chip-text {
  flex-direction: column;
  max-width: 11rem;
  line-height: 1.15;
}

.lp-user-chip-name {
  overflow: hidden;
  color: var(--phoenix-emphasis-color);
  font-size: 0.8rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lp-user-chip-role {
  overflow: hidden;
  color: var(--phoenix-tertiary-color);
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lp-user-chip-caret {
  color: var(--phoenix-tertiary-color);
  font-size: 1rem;
  transition: transform 0.2s;
}

.lp-user-chip[aria-expanded='true'] .lp-user-chip-caret {
  transform: rotate(180deg);
}

.lp-profile-menu {
  width: 18rem;
  overflow: hidden;
  border-radius: 1rem !important;
}

.lp-profile-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.1rem 1rem;
  background: linear-gradient(120deg, #3874ff 0%, #6d5dfc 50%, #b84fd8 100%);
  color: #fff;
}

.lp-profile-head .lp-avatar {
  background: rgba(255, 255, 255, 0.2);
}

.lp-profile-head .lp-avatar-dot {
  border-color: #6d5dfc;
}

.lp-profile-head-text {
  min-width: 0;
}

.lp-profile-name {
  overflow: hidden;
  font-size: 0.95rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lp-profile-email {
  overflow: hidden;
  font-size: 0.72rem;
  opacity: 0.85;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lp-role-pill {
  padding: 0.1rem 0.5rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.2);
  font-size: 0.65rem;
  font-weight: 600;
}

.lp-menu-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.45rem 0.5rem;
  border: 0;
  border-radius: 0.6rem;
  background: none;
  color: var(--phoenix-body-color);
  font-size: 0.82rem;
  text-align: left;
  text-decoration: none;
  transition: background-color 0.15s;
}

.lp-menu-link:hover,
.lp-menu-link:focus-visible {
  background-color: var(--phoenix-body-highlight-bg);
  color: var(--phoenix-emphasis-color);
}

.lp-menu-icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 0.5rem;
  background-color: var(--phoenix-body-highlight-bg);
  color: var(--phoenix-primary);
  font-size: 0.95rem;
}

.lp-signout-btn {
  border: 1px solid rgba(239, 68, 68, 0.3);
  background-color: rgba(239, 68, 68, 0.08);
  color: #ef4444;
  font-weight: 600;
}

.lp-signout-btn:hover,
.lp-signout-btn:focus-visible {
  border-color: #ef4444;
  background-color: #ef4444;
  color: #fff;
}

/* Collapsed sidebar (4rem wide): icons only, centred; names show in Phoenix's hover flyouts and tooltips.
 * The #navbarVerticalNav id outranks Phoenix's collapsed rules (padding, active icon colour). */
.navbar-vertical-collapsed .navbar-vertical.lp-sidebar .lp-nav-heading,
.navbar-vertical-collapsed .navbar-vertical.lp-sidebar .lp-chevron,
.navbar-vertical-collapsed .navbar-vertical.lp-sidebar .lp-user-text,
.navbar-vertical-collapsed .navbar-vertical.lp-sidebar .lp-user-out {
  display: none;
}

.navbar-vertical-collapsed .lp-sidebar .lp-nav-content {
  padding-top: 1rem;
}

.navbar-vertical-collapsed .lp-sidebar #navbarVerticalNav > .nav-item {
  margin: 0 0 0.35rem;
}

/* A fixed-size square in the middle of the rail; the wrapper stays full width for the flyouts. */
.navbar-vertical-collapsed .lp-sidebar #navbarVerticalNav .nav-link.label-1 {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0 auto;
  padding: 0 !important;
  border-radius: 0.75rem;
}

.navbar-vertical-collapsed .lp-sidebar #navbarVerticalNav .nav-link.label-1 > div {
  justify-content: center;
}

.navbar-vertical-collapsed .lp-sidebar #navbarVerticalNav .lp-nav-icon {
  margin: 0;
}

/* Inactive icons stay grey (Phoenix colours the icon of a group with an active child). */
.navbar-vertical-collapsed .lp-sidebar #navbarVerticalNav .nav-link.label-1 .lp-nav-icon,
.navbar-vertical-collapsed .lp-sidebar #navbarVerticalNav .nav-item-wrapper:has(.active) .label-1 .nav-link-icon {
  color: var(--phoenix-tertiary-color);
}

.navbar-vertical-collapsed .lp-sidebar #navbarVerticalNav .nav-link.label-1:hover .lp-nav-icon {
  color: var(--phoenix-primary);
}

/* Current page / group: no extra pill, just the gradient icon with a white glyph. */
.navbar-vertical-collapsed .lp-sidebar #navbarVerticalNav .nav-link.label-1.active,
.navbar-vertical-collapsed .lp-sidebar #navbarVerticalNav .nav-link.label-1.lp-parent-active {
  background: none;
}

.navbar-vertical-collapsed .lp-sidebar #navbarVerticalNav .nav-link.label-1.active .lp-nav-icon,
.navbar-vertical-collapsed .lp-sidebar #navbarVerticalNav .nav-link.label-1.lp-parent-active .lp-nav-icon,
.navbar-vertical-collapsed .lp-sidebar #navbarVerticalNav .nav-item-wrapper:has(.active) .label-1 .lp-nav-icon {
  width: 2.35rem;
  height: 2.35rem;
  color: #fff !important;
}

/* The bar sits on the rail's left edge: (4rem - 2.75rem) / 2 to the left of the square. */
.navbar-vertical-collapsed .lp-sidebar #navbarVerticalNav .nav-link.label-1.active::before,
.navbar-vertical-collapsed .lp-sidebar #navbarVerticalNav .nav-link.label-1.lp-parent-active::before {
  top: 0.55rem;
  bottom: 0.55rem;
  left: -0.625rem;
}

.navbar-vertical-collapsed .navbar-vertical.lp-sidebar .lp-user {
  justify-content: center;
  margin: auto 0 0.75rem;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  .lp-chevron,
  .navbar-vertical.lp-sidebar .lp-nav-icon,
  .navbar-vertical.lp-sidebar .navbar-nav .nav-link.label-1 {
    transition: none;
  }
}

/* Hide the page-level (browser window) scrollbar; the page still scrolls. */
html,
body {
  scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

/* Inner scrollbars (lists, panels, tables) use the primary colour, like btn-primary. */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--phoenix-primary) transparent;
}

*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background-color: var(--phoenix-primary);
  border-radius: 1rem;
}

/* Lets text-truncate work inside flex rows. */
.min-w-0 {
  min-width: 0;
}

/* ----- User and Security Management: list + detail panels ----- */
.um-list {
  max-height: calc(100vh - 21rem);
  min-height: 12rem;
  overflow-y: auto;
}

/* Fixed-height list/detail cards; content scrolls inside. */
.um-panel {
  height: calc(100vh - 20rem);
  min-height: 24rem;
}

.um-panel > .card-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.um-panel .um-list {
  flex: 1 1 auto;
  max-height: none;
  min-height: 0;
}

.um-panel-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

/* Keep column headers visible while the access table scrolls. */
.um-access-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background-color: var(--phoenix-body-highlight-bg);
}

.um-list-item {
  cursor: pointer;
  border-left: 3px solid transparent;
}

.um-list-item:hover {
  background-color: var(--phoenix-body-highlight-bg);
}

.um-list-item.active {
  background-color: var(--phoenix-primary-bg-subtle);
  border-left-color: var(--phoenix-primary);
}

.um-access-table th,
.um-access-table td {
  vertical-align: middle;
}

/* Centered permission checkboxes (not the labelled custom-action checks). */
.um-access-table td > .form-check-input,
.um-access-table th > .form-check-input {
  float: none;
  margin: 0;
}

/* ----- Shared accent -----
 * Filled elements with white text. Phoenix's primary turns pale in dark mode,
 * so dark mode uses a deeper blue that stays readable. */
:root {
  --studio-accent: var(--phoenix-primary);
  --studio-accent-hover: var(--phoenix-primary-dark);
  --studio-accent-text: #fff;
}

[data-bs-theme='dark'] {
  --studio-accent: #1f3b8f;
  --studio-accent-hover: #2a4aa8;
  --studio-accent-text: #e8eeff;
}

/* ----- Laravel layout additions ----- */

/* Sidebar groups open with Bootstrap collapse; the chevron follows aria-expanded. */
.lp-sidebar .nav-link[aria-expanded='true'] .lp-chevron {
  transform: rotate(180deg);
}

/* Role chips on the Users form (one role per user). */
.um-role-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.um-role-chip.btn-primary {
  background-color: var(--studio-accent);
  border-color: var(--studio-accent);
  color: var(--studio-accent-text);
}

/* Section labels in the User / Role forms, like the low-code screens. */
.um-form .form-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ----- Themed confirm dialog (components/confirm-dialog) ----- */
.lp-confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1090;
  background-color: rgba(15, 23, 42, 0.5);
}

.lp-confirm {
  position: fixed;
  inset: 0;
  z-index: 1095;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lp-confirm-card {
  width: 100%;
  max-width: 26rem;
  border-radius: 1rem;
  box-shadow: 0 1.5rem 3rem rgba(15, 23, 42, 0.25);
}

.lp-confirm-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background-color: var(--phoenix-primary-bg-subtle);
  color: var(--phoenix-primary);
  font-size: 1.35rem;
}

.lp-confirm-icon.is-danger {
  background-color: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

[x-cloak] {
  display: none !important;
}

/* ----- Sign-in page (auth/login): full-screen picture, brand bottom left, form card on the right -----
 * Picture, title and description come from Administration > Settings. */
.lp-login {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  min-height: 100vh;
  padding: 1.5rem 1rem;
  overflow: hidden;
  background-color: #0f172a;
}

.lp-login-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
}

/* Darker towards the bottom left so the white brand text reads on any picture. */
.lp-login::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top right, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.35) 45%, rgba(15, 23, 42, 0.05) 100%);
}

.lp-login-brand,
.lp-login-panel {
  position: relative;
  z-index: 1;
}

.lp-login-brand {
  max-width: 36rem;
  color: #fff;
  text-align: center;
}

/* Uploaded logos keep their shape: fixed height, width follows (max so a wide logo does not take over). */
.lp-login-logo {
  display: block;
  width: auto;
  max-width: 14rem;
  height: 3.5rem;
  margin-bottom: 1rem;
  object-fit: contain;
  object-position: left center;
}

.lp-topbar-logo {
  width: auto;
  max-width: 9rem;
  height: 1.75rem;
  object-fit: contain;
}

/* Logo thumbnail in Settings: a neutral box so transparent PNGs show. */
.lp-logo-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  padding: 0.4rem;
  border: 1px solid var(--phoenix-border-color);
  border-radius: 0.75rem;
  background-color: var(--phoenix-body-highlight-bg);
}

.lp-logo-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lp-login-hero-title {
  margin-bottom: 0.5rem;
  color: #fff;
  font-size: 1.75rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.lp-login-hero-desc {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.lp-login-panel {
  width: 100%;
  max-width: 26rem;
}

/* Frosted glass: the picture shows through, blurred; the theme colour keeps text readable in light and dark. */
.lp-login-card {
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 1.25rem;
  background-color: rgba(var(--phoenix-body-bg-rgb), 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1.5rem 3rem rgba(15, 23, 42, 0.35);
}

[data-bs-theme='dark'] .lp-login-card {
  border-color: rgba(255, 255, 255, 0.12);
  background-color: rgba(var(--phoenix-body-bg-rgb), 0.65);
}

/* Inputs stay a little see-through too, but solid enough to type on. */
.lp-login-card .form-control {
  background-color: rgba(var(--phoenix-body-bg-rgb), 0.6);
}

/* Browsers without backdrop blur get a solid, readable card. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .lp-login-card {
    background-color: var(--phoenix-body-bg);
  }
}

/* Wide screens: brand sits bottom left, the card floats on the right, vertically centred. */
@media (min-width: 992px) {
  .lp-login {
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
    padding: 3rem 5vw;
  }

  .lp-login-brand {
    align-self: flex-end;
    text-align: left;
  }

  .lp-login-hero-title {
    font-size: 2.5rem;
  }

  .lp-login-panel {
    flex: none;
    align-self: center;
  }
}

/* Settings: a small copy of the sign-in page. */
.lp-login.lp-login-preview {
  flex-direction: row;
  align-items: stretch;
  justify-content: space-between;
  min-height: 16rem;
  height: 100%;
  padding: 1.25rem;
  border-radius: 0.75rem;
}

.lp-login-preview .lp-login-brand {
  align-self: flex-end;
  text-align: left;
}

.lp-login-preview .lp-login-logo {
  max-width: 8rem;
  height: 2rem;
  margin-bottom: 0.5rem;
}

.lp-login-preview .lp-login-hero-title {
  font-size: 1.25rem;
}

.lp-login-preview .lp-login-hero-desc {
  font-size: 0.75rem;
}

.lp-login-preview-card {
  flex: none;
  align-self: center;
  width: 32%;
  min-width: 7rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 0.75rem;
  background-color: rgba(var(--phoenix-body-bg-rgb), 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 0.75rem 1.5rem rgba(15, 23, 42, 0.35);
}

.lp-login-preview-card span {
  display: block;
  height: 0.55rem;
  margin-bottom: 0.5rem;
  border-radius: 1rem;
  background-color: var(--phoenix-body-highlight-bg);
}

.lp-login-preview-card span:first-child {
  width: 55%;
  margin: 0 auto 0.85rem;
  background-color: var(--phoenix-border-color);
}

.lp-login-preview-card span:last-child {
  margin: 0.85rem 0 0;
  background-color: var(--phoenix-primary);
}

