/**
 * LiGEN Admin Portal — app shell styles.
 */

.ligen-portal-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans, 'Inter', system-ui, sans-serif);
  background: var(--ll-bg);
  color: var(--ll-text);
  -webkit-font-smoothing: antialiased;
}

html:has(.ligen-portal-body),
.ligen-portal-body {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

html:has(.ligen-portal-body) #wpadminbar,
.ligen-portal-body #wpadminbar {
  display: none !important;
}

.ligen-portal-body .site-header,
.ligen-portal-body .site-footer,
.ligen-portal-body .bottom-bar,
.ligen-portal-body .mobile-drawer,
.ligen-portal-body .mobile-overlay,
.ligen-portal-body .ligenlab-search-sheet,
.ligen-portal-body .header-progress {
  display: none !important;
}

.ligen-portal-body,
.ligen-portal-body.has-bottom-bar {
  padding-bottom: 0 !important;
  padding-top: 0 !important;
}

/* Kill leaked theme section/page chrome inside portal */
.ligen-portal-body section,
.ligen-portal-body .ll-dash-section,
.ligen-portal-body .ll-dash-hero,
.ligen-portal-body .ll-dash-tips {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.ligen-portal-body .ll-dash-hero,
.ligen-portal-body .ll-dash-tips {
  padding: 16px !important;
}

.ligen-portal-body a {
  text-decoration: none;
}

.ll-app,
.ll-portal-login,
.ll-topbar {
  margin-top: 0;
}

/* Theme tokens — match main website */
.ligen-portal-body {
  --ll-bg: #0e1014;
  --ll-bg-elevated: #1c1f27;
  --ll-bg-card: #181b22;
  --ll-bg-input: #22262f;
  --ll-border: rgba(255, 255, 255, 0.08);
  --ll-text: #ffffff;
  --ll-muted: #a8aeb8;
  --ll-accent: #e4461e;
  --ll-accent-2: #f3ad0f;
  --ll-accent-rgb: 228, 70, 30;
  --ll-gradient: linear-gradient(135deg, #e4461e 0%, #ee7a12 50%, #f3ad0f 100%);
  --ll-glass: rgba(24, 27, 34, 0.52);
  --ll-glass-strong: rgba(24, 27, 34, 0.7);
  --ll-glass-border: rgba(255, 255, 255, 0.1);
  --ll-radius: 16px;
  --ll-radius-sm: 12px;
  --ll-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
}

html[data-theme="light"] .ligen-portal-body {
  --ll-bg: #f7f6f4;
  --ll-bg-elevated: #f1efeb;
  --ll-bg-card: #ffffff;
  --ll-bg-input: #f0f1f3;
  --ll-border: rgba(0, 0, 0, 0.07);
  --ll-text: #16181d;
  --ll-muted: #6a717c;
  --ll-glass: rgba(255, 255, 255, 0.62);
  --ll-glass-strong: rgba(255, 255, 255, 0.82);
  --ll-glass-border: rgba(0, 0, 0, 0.07);
  --ll-shadow: 0 14px 36px rgba(0, 0, 0, 0.08);
  background: var(--ll-bg);
  color: var(--ll-text);
}

.ll-logo-on-light { display: none !important; }
.ll-logo-on-dark { display: block !important; }
html[data-theme="light"] .ll-logo-on-light { display: block !important; }
html[data-theme="light"] .ll-logo-on-dark { display: none !important; }

.ll-portal-logo-img {
  display: block;
  width: 40px;
  height: 40px;
  max-width: none;
  object-fit: contain;
  border-radius: 50%;
  filter: none !important;
}

.ll-portal-login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.ll-portal-login-logo .ll-portal-logo-img {
  width: 72px;
  height: 72px;
  margin: 0 auto;
}

.ll-icon-sun { display: block; width: 18px; height: 18px; }
.ll-icon-moon { display: none; width: 18px; height: 18px; }
html[data-theme="light"] .ll-icon-sun { display: none; }
html[data-theme="light"] .ll-icon-moon { display: block; }

/* ── Login ─────────────────────────────────────────────────── */
.ll-portal-login {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  position: relative;
}

.ll-portal-login--center {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  grid-template-columns: none;
}

.ll-portal-theme-fab {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 20;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--ll-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ll-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ll-portal-login-brand {
  padding: clamp(40px, 8vw, 80px) clamp(28px, 5vw, 64px);
  background: rgba(28, 31, 39, 0.55);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  border-right: 1px solid var(--ll-glass-border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

html[data-theme="light"] .ll-portal-login-brand {
  background: rgba(248, 249, 250, 0.7);
}

.ll-portal-badge {
  display: inline-flex;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--ll-border);
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
}

html[data-theme="light"] .ll-portal-badge {
  background: rgba(var(--ll-accent-rgb, 228, 70, 30), 0.1);
  color: var(--ll-accent);
}

.ll-portal-login-brand h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #fff;
}

html[data-theme="light"] .ll-portal-login-brand h1 {
  color: var(--ll-text);
}

.ll-portal-login-brand > p {
  margin: 0;
  max-width: 34ch;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.05rem;
  line-height: 1.55;
}

html[data-theme="light"] .ll-portal-login-brand > p {
  color: var(--ll-muted);
}

.ll-portal-features {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ll-portal-features li {
  position: relative;
  padding-left: 28px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.95rem;
}

html[data-theme="light"] .ll-portal-features li {
  color: var(--ll-text);
}

.ll-portal-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ll-gradient);
  box-shadow: 0 0 0 3px rgba(var(--ll-accent-rgb, 228, 70, 30), 0.18);
}

.ll-portal-features li::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 0.55em;
  width: 6px;
  height: 4px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}

.ll-portal-login-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
  background: var(--ll-bg);
}

.ll-portal-login-card {
  width: 100%;
  max-width: 420px;
  padding: 32px 28px;
  border-radius: 22px;
  border: 1px solid var(--ll-glass-border);
  background: var(--ll-glass-strong);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  box-shadow: var(--ll-shadow);
}

.ll-portal-login-card h2 {
  margin: 0;
  text-align: center;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.ll-portal-login-sub {
  margin: 8px 0 22px;
  text-align: center;
  color: var(--ll-muted);
  font-size: 0.95rem;
}

.ll-portal-error {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 80, 80, 0.12);
  color: #ff7a7a;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
}

.ll-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.ll-field > span {
  font-size: 0.875rem;
  font-weight: 600;
}

.ll-field input,
.ll-editor-form input[type="text"],
.ll-editor-form input[type="url"],
.ll-editor-form textarea,
.ll-editor-form select {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid var(--ll-border);
  background: var(--ll-bg-input);
  color: var(--ll-text);
  font: inherit;
  font-size: 0.95rem;
}

.ll-field input:focus,
.ll-editor-form input:focus,
.ll-editor-form textarea:focus,
.ll-editor-form select:focus {
  outline: none;
  border-color: rgba(var(--ll-accent-rgb, 228, 70, 30), 0.55);
  box-shadow: 0 0 0 3px rgba(var(--ll-accent-rgb, 228, 70, 30), 0.15);
}

.ll-password-wrap {
  position: relative;
  display: block;
}

.ll-password-wrap input {
  padding-right: 72px;
}

.ll-password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--ll-accent);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
}

.ll-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 18px;
  color: var(--ll-muted);
  font-size: 0.875rem;
  cursor: pointer;
}

.ll-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 0.22s cubic-bezier(0.34, 1.2, 0.64, 1),
    box-shadow 0.22s ease,
    filter 0.22s ease,
    opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.ll-btn-primary,
.ll-btn-glass {
  color: #fff;
  border-color: transparent;
  background: var(--ll-gradient);
  box-shadow: 0 4px 16px rgba(var(--ll-accent-rgb, 228, 70, 30), 0.3);
}

.ll-btn-primary:hover,
.ll-btn-glass:hover {
  border-color: transparent;
  background: linear-gradient(135deg, #eb5528 0%, #f08a1c 50%, #f5b82a 100%);
  transform: translateY(-2px);
  color: #fff;
  box-shadow: 0 8px 22px rgba(var(--ll-accent-rgb, 228, 70, 30), 0.38);
}

.ll-btn-primary:active,
.ll-btn-glass:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(var(--ll-accent-rgb, 228, 70, 30), 0.28);
}

.ll-btn-block {
  width: 100%;
}

.ll-portal-back {
  display: block;
  margin-top: 18px;
  text-align: center;
  color: var(--ll-accent);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

/* ── App shell ─────────────────────────────────────────────── */
.ll-app {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  background: var(--ll-bg);
  color: var(--ll-text);
}

.ll-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  padding: 20px 14px;
  border-right: 1px solid var(--ll-glass-border);
  background: var(--ll-glass);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  display: flex;
  flex-direction: column;
  gap: 24px;
  z-index: 40;
}

.ll-sidebar-brand {
  display: flex;
  align-items: center;
  padding: 4px 8px 8px;
}

.ll-sidebar-brand .ll-site-logo {
  display: block;
  width: auto;
  height: 32px;
  max-width: 160px;
  object-fit: contain;
  border-radius: 0;
  filter: none !important;
}

.ll-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ll-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 12px;
  color: var(--ll-muted);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}

.ll-nav-link:hover {
  color: var(--ll-text);
  background: rgba(var(--ll-accent-rgb, 228, 70, 30), 0.08);
}

.ll-nav-link.is-active {
  color: #fff;
  background: var(--ll-gradient);
  box-shadow: 0 6px 16px rgba(var(--ll-accent-rgb, 228, 70, 30), 0.22);
}

.ll-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: inherit;
}

.ll-nav-icon svg {
  display: block;
  width: 20px;
  height: 20px;
}

.ll-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.ll-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--ll-glass-border);
  background: var(--ll-glass);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
}

html[data-theme="light"] .ll-topbar {
  background: var(--ll-glass);
}

.ll-topbar-left,
.ll-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ll-topbar-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.ll-topbar-logo .ll-portal-logo-img {
  width: 36px;
  height: 36px;
}

.ll-topbar-kicker {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ll-accent);
  line-height: 1.2;
}

.ll-topbar-brand {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.ll-topbar-brand strong {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ll-topbar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  padding: 8px 14px;
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--ll-gradient);
  box-shadow: 0 4px 14px rgba(var(--ll-accent-rgb, 228, 70, 30), 0.28);
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.ll-topbar-link:hover {
  color: #fff;
  background: linear-gradient(135deg, #eb5528 0%, #f08a1c 50%, #f5b82a 100%);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(var(--ll-accent-rgb, 228, 70, 30), 0.34);
}

.ll-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--ll-border);
  background: transparent;
  color: var(--ll-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ll-icon-btn svg {
  width: 18px;
  height: 18px;
}

.ll-menu-btn {
  display: none;
}

.ll-content {
  padding: 16px 20px 48px;
  max-width: 1080px;
  width: 100%;
  box-sizing: border-box;
}

.ll-page-head {
  margin-bottom: 16px;
}

.ll-page-head--dash {
  margin-bottom: 4px;
}

.ll-page-head h1 {
  margin: 0 0 6px;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.ll-page-head p {
  margin: 0;
  color: var(--ll-muted);
  font-size: 0.9rem;
}

/* ── Dashboard ─────────────────────────────────────────────── */
.ll-dash {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ll-dash-section {
  margin: 0;
  padding: 0;
}

.ll-dash-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(160px, 0.7fr);
  gap: 12px;
  align-items: stretch;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--ll-glass-border);
  background: var(--ll-glass);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  box-shadow: var(--ll-shadow);
}

html[data-theme="light"] .ll-dash-hero {
  background: var(--ll-glass);
  border-color: var(--ll-glass-border);
  box-shadow: var(--ll-shadow);
}

.ll-dash-badge {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(var(--ll-accent-rgb, 228, 70, 30), 0.16);
  color: var(--ll-accent-2);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

html[data-theme="light"] .ll-dash-badge {
  color: var(--ll-accent);
  background: rgba(var(--ll-accent-rgb, 228, 70, 30), 0.1);
}

.ll-dash-hero-copy h1,
.ll-dash-hero-copy .ll-dash-welcome {
  margin: 0 0 6px;
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
}

html[data-theme="light"] .ll-dash-hero-copy h1,
html[data-theme="light"] .ll-dash-hero-copy .ll-dash-welcome {
  color: var(--ll-text);
}

.ll-dash-hero-copy p {
  margin: 0;
  max-width: 36ch;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.875rem;
  line-height: 1.45;
}

html[data-theme="light"] .ll-dash-hero-copy p {
  color: var(--ll-muted);
}

.ll-dash-hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-content: center;
}

.ll-dash-hero-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--ll-glass-border);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

html[data-theme="light"] .ll-dash-hero-stat {
  background: rgba(255, 255, 255, 0.55);
  border-color: var(--ll-glass-border);
}

.ll-dash-hero-stat span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

html[data-theme="light"] .ll-dash-hero-stat span {
  color: var(--ll-muted);
}

.ll-dash-hero-stat strong {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  background: var(--ll-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ll-dash-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.ll-dash-section-head h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
}

.ll-dash-section-head span {
  color: var(--ll-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.ll-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ll-stat-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 6px;
  align-items: center;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--ll-card-accent, #e4461e) 28%, var(--ll-glass-border));
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--ll-card-accent, #e4461e) 14%, transparent), transparent 55%),
    var(--ll-glass);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.ll-stat-card--apps { --ll-card-accent: #e4461e; }
.ll-stat-card--systems { --ll-card-accent: #6b9fd4; }
.ll-stat-card--services { --ll-card-accent: #4db8a8; }
.ll-stat-card--clients { --ll-card-accent: #b08ad4; }
.ll-stat-card--reviews { --ll-card-accent: #f3ad0f; }
.ll-stat-card--users { --ll-card-accent: #6bbf8a; }

.ll-stat-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--ll-card-accent, #e4461e);
  opacity: 0.95;
}

.ll-stat-card:hover {
  border-color: color-mix(in srgb, var(--ll-card-accent, #e4461e) 55%, transparent);
  transform: translateY(-3px);
  box-shadow: 0 14px 28px color-mix(in srgb, var(--ll-card-accent, #e4461e) 22%, rgba(0, 0, 0, 0.2));
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--ll-card-accent, #e4461e) 22%, transparent), transparent 60%),
    var(--ll-glass-strong);
}

.ll-stat-icon {
  grid-row: 1 / span 2;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--ll-card-accent, #e4461e) 18%, transparent);
  color: var(--ll-card-accent, #e4461e);
}

.ll-stat-icon svg {
  width: 18px;
  height: 18px;
}

.ll-stat-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ll-stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ll-muted);
}

.ll-stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ll-text);
}

.ll-stat-hint {
  grid-column: 2;
  justify-self: end;
  align-self: end;
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  color: var(--ll-card-accent, #e4461e);
  opacity: 0.85;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.ll-stat-card:hover .ll-stat-hint {
  opacity: 1;
  transform: translateX(3px);
}

.ll-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ll-quick-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid var(--ll-glass-border);
  background: var(--ll-glass);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.ll-quick-card:hover {
  border-color: rgba(var(--ll-accent-rgb, 228, 70, 30), 0.35);
  transform: translateY(-2px);
  background: var(--ll-glass-strong);
}

.ll-quick-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ll-gradient);
  color: #fff;
}

.ll-quick-icon svg {
  width: 18px;
  height: 18px;
}

.ll-quick-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ll-quick-copy strong {
  font-size: 0.95rem;
}

.ll-quick-copy span {
  color: var(--ll-muted);
  font-size: 0.8rem;
}

.ll-quick-arrow {
  color: var(--ll-accent);
  font-weight: 700;
}

.ll-dash-tips {
  position: relative;
  overflow: hidden;
  padding: 14px 14px;
  border-radius: 16px;
  border: 1px solid var(--ll-glass-border);
  background: var(--ll-glass);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}

.ll-dash-tips-glow {
  display: none;
}

.ll-dash-tips h2 {
  position: relative;
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.ll-dash-tips .ll-tips {
  position: relative;
  margin-bottom: 12px;
}

.ll-dash-tips .ll-btn {
  position: relative;
  display: inline-flex;
  width: auto;
  max-width: 100%;
}

.ll-panel-card {
  padding: 20px 18px;
  border-radius: var(--ll-radius);
  border: 1px solid var(--ll-glass-border);
  background: var(--ll-glass);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.ll-panel-card h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

.ll-tips {
  margin: 0;
  padding-left: 18px;
  color: var(--ll-muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
}

.ll-toast {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
}

.ll-toast--success {
  background: rgba(46, 180, 100, 0.14);
  color: #3dd68c;
}

html[data-theme="light"] .ll-toast--success {
  color: #0f8a4b;
}

.ll-toast--error {
  background: rgba(255, 80, 80, 0.12);
  color: #ff7a7a;
}

.ll-form-actions--static {
  position: static;
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

.ll-users-create {
  margin-bottom: 16px;
}

.ll-users-create h2,
.ll-users-list-card h2 {
  margin: 0 0 14px;
  font-size: 1.05rem;
}

.ll-users-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 14px;
}

.ll-users-grid .ll-span-2 {
  grid-column: 1 / -1;
}

.ll-users-note {
  margin: 4px 0 12px;
  color: var(--ll-muted);
  font-size: 0.8125rem;
}

.ll-users-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ll-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--ll-border);
  background: var(--ll-bg-input);
}

.ll-user-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ll-user-meta strong {
  font-size: 0.95rem;
}

.ll-user-meta span {
  color: var(--ll-muted);
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ll-user-role {
  color: var(--ll-accent) !important;
  font-weight: 600;
}

.ll-user-delete-btn {
  border: 0;
  background: transparent;
  color: #ff7a7a;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.ll-form-actions {
  position: sticky;
  bottom: 16px;
  margin-top: 18px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--ll-glass-border);
  background: var(--ll-glass-strong);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  display: flex;
  justify-content: flex-end;
}

html[data-theme="light"] .ll-form-actions {
  background: var(--ll-glass-strong);
}

/* Editor cards inside portal */
.ligen-portal-body .ligenlab-card {
  background: var(--ll-glass);
  border: 1px solid var(--ll-glass-border);
  border-radius: var(--ll-radius);
  box-shadow: none;
  padding: 16px 16px 8px;
  margin-bottom: 14px;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  color: var(--ll-text);
}

.ligen-portal-body .ligenlab-card input[type="text"],
.ligen-portal-body .ligenlab-card input[type="url"],
.ligen-portal-body .ligenlab-card input[type="email"],
.ligen-portal-body .ligenlab-card input[type="number"],
.ligen-portal-body .ligenlab-card input[type="password"],
.ligen-portal-body .ligenlab-card textarea,
.ligen-portal-body .ligenlab-card select {
  width: 100%;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid var(--ll-border);
  background: var(--ll-bg-input);
  color: var(--ll-text);
  padding: 10px 12px;
}

.ligen-portal-body .ligenlab-admin-intro {
  color: var(--ll-muted);
}

.ligen-portal-body .ligenlab-card-header {
  border-bottom-color: var(--ll-border);
  color: var(--ll-text);
}

.ligen-portal-body .ligenlab-grid label {
  color: var(--ll-text);
  font-size: 0.8125rem;
}

.ligen-portal-body .ligenlab-image-preview {
  background: var(--ll-bg-input);
  border-color: var(--ll-border);
}

.ligen-portal-body .button,
.ligen-portal-body .button-primary,
.ligen-portal-body .button-link-delete {
  border-radius: 999px !important;
  border: 1px solid var(--ll-border) !important;
  background: var(--ll-bg-input) !important;
  color: var(--ll-text) !important;
  height: auto !important;
  line-height: 1.35 !important;
  padding: 8px 14px !important;
  box-shadow: none !important;
  text-decoration: none !important;
  cursor: pointer;
}

.ligen-portal-body .button-primary,
.ligen-portal-body .ll-btn-primary.button {
  position: relative !important;
  overflow: hidden !important;
  border: 1px solid transparent !important;
  background: var(--ll-gradient) !important;
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(var(--ll-accent-rgb, 228, 70, 30), 0.3) !important;
}

.ligen-portal-body .button-primary:hover,
.ligen-portal-body .ll-btn-primary.button:hover {
  border-color: transparent !important;
  background: linear-gradient(135deg, #eb5528 0%, #f08a1c 50%, #f5b82a 100%) !important;
  transform: translateY(-1px);
}

.ligen-portal-body .button-link-delete {
  border: 0 !important;
  background: transparent !important;
  color: #ff7a7a !important;
  padding: 0 !important;
}

.ligen-portal-body .description {
  color: var(--ll-muted);
}

.ll-sidebar-backdrop {
  display: none;
}

.ll-bottom-nav {
  display: none;
}

.ll-apps-sheet {
  display: none;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 960px) {
  .ll-portal-login {
    grid-template-columns: 1fr;
    align-items: center;
    justify-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 72px 18px calc(28px + env(safe-area-inset-bottom));
    box-sizing: border-box;
    background: var(--ll-bg);
  }

  html[data-theme="light"] .ll-portal-login {
    background: var(--ll-bg);
  }

  .ll-portal-login-brand {
    display: none;
  }

  .ll-portal-login-main {
    width: 100%;
    max-width: 420px;
    padding: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .ll-portal-login-card {
    width: 100%;
    max-width: 100%;
    padding: 28px 22px 24px;
    border-radius: 24px;
    border: 1px solid var(--ll-glass-border);
    background: var(--ll-bg-card);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  html[data-theme="light"] .ll-portal-login-card {
    background: #fff;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
  }

  .ll-portal-theme-fab {
    top: calc(12px + env(safe-area-inset-top));
    right: 14px;
    width: 40px;
    height: 40px;
    background: var(--ll-bg-card);
    border-color: var(--ll-glass-border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  }

  .ll-portal-login-logo {
    margin-bottom: 16px;
  }

  .ll-portal-login-logo .ll-portal-logo-img {
    width: 64px;
    height: 64px;
  }

  .ll-portal-login-card h2 {
    font-size: 1.65rem;
  }

  .ll-portal-login-sub {
    margin: 6px 0 20px;
    font-size: 0.9rem;
  }

  .ll-field {
    margin-bottom: 14px;
  }

  .ll-field input {
    padding: 14px 14px;
    border-radius: 12px;
    background: var(--ll-bg-input);
  }

  .ll-check {
    margin: 2px 0 16px;
  }

  .ll-btn-block,
  .ll-portal-login-form .ll-btn,
  .ll-portal-login-form button[type="submit"] {
    display: flex !important;
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 14px 18px !important;
    border-radius: 14px !important;
    font-size: 1rem !important;
    min-height: 48px !important;
    line-height: 1.3 !important;
    box-sizing: border-box;
  }

  .ll-portal-back {
    margin-top: 16px;
    font-size: 0.875rem;
  }

  .ll-app {
    grid-template-columns: 1fr;
  }

  .ll-sidebar,
  .ll-sidebar-backdrop {
    display: none !important;
  }

  .ll-content {
    padding: 12px 14px 110px;
  }

  .ll-dash-hero {
    grid-template-columns: 1fr;
    padding: 14px;
    gap: 10px;
  }

  .ll-dash-hero-stats {
    grid-template-columns: 1fr 1fr;
  }

  .ll-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ll-quick-grid {
    grid-template-columns: 1fr;
  }

  .ll-bottom-nav {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    padding: 0 16px calc(12px + env(safe-area-inset-bottom));
    pointer-events: none;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .ll-bottom-nav-dock {
    pointer-events: auto;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    gap: 2px;
    max-width: 420px;
    margin: 0 auto;
    padding: 8px 6px;
    min-height: 64px;
    border-radius: 28px;
    border: 1px solid var(--ll-glass-border);
    background: var(--ll-glass-strong);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  }

  html[data-theme="light"] .ll-bottom-nav-dock {
    background: rgba(255, 255, 255, 0.94);
  }

  .ll-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    min-height: 48px;
    padding: 6px 2px;
    border: 0;
    border-radius: 18px;
    background: transparent;
    color: var(--ll-muted);
    text-decoration: none;
    font: inherit;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.1;
    text-align: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .ll-bottom-nav-item .ll-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: inherit;
  }

  .ll-bottom-nav-item .ll-nav-icon svg {
    display: block;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
  }

  .ll-bottom-nav-label {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
  }

  .ll-bottom-nav-item.is-active {
    color: #fff;
    background: var(--ll-gradient);
  }

  .ll-apps-sheet {
    position: fixed;
    inset: 0;
    z-index: 60;
  }

  .ll-apps-sheet[hidden] {
    display: none !important;
  }

  .ll-apps-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
  }

  .ll-apps-sheet-panel {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: calc(92px + env(safe-area-inset-bottom));
    max-width: 420px;
    margin: 0 auto;
    padding: 14px 12px 16px;
    border-radius: 20px;
    border: 1px solid var(--ll-glass-border);
    background: var(--ll-glass-strong);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    box-shadow: var(--ll-shadow);
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .ll-apps-sheet-handle {
    width: 36px;
    height: 4px;
    border-radius: 999px;
    background: var(--ll-border);
    margin: 0 auto 6px;
  }

  .ll-apps-sheet-title {
    margin: 0 4px 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ll-muted);
    text-align: center;
  }

  .ll-apps-sheet-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px;
    border-radius: 14px;
    color: var(--ll-text);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--ll-glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .ll-apps-sheet-link.is-active {
    border-color: transparent;
    background: var(--ll-gradient);
    color: #fff;
  }

  .ll-topbar-link {
    font-size: 0.8rem;
  }

  .ll-topbar-logo .ll-portal-logo-img {
    width: 34px;
    height: 34px;
  }

  .ll-form-actions {
    bottom: 88px;
  }
}

@media (max-width: 560px) {
  .ll-portal-login {
    padding-left: 14px;
    padding-right: 14px;
  }

  .ll-portal-login-card {
    padding: 26px 18px 22px;
    border-radius: 22px;
  }

  .ll-stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ll-topbar {
    padding: 12px 14px;
  }

  .ligen-portal-body .ligenlab-grid,
  .ll-users-grid {
    grid-template-columns: 1fr;
  }

  .ll-user-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
