/* Custom deep-green theme overrides for OmicVerse */

/* Primary palette */
:root {
  --ov-primary: #0b7a27; /* deep green */
  --ov-primary-dark: #096a22;
  --ov-primary-contrast: #ffffff;
  /* Bootstrap v5 variables (if present) */
  --bs-primary: var(--ov-primary);
  --bs-primary-rgb: 11, 122, 39;
}

/* Basic utility overrides */
.text-primary { color: var(--ov-primary) !important; }
.bg-primary { background-color: var(--ov-primary) !important; }
.border-primary { border-color: var(--ov-primary) !important; }
a { color: var(--ov-primary); }
a:hover { color: var(--ov-primary-dark); }

/* Buttons */
.btn-primary {
  color: var(--ov-primary-contrast) !important;
  background-color: var(--ov-primary) !important;
  border-color: var(--ov-primary) !important;
}
.btn-primary:hover,
.btn-primary:focus {
  color: var(--ov-primary-contrast) !important;
  background-color: var(--ov-primary-dark) !important;
  border-color: var(--ov-primary-dark) !important;
}
.btn.btn-primary { background-color: var(--ov-primary) !important; border-color: var(--ov-primary) !important; }
.btn.btn-primary:hover { background-color: var(--ov-primary-dark) !important; border-color: var(--ov-primary-dark) !important; }
.btn-outline-primary {
  color: var(--ov-primary) !important;
  border-color: var(--ov-primary) !important;
}
.btn-outline-primary:hover {
  color: var(--ov-primary-contrast) !important;
  background-color: var(--ov-primary) !important;
  border-color: var(--ov-primary) !important;
}

/* Badges, links, nav active, etc. */
.badge.bg-primary { background-color: var(--ov-primary) !important; }
.nav-link.active,
.nxl-link.active,
.nxl-link:focus { color: var(--ov-primary) !important; }

/* Spinner, toggles */
.text-primary { color: var(--ov-primary) !important; }

/* Top-right brand logo */
.brand-logo-top {
  height: 28px;
  display: inline-block;
}

.brand-logo-left { height: 32px; display: inline-block; }

/* Make left brand logo scale with navigation width and keep tone consistent */
.nxl-navigation .m-header { padding: 0 !important; background-color: inherit !important; }
.nxl-navigation .m-header .b-brand { display: block; width: 100%; padding: 8px 12px; }
.nxl-navigation .m-header .brand-logo-left {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 32px; /* fits reduced 42px header height */
  object-fit: contain;
  background: transparent; /* let nav background show through */
  display: block;
}
.nxl-navigation.mini .m-header .brand-logo-left {
  max-height: 28px;
}
/* For non-transparent logo assets in dark mode, blend slightly to match tone */
html.app-skin-dark .nxl-navigation .m-header .brand-logo-left { mix-blend-mode: multiply; }

/* Dark mode adjustments */
.app-skin-dark .brand-logo-top,
.app-skin-dark .brand-logo-left { filter: brightness(1.05) contrast(1.05); }
.app-skin-dark {
  /* Override template dark primary to deep green */
  --nxl-primary: var(--ov-primary);
  --nxl-primary-rgb: 11, 122, 39;
}
.app-skin-dark a { color: var(--ov-primary) !important; }
.app-skin-dark a:hover { color: var(--ov-primary-dark) !important; }
/* Ensure primary text/icon color in dark mode is deep green, even inside header links */
html.app-skin-dark .text-primary,
html.app-skin-dark i.text-primary,
html.app-skin-dark .nxl-head-link .text-primary,
html.app-skin-dark .nxl-head-link i.text-primary,
html.app-skin-dark .nxl-link .text-primary,
html.app-skin-dark .nxl-link i.text-primary {
  color: var(--ov-primary) !important;
}

/* Dark mode buttons to deep green (all variants) */
.app-skin-dark .btn-primary,
.app-skin-dark .btn-success,
.app-skin-dark .btn-secondary,
.app-skin-dark .btn-info,
.app-skin-dark .btn-warning,
.app-skin-dark .btn-danger,
.app-skin-dark .btn-dark,
.app-skin-dark .btn-light,
.app-skin-dark .btn-primary:focus,
.app-skin-dark .btn-success:focus,
.app-skin-dark .btn-secondary:focus,
.app-skin-dark .btn-info:focus,
.app-skin-dark .btn-warning:focus,
.app-skin-dark .btn-danger:focus,
.app-skin-dark .btn-dark:focus,
.app-skin-dark .btn-light:focus {
  color: var(--ov-primary-contrast) !important;
  background-color: var(--ov-primary) !important;
  border-color: var(--ov-primary) !important;
}
.app-skin-dark .btn-primary:hover,
.app-skin-dark .btn-success:hover,
.app-skin-dark .btn-secondary:hover,
.app-skin-dark .btn-info:hover,
.app-skin-dark .btn-warning:hover,
.app-skin-dark .btn-danger:hover,
.app-skin-dark .btn-dark:hover,
.app-skin-dark .btn-light:hover {
  color: var(--ov-primary-contrast) !important;
  background-color: var(--ov-primary-dark) !important;
  border-color: var(--ov-primary-dark) !important;
}
.app-skin-dark .btn-outline-primary,
.app-skin-dark .btn-outline-success,
.app-skin-dark .btn-outline-secondary,
.app-skin-dark .btn-outline-info,
.app-skin-dark .btn-outline-warning,
.app-skin-dark .btn-outline-danger,
.app-skin-dark .btn-outline-dark,
.app-skin-dark .btn-outline-light {
  color: var(--ov-primary) !important;
  border-color: var(--ov-primary) !important;
}
.app-skin-dark .btn-outline-primary:hover,
.app-skin-dark .btn-outline-success:hover,
.app-skin-dark .btn-outline-secondary:hover,
.app-skin-dark .btn-outline-info:hover,
.app-skin-dark .btn-outline-warning:hover,
.app-skin-dark .btn-outline-danger:hover,
.app-skin-dark .btn-outline-dark:hover,
.app-skin-dark .btn-outline-light:hover {
  color: var(--ov-primary-contrast) !important;
  background-color: var(--ov-primary) !important;
  border-color: var(--ov-primary) !important;
}

/* Dark mode badges and text */
.app-skin-dark .badge.bg-primary,
.app-skin-dark .badge.bg-success { background-color: var(--ov-primary) !important; }
.app-skin-dark .text-primary { color: var(--ov-primary) !important; }
.app-skin-dark .bg-primary { background-color: var(--ov-primary) !important; }

/* Dark mode sidebar active/highlight */
.app-skin-dark .nxl-navigation .nxl-link:hover,
.app-skin-dark .nxl-navigation .nxl-link:focus,
.app-skin-dark .nxl-navigation .nxl-link.active {
  color: var(--ov-primary) !important;
  background: rgba(25, 161, 68, 0.15) !important; /* slightly brighter in dark */
}
.app-skin-dark .nxl-navigation .nxl-item.nxl-hasmenu.open > .nxl-link,
.app-skin-dark .nxl-navigation .nxl-item.nxl-hasmenu.open > .nxl-link .nxl-mtext,
.app-skin-dark .nxl-navigation .nxl-item.nxl-hasmenu.open > .nxl-link .nxl-micon i {
  color: var(--ov-primary) !important;
}
.app-skin-dark .nxl-navigation .nxl-submenu .nxl-link.active,
.app-skin-dark .nxl-navigation .nxl-submenu .nxl-link:hover {
  color: var(--ov-primary) !important;
  background: rgba(25, 161, 68, 0.15) !important;
}

/* File upload accent */
.file-upload-area .btn.btn-primary { background-color: var(--ov-primary); border-color: var(--ov-primary); }
.file-upload-area .btn.btn-primary:hover { background-color: var(--ov-primary-dark); border-color: var(--ov-primary-dark); }

/* Strong overrides for dark mode with higher specificity than fixed CSS */
html.app-skin-dark .btn-primary,
html.app-skin-dark .btn-success,
html.app-skin-dark .btn-secondary,
html.app-skin-dark .btn-info,
html.app-skin-dark .btn-warning,
html.app-skin-dark .btn-danger,
html.app-skin-dark .btn-dark,
html.app-skin-dark .btn-light {
  background-color: var(--ov-primary) !important;
  border-color: var(--ov-primary) !important;
  color: var(--ov-primary-contrast) !important;
}
html.app-skin-dark .btn-primary:hover,
html.app-skin-dark .btn-success:hover,
html.app-skin-dark .btn-secondary:hover,
html.app-skin-dark .btn-info:hover,
html.app-skin-dark .btn-warning:hover,
html.app-skin-dark .btn-danger:hover,
html.app-skin-dark .btn-dark:hover,
html.app-skin-dark .btn-light:hover {
  background-color: var(--ov-primary-dark) !important;
  border-color: var(--ov-primary-dark) !important;
}
html.app-skin-dark .btn-outline-primary,
html.app-skin-dark .btn-outline-success,
html.app-skin-dark .btn-outline-secondary,
html.app-skin-dark .btn-outline-info,
html.app-skin-dark .btn-outline-warning,
html.app-skin-dark .btn-outline-danger,
html.app-skin-dark .btn-outline-dark,
html.app-skin-dark .btn-outline-light {
  color: var(--ov-primary) !important;
  border-color: var(--ov-primary) !important;
}
html.app-skin-dark .btn-outline-primary:hover,
html.app-skin-dark .btn-outline-success:hover,
html.app-skin-dark .btn-outline-secondary:hover,
html.app-skin-dark .btn-outline-info:hover,
html.app-skin-dark .btn-outline-warning:hover,
html.app-skin-dark .btn-outline-danger:hover,
html.app-skin-dark .btn-outline-dark:hover,
html.app-skin-dark .btn-outline-light:hover {
  color: var(--ov-primary-contrast) !important;
  background-color: var(--ov-primary) !important;
  border-color: var(--ov-primary) !important;
}

/* Dark mode inputs focus ring and upload hover border to deep green */
html.app-skin-dark .form-control:focus,
html.app-skin-dark .form-select:focus {
  border-color: var(--ov-primary) !important;
  box-shadow: 0 0 0 0.2rem rgba(11,122,39,0.25) !important;
}
html.app-skin-dark .file-upload-area:hover {
  border-color: var(--ov-primary) !important;
}

/* Unify success/secondary buttons to deep green */
.btn-success,
.btn-secondary,
.btn-success:focus,
.btn-secondary:focus {
  color: var(--ov-primary-contrast) !important;
  background-color: var(--ov-primary) !important;
  border-color: var(--ov-primary) !important;
}
.btn-success:hover,
.btn-secondary:hover {
  color: var(--ov-primary-contrast) !important;
  background-color: var(--ov-primary-dark) !important;
  border-color: var(--ov-primary-dark) !important;
}
.btn-outline-success,
.btn-outline-secondary {
  color: var(--ov-primary) !important;
  border-color: var(--ov-primary) !important;
}
.btn-outline-success:hover,
.btn-outline-secondary:hover {
  color: var(--ov-primary-contrast) !important;
  background-color: var(--ov-primary) !important;
  border-color: var(--ov-primary) !important;
}
.badge.bg-success { background-color: var(--ov-primary) !important; }

/* Sidebar active/highlight styles */
.nxl-navigation .nxl-link:hover,
.nxl-navigation .nxl-link:focus,
.nxl-navigation .nxl-link.active {
  color: var(--ov-primary) !important;
  background: rgba(11, 122, 39, 0.08) !important;
}
.nxl-navigation .nxl-item.nxl-hasmenu.open > .nxl-link,
.nxl-navigation .nxl-item.nxl-hasmenu.open > .nxl-link .nxl-mtext,
.nxl-navigation .nxl-item.nxl-hasmenu.open > .nxl-link .nxl-micon i {
  color: var(--ov-primary) !important;
}
.nxl-navigation .nxl-submenu .nxl-link.active,
.nxl-navigation .nxl-submenu .nxl-link:hover {
  color: var(--ov-primary) !important;
  background: rgba(11, 122, 39, 0.08) !important;
}
.nxl-navigation .nxl-link .nxl-micon i { transition: color .2s ease; }
.nxl-navigation .nxl-link:hover .nxl-micon i { color: var(--ov-primary) !important; }

/* Ensure parameter switches stack vertically (one per line) */
#parameter-content .form-check.form-switch {
  display: block !important;
  width: 100% !important;
}
#parameter-content .form-check.form-switch + .form-check.form-switch {
  margin-top: 0.5rem !important;
}

/* Skill store */
#skills-view {
  padding: 0;
}

.skills-view-shell {
  padding: 1.25rem;
}

.skills-nav-link {
  position: relative;
}

.skills-nav-link.active {
  background: rgba(11, 122, 39, 0.1);
}

.skills-nav-count {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.7rem;
  height: 1.7rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: inherit;
  font-size: 0.74rem;
  font-weight: 700;
}

#account-menu-dropdown .dropdown-menu {
  width: min(320px, calc(100vw - 1.25rem));
  min-width: 300px;
  padding: 0.95rem 0.9rem 0.8rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1.15rem;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.16);
}

#account-menu-dropdown.show .nxl-head-link {
  background: rgba(11, 122, 39, 0.08);
  border-radius: 999px;
}

.nxl-user-menu .user-head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.1rem 0 0.95rem;
  margin-bottom: 0.55rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.user-head-avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--ov-primary), #29a35a);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  flex: 0 0 auto;
}

.user-head-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.user-head-copy h6 {
  line-height: 1.2;
  word-break: break-word;
}

.user-head-copy #account-menu-subtitle {
  margin-top: 0.2rem !important;
  line-height: 1.35;
  word-break: break-word;
}

.nxl-user-menu .user-body {
  display: grid;
  gap: 0.2rem;
}

.nxl-user-menu .user-body .dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.72rem 0.8rem;
  border-radius: 0.9rem;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.nxl-user-menu .user-body .dropdown-item:hover,
.nxl-user-menu .user-body .dropdown-item:focus {
  background: rgba(11, 122, 39, 0.08);
}

.nxl-user-menu .user-body .dropdown-item i {
  flex: 0 0 1.1rem;
  width: 1.1rem;
  margin-right: 0 !important;
  text-align: center;
  color: #64748b;
}

.nxl-user-menu .user-body .dropdown-item span {
  min-width: 0;
  flex: 1;
}

.nxl-user-menu .dropdown-divider {
  margin: 0.45rem 0;
  border-color: rgba(148, 163, 184, 0.18);
}

.account-view-shell {
  padding: 1.25rem;
}

.account-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(11, 122, 39, 0.12);
  border-radius: 1.1rem;
  background:
    radial-gradient(circle at top right, rgba(11, 122, 39, 0.12), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(236, 244, 238, 0.96));
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.06);
}

.account-hero-avatar {
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--ov-primary), #29a35a);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.account-hero-copy {
  min-width: 0;
  flex: 1;
}

.account-kicker,
.account-card-label {
  color: var(--ov-primary);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-title {
  margin: 0.25rem 0 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.account-subtitle,
.account-card-meta,
.account-panel-subtitle {
  color: #5b6676;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.account-card,
.account-panel {
  padding: 1.1rem 1.2rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
}

.account-card-value {
  margin-top: 0.45rem;
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 700;
}

.account-panel-head {
  margin-bottom: 1rem;
}

.account-panel-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.account-card-meta-strong {
  margin-top: 0.35rem;
  color: #0f172a;
  font-weight: 600;
}

.account-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.account-textarea {
  min-height: 110px;
  resize: vertical;
}

.account-auth-dialog .modal-content {
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1.4rem;
  box-shadow: 0 32px 70px rgba(15, 23, 42, 0.22);
}

.account-auth-shell {
  display: grid;
  grid-template-columns: minmax(250px, 0.92fr) minmax(0, 1.18fr);
  min-height: 680px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
}

.account-auth-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.4rem;
  padding: 2rem 1.8rem;
  color: #eff6f0;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.12), transparent 38%),
    radial-gradient(circle at bottom left, rgba(17, 94, 89, 0.28), transparent 42%),
    linear-gradient(150deg, #072d12 0%, #0b7a27 52%, #0f5d6d 100%);
}

.account-auth-brand::after {
  content: "";
  position: absolute;
  inset: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.1rem;
  pointer-events: none;
}

.account-auth-brand-top,
.account-auth-panel {
  position: relative;
  z-index: 1;
}

.account-auth-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 240px;
  min-height: 72px;
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.account-auth-logo-wrap img {
  width: 100%;
  max-height: 48px;
  object-fit: contain;
}

.account-auth-brand-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: fit-content;
  margin-bottom: 1rem;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-auth-brand-title {
  margin: 0 0 0.75rem;
  color: #ffffff;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.08;
}

.account-auth-brand-subtitle {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.98rem;
  line-height: 1.7;
}

.account-auth-feature-list {
  display: grid;
  gap: 0.9rem;
}

.account-auth-feature-item {
  display: flex;
  gap: 0.8rem;
  padding: 0.9rem 0.95rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.account-auth-feature-item i {
  margin-top: 0.15rem;
  color: #d7fbe2;
}

.account-auth-feature-title {
  color: #ffffff;
  font-weight: 700;
}

.account-auth-feature-copy {
  margin-top: 0.2rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  line-height: 1.6;
}

.account-auth-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background:
    radial-gradient(circle at top right, rgba(11, 122, 39, 0.07), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 249, 0.98));
}

.account-auth-header {
  padding: 1.7rem 1.7rem 1rem;
  border-bottom: 0;
}

.account-auth-panel-subtitle {
  margin: 0.35rem 0 0;
  color: #64748b;
  font-size: 0.92rem;
}

.account-auth-body {
  padding: 0 1.7rem 1.7rem;
}

.account-auth-tabs {
  gap: 0.6rem;
}

.account-auth-tabs .nav-link {
  min-width: 7rem;
  border-radius: 999px;
  border: 1px solid rgba(11, 122, 39, 0.12);
  color: #475569;
  font-weight: 700;
}

.account-auth-tabs .nav-link.active {
  background: var(--ov-primary);
  color: #fff !important;
  box-shadow: 0 12px 24px rgba(11, 122, 39, 0.18);
}

.account-auth-section-copy {
  margin-bottom: 1rem;
}

.account-auth-section-copy h6 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 800;
}

.account-auth-section-copy p,
.account-form-note {
  margin: 0;
  color: #64748b;
  font-size: 0.92rem;
  line-height: 1.6;
}

.account-form-note {
  margin-bottom: 1rem;
}

.skills-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(11, 122, 39, 0.12);
  border-radius: 1.1rem;
  background:
    radial-gradient(circle at top right, rgba(11, 122, 39, 0.14), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(236, 244, 238, 0.96));
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.06);
}

.skills-kicker {
  display: inline-block;
  margin-bottom: 0.45rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(11, 122, 39, 0.1);
  color: var(--ov-primary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.skills-title {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 700;
}

.skills-subtitle {
  max-width: 48rem;
  margin: 0.4rem 0 0;
  color: #5b6676;
}

.skills-toolbar,
.skills-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.skills-toolbar {
  justify-content: space-between;
  margin-bottom: 1rem;
}

.skills-toolbar-right,
.skills-layout-toggle {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.skills-layout-toggle {
  padding: 0.2rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
}

.skills-layout-toggle .btn {
  border-radius: 999px;
}

.skills-layout-toggle .btn.active {
  color: var(--ov-primary-contrast) !important;
  background: var(--ov-primary) !important;
  border-color: var(--ov-primary) !important;
}

.skills-search-wrap {
  position: relative;
  min-width: 18rem;
  max-width: 26rem;
  flex: 1;
}

.skills-search-wrap i {
  position: absolute;
  top: 50%;
  left: 0.85rem;
  transform: translateY(-50%);
  color: #6c7a89;
}

.skills-search-wrap input {
  padding-left: 2.45rem;
  border-radius: 999px;
}

.skills-summary {
  color: #5b6676;
  font-size: 0.95rem;
  font-weight: 600;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.skills-grid.list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.skill-card {
  display: flex;
  flex-direction: column;
  min-height: 240px;
  padding: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.skill-card:hover {
  transform: translateY(-2px);
  border-color: rgba(11, 122, 39, 0.2);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
}

.skill-card-head,
.skill-card-footer {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}

.skill-card-footer {
  flex-wrap: wrap;
}

.skill-card-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.skill-card-slug {
  margin-top: 0.2rem;
  color: #6c7a89;
  font-size: 0.78rem;
}

.skill-card-desc {
  margin: 0.85rem 0 1rem;
  color: #4b5563;
  line-height: 1.55;
  min-height: 4.5rem;
  flex: 1;
}

.skill-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.skill-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  font-size: 0.73rem;
  font-weight: 600;
  background: rgba(15, 23, 42, 0.06);
  color: #334155;
}

.skill-chip.primary {
  background: rgba(11, 122, 39, 0.1);
  color: var(--ov-primary);
}

.skill-chip.muted {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
}

.skill-card-reference {
  margin-bottom: 1rem;
  padding: 0.85rem 0.95rem;
  border-radius: 0.9rem;
  background: rgba(15, 23, 42, 0.035);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.skill-card-reference-title {
  margin-bottom: 0.35rem;
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.skill-card-reference.empty {
  border-style: dashed;
}

.skill-card-reference-body {
  margin: 0;
  color: #475569;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.skill-card-path {
  margin-top: 0.85rem;
  color: #6c7a89;
  font-size: 0.78rem;
  word-break: break-all;
}

.skills-grid.list .skill-card {
  min-height: 0;
  padding: 1rem 1.15rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 1rem;
}

.skills-grid.list .skill-card-head {
  align-items: center;
}

.skill-row-main {
  min-width: 0;
}

.skills-grid.list .skill-card-desc {
  min-height: 0;
  margin: 0.45rem 0 0.7rem;
}

.skills-grid.list .skill-card-reference {
  margin-bottom: 0.85rem;
}

.skills-grid.list .skill-card-footer {
  justify-content: flex-end;
  align-items: center;
  align-self: stretch;
}

.skill-row-actions {
  min-width: max-content;
}

.skills-grid.list .skill-card-path {
  margin-top: 0;
}

.skills-empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  padding: 2rem;
  border: 1px dashed rgba(11, 122, 39, 0.22);
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(236, 244, 238, 0.72), rgba(255, 255, 255, 0.94));
  text-align: center;
}

.skills-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  margin-bottom: 1rem;
  border-radius: 1.2rem;
  background: rgba(11, 122, 39, 0.1);
  color: var(--ov-primary);
  font-size: 1.5rem;
}

html.app-skin-dark .skills-hero {
  border-color: rgba(34, 197, 94, 0.18);
  background:
    radial-gradient(circle at top right, rgba(34, 197, 94, 0.12), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(17, 24, 39, 0.98));
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.45);
}

html.app-skin-dark .skills-title,
html.app-skin-dark .skill-card-title {
  color: #f8fafc;
}

html.app-skin-dark .skills-nav-link.active {
  background: rgba(34, 197, 94, 0.14);
}

html.app-skin-dark .skills-nav-count {
  background: rgba(148, 163, 184, 0.12);
}

html.app-skin-dark #account-menu-dropdown.show .nxl-head-link {
  background: rgba(34, 197, 94, 0.12);
}

html.app-skin-dark #account-menu-dropdown .dropdown-menu {
  border-color: rgba(148, 163, 184, 0.14);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.98));
  box-shadow: 0 24px 56px rgba(2, 6, 23, 0.5);
}

html.app-skin-dark .nxl-user-menu .user-head {
  border-bottom-color: rgba(148, 163, 184, 0.14);
}

html.app-skin-dark .nxl-user-menu .user-body .dropdown-item:hover,
html.app-skin-dark .nxl-user-menu .user-body .dropdown-item:focus {
  background: rgba(34, 197, 94, 0.12) !important;
}

html.app-skin-dark .nxl-user-menu .user-body .dropdown-item i {
  color: #94a3b8;
}

html.app-skin-dark .nxl-user-menu .dropdown-divider {
  border-color: rgba(148, 163, 184, 0.14);
}

html.app-skin-dark .account-hero {
  border-color: rgba(34, 197, 94, 0.18);
  background:
    radial-gradient(circle at top right, rgba(34, 197, 94, 0.12), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(17, 24, 39, 0.98));
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.45);
}

html.app-skin-dark .account-title,
html.app-skin-dark .account-card-value,
html.app-skin-dark .account-panel-title {
  color: #f8fafc;
}

html.app-skin-dark .account-subtitle,
html.app-skin-dark .account-card-meta,
html.app-skin-dark .account-panel-subtitle,
html.app-skin-dark .user-head-copy #account-menu-subtitle {
  color: #94a3b8 !important;
}

html.app-skin-dark .account-card,
html.app-skin-dark .account-panel {
  border-color: rgba(148, 163, 184, 0.14);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.98));
  box-shadow: 0 16px 34px rgba(2, 6, 23, 0.35);
}

html.app-skin-dark .account-auth-dialog .modal-content {
  border-color: rgba(148, 163, 184, 0.16);
  box-shadow: 0 32px 80px rgba(2, 6, 23, 0.58);
}

html.app-skin-dark .account-auth-shell {
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.98));
}

html.app-skin-dark .account-auth-panel {
  background:
    radial-gradient(circle at top right, rgba(34, 197, 94, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.98));
}

html.app-skin-dark .account-auth-header {
  background: transparent;
}

html.app-skin-dark .account-auth-panel .modal-title,
html.app-skin-dark .account-auth-section-copy h6 {
  color: #f8fafc;
}

html.app-skin-dark .account-auth-panel-subtitle,
html.app-skin-dark .account-auth-section-copy p,
html.app-skin-dark .account-form-note {
  color: #94a3b8;
}

html.app-skin-dark .account-auth-tabs .nav-link {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.55);
  color: #cbd5e1;
}

html.app-skin-dark .account-auth-tabs .nav-link:hover {
  border-color: rgba(34, 197, 94, 0.3);
  color: #f8fafc;
}

html.app-skin-dark .account-auth-tabs .nav-link.active {
  box-shadow: 0 14px 28px rgba(11, 122, 39, 0.24);
}

html.app-skin-dark #accountAuthModal .form-label {
  color: #e2e8f0;
}

html.app-skin-dark #accountAuthModal .form-control {
  background: rgba(15, 23, 42, 0.86) !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
  color: #f8fafc !important;
}

html.app-skin-dark #accountAuthModal .form-control::placeholder {
  color: #64748b;
}

html.app-skin-dark #accountAuthModal .form-control:focus {
  background: rgba(15, 23, 42, 0.96) !important;
  border-color: rgba(34, 197, 94, 0.42) !important;
  box-shadow: 0 0 0 0.2rem rgba(11, 122, 39, 0.22) !important;
}

html.app-skin-dark #accountAuthModal .btn-outline-secondary {
  color: #cbd5e1 !important;
  border-color: rgba(148, 163, 184, 0.24) !important;
  background: rgba(15, 23, 42, 0.45) !important;
}

html.app-skin-dark #accountAuthModal .btn-outline-secondary:hover {
  color: #f8fafc !important;
  border-color: rgba(34, 197, 94, 0.32) !important;
  background: rgba(30, 41, 59, 0.88) !important;
}

html.app-skin-dark #accountAuthModal .alert-warning,
html.app-skin-dark #accountAuthModal .alert-danger,
html.app-skin-dark #accountAuthModal .alert-success {
  border-color: rgba(148, 163, 184, 0.14);
}

html.app-skin-dark .skills-subtitle,
html.app-skin-dark .skills-summary,
html.app-skin-dark .skill-card-slug,
html.app-skin-dark .skill-card-path {
  color: #94a3b8;
}

html.app-skin-dark .skills-search-wrap i {
  color: #94a3b8;
}

html.app-skin-dark .skills-search-wrap input {
  background: #0f172a;
  color: #e5e7eb;
  border-color: #1f2937;
}

html.app-skin-dark .skills-search-wrap input::placeholder {
  color: #64748b;
}

html.app-skin-dark .skills-layout-toggle {
  background: rgba(15, 23, 42, 0.82);
  border-color: rgba(148, 163, 184, 0.14);
}

html.app-skin-dark .skill-card {
  border-color: rgba(148, 163, 184, 0.14);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.98));
  box-shadow: 0 16px 34px rgba(2, 6, 23, 0.35);
}

html.app-skin-dark .skill-card:hover {
  border-color: rgba(34, 197, 94, 0.26);
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.48);
}

html.app-skin-dark .skill-card-desc {
  color: #cbd5e1;
}

html.app-skin-dark .skill-chip {
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
}

html.app-skin-dark .skill-chip.primary {
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
}

html.app-skin-dark .skill-chip.muted {
  background: rgba(148, 163, 184, 0.1);
  color: #cbd5e1;
}

html.app-skin-dark .skill-card-reference {
  background: rgba(2, 6, 23, 0.34);
  border-color: rgba(148, 163, 184, 0.12);
}

html.app-skin-dark .skill-card-reference-title {
  color: #e2e8f0;
}

html.app-skin-dark .skill-card-reference-body {
  color: #cbd5e1;
}

html.app-skin-dark .skills-empty-state {
  border-color: rgba(34, 197, 94, 0.24);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(17, 24, 39, 0.98));
  color: #e2e8f0;
}

.skills-auth-gate {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 380px;
  padding: 2.5rem 2rem;
  border: 1px dashed rgba(11, 122, 39, 0.22);
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(236, 244, 238, 0.72), rgba(255, 255, 255, 0.94));
  text-align: center;
}

.skills-auth-gate-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background: rgba(11, 122, 39, 0.08);
  margin-bottom: 1.25rem;
  font-size: 2rem;
  color: #0b7a27;
}

.skills-auth-gate h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.skills-auth-gate p {
  color: #64748b;
  margin-bottom: 1.5rem;
  max-width: 380px;
}

.skills-auth-gate-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

html.app-skin-dark .skills-auth-gate {
  border-color: rgba(34, 197, 94, 0.24);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(17, 24, 39, 0.98));
  color: #e2e8f0;
}

html.app-skin-dark .skills-auth-gate p {
  color: #94a3b8;
}

html.app-skin-dark .skills-auth-gate-icon {
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
}

html.app-skin-dark .skills-empty-icon {
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
}

@media (max-width: 768px) {
  .account-auth-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .account-auth-brand-title {
    font-size: 1.7rem;
  }

  .skills-hero,
  .skills-toolbar,
  .account-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .skills-toolbar-right,
  .skills-layout-toggle {
    width: 100%;
  }

  .skills-layout-toggle .btn {
    flex: 1;
  }

  .skills-grid.list .skill-card {
    grid-template-columns: 1fr;
  }

  .skills-grid.list .skill-card-footer {
    justify-content: flex-start;
    margin-top: 0.85rem;
  }

  .skills-search-wrap {
    min-width: 0;
    max-width: none;
  }

  .account-form-grid,
  .account-grid {
    grid-template-columns: 1fr;
  }

  .account-auth-header,
  .account-auth-body,
  .account-auth-brand {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }
}
