/*
 * NEN Account Dashboard — Stylesheet
 * Layout and structure only. Fonts and colors inherit from the active theme
 * (Hello Elementor / Elementor global styles) except for the sidebar
 * (which must stay dark) and semantic status badge colors.
 */

/* ── Structural tokens only ─────────────────────────────────────── */
.nen-dashboard {
  --nen-sidebar:     #19293a;
  --nen-sidebar-t:   #edf1f4;
  --nen-sidebar-m:   rgba(255,255,255,.5);
  --nen-sidebar-a:   rgba(255,255,255,.08);
  --nen-sidebar-b:   rgba(255,255,255,.08);
  --nen-radius:      8px;
  --nen-w-sidebar:   236px;
  --nen-h-topbar:    54px;
}

/* ── Reset within scope ─────────────────────────────────────────── */
.nen-dashboard *, .nen-dashboard *::before, .nen-dashboard *::after {
  box-sizing: border-box;
}

.nen-dashboard {
  display: flex;
  min-height: 80vh;
  position: relative;
}

/* ── Sidebar ────────────────────────────────────────────────────── */
.nen-sidebar {
  width: var(--nen-w-sidebar);
  flex-shrink: 0;
  background: var(--nen-sidebar);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

.nen-sidebar__brand {
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--nen-sidebar-b);
}

.nen-brand-name {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
}

.nen-brand-sub {
  font-size: 10.5px;
  color: var(--nen-sidebar-m);
  letter-spacing: .09em;
  text-transform: uppercase;
  margin-top: 3px;
}

.nen-sidebar__profile {
  padding: 18px 20px;
  border-bottom: 1px solid var(--nen-sidebar-b);
}

.nen-profile-row {
  display: flex;
  align-items: center;
  gap: 11px;
}

.nen-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: #fff; font-weight: 700;
  flex-shrink: 0; overflow: hidden;
}
.nen-avatar__img { width: 100%; height: 100%; object-fit: cover; }

.nen-profile-info { min-width: 0; }

.nen-profile-name {
  font-size: 13px; font-weight: 600; color: var(--nen-sidebar-t);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.nen-profile-email {
  font-size: 11px; color: var(--nen-sidebar-m);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.nen-account-badge {
  margin-top: 10px;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  background: var(--nen-sidebar-a);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.8);
  font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}

/* ── Sidebar nav ── */
.nen-sidebar__nav {
  list-style: none;
  padding: 10px 0;
  flex: 1;
  margin: 0;
}

.nen-nav-section-label {
  font-size: 9.5px; font-weight: 600; letter-spacing: .11em; text-transform: uppercase;
  color: var(--nen-sidebar-m);
  padding: 10px 20px 3px;
  display: block;
}

.nen-nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 20px;
  color: var(--nen-sidebar-t) !important;
  font-size: 13px;
  cursor: pointer;
  border: none; background: none; width: 100%; text-align: left;
  position: relative;
  transition: background .12s;
  text-decoration: none !important;
  border-radius: 0;
}

.nen-nav-item:hover {
  background: rgba(255,255,255,.06);
  color: #fff !important;
}

.nen-nav-item.active {
  background: var(--nen-sidebar-a);
  color: #fff !important;
}

.nen-nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 2px;
  background: rgba(255,255,255,.6);
  border-radius: 0 2px 2px 0;
}

.nen-nav-icon {
  width: 15px; height: 15px; flex-shrink: 0; opacity: .65;
}
.nen-nav-item.active .nen-nav-icon { opacity: 1; }

.nen-nav-badge {
  margin-left: auto;
  background: rgba(255,255,255,.9);
  color: var(--nen-sidebar);
  font-size: 10px; font-weight: 700;
  min-width: 18px; padding: 1px 5px;
  border-radius: 20px; text-align: center; line-height: 16px;
}

.nen-sidebar__footer {
  padding: 14px 20px;
  border-top: 1px solid var(--nen-sidebar-b);
}

.nen-logout-btn {
  display: flex; align-items: center; gap: 7px;
  color: var(--nen-sidebar-m); font-size: 12px;
  text-decoration: none; cursor: pointer;
  background: none; border: none; font-family: inherit; width: 100%;
  transition: color .12s;
}
.nen-logout-btn:hover { color: var(--nen-sidebar-t); }

/* ── Main area ──────────────────────────────────────────────────── */
.nen-main {
  flex: 1;
  display: flex; flex-direction: column;
  min-height: 80vh;
  min-width: 0;
}

.nen-topbar {
  border-bottom: 1px solid rgba(0,0,0,.1);
  padding: 0 28px;
  height: var(--nen-h-topbar);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
  background: inherit;
}

.nen-topbar__title { font-size: 16px; font-weight: 600; }
.nen-topbar__actions { display: flex; align-items: center; gap: 10px; }

/* ── Buttons ────────────────────────────────────────────────────── */
.nen-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 15px;
  border-radius: var(--nen-radius);
  font-size: 13px; font-weight: 500;
  cursor: pointer; border: 1px solid transparent;
  transition: opacity .14s, filter .14s;
  text-decoration: none !important; line-height: 1; white-space: nowrap;
}
.nen-btn--primary { background: var(--nen-sidebar); color: #fff !important; }
.nen-btn--primary:hover { filter: brightness(1.15); }

.nen-btn--outline { background: transparent; border-color: rgba(0,0,0,.2); }
.nen-btn--outline:hover { background: rgba(0,0,0,.04); }

.nen-btn--warn { background: #b36200; color: #fff !important; }
.nen-btn--warn:hover { filter: brightness(.93); }

.nen-btn--danger-outline { border-color: #b63224; color: #b63224 !important; opacity: .8; }
.nen-btn--danger-outline:hover { opacity: 1; }

.nen-btn--sm { padding: 5px 11px; font-size: 12px; }
.nen-btn--lg { padding: 11px 28px; font-size: 14px; }

/* ── Content ────────────────────────────────────────────────────── */
.nen-content { padding: 28px; flex: 1; }

.nen-tab-panel { display: none; }
.nen-tab-panel.is-active { display: block; }

/* ── Attention banner ───────────────────────────────────────────── */
.nen-banner {
  display: flex; align-items: flex-start; gap: 14px;
  border: 1px solid rgba(0,0,0,.1);
  border-left: 3px solid #b36200;
  border-radius: var(--nen-radius);
  padding: 14px 18px;
  margin-bottom: 24px;
}
.nen-banner__body { flex: 1; min-width: 0; }
.nen-banner__title { font-size: 13px; font-weight: 600; color: #b36200; display: block; }
.nen-banner__text  { font-size: 12.5px; margin-top: 2px; }

/* ── Stats row ──────────────────────────────────────────────────── */
.nen-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.nen-stat-tile {
  border: 1px solid rgba(0,0,0,.1);
  border-radius: var(--nen-radius);
  padding: 16px 18px;
}

.nen-stat-value {
  font-size: 26px; font-weight: 700; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.nen-stat-value--ok   { color: #25795a; }
.nen-stat-value--warn { color: #b36200; }

.nen-stat-label { font-size: 11.5px; opacity: .6; margin-top: 4px; }

/* ── Filter bar ─────────────────────────────────────────────────── */
.nen-filter-bar {
  display: flex; align-items: center; gap: 7px;
  margin-bottom: 18px; flex-wrap: wrap;
}

.nen-filter-pill {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12.5px; font-weight: 500;
  cursor: pointer;
  border: 1px solid rgba(0,0,0,.15);
  background: transparent;
  transition: all .12s;
}
.nen-filter-pill:hover { border-color: rgba(0,0,0,.35); }
.nen-filter-pill.is-active { background: var(--nen-sidebar); border-color: var(--nen-sidebar); color: #fff !important; }

.nen-pill-count {
  background: rgba(0,0,0,.1); border-radius: 20px;
  padding: 0 5px; font-size: 10.5px; margin-left: 2px;
  font-variant-numeric: tabular-nums;
}
.nen-filter-pill.is-active .nen-pill-count { background: rgba(255,255,255,.22); }

/* ── Events table ───────────────────────────────────────────────── */
.nen-events-table {
  border: 1px solid rgba(0,0,0,.1);
  border-radius: var(--nen-radius);
  overflow: hidden;
}

.nen-table-head {
  display: grid;
  grid-template-columns: 1fr 152px 134px 108px;
  padding: 9px 20px;
  background: rgba(0,0,0,.03);
  border-bottom: 1px solid rgba(0,0,0,.08);
}

.nen-th {
  font-size: 10.5px; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; opacity: .5;
}

.nen-event-row {
  display: grid;
  grid-template-columns: 1fr 152px 134px 108px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(0,0,0,.07);
  align-items: center;
  transition: background .1s;
}
.nen-event-row:last-of-type { border-bottom: none; }
.nen-event-row:hover { background: rgba(0,0,0,.02); }
.nen-event-row.is-hidden { display: none; }

.nen-event-title {
  font-size: 13.5px; font-weight: 600;
  margin-bottom: 2px;
}
.nen-event-title a { color: inherit !important; text-decoration: none; }
.nen-event-title a:hover { text-decoration: underline; }

.nen-event-sub { font-size: 11.5px; opacity: .55; }

.nen-event-date-primary { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.nen-event-date-sub     { font-size: 11px; opacity: .5; margin-top: 1px; }

/* ── Status badges ──────────────────────────────────────────────── */
.nen-status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 20px;
  font-size: 11.5px; font-weight: 500; white-space: nowrap; width: fit-content;
}
.nen-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }

.nen-badge-live     { background: rgba(37,121,90,.1);    color: #25795a; }
.nen-badge-live     .nen-dot { background: #25795a; }

.nen-badge-pending  { background: rgba(179,98,0,.1);     color: #b36200; }
.nen-badge-pending  .nen-dot { background: #b36200; }

.nen-badge-payment  { background: rgba(179,98,0,.1);     color: #b36200; border: 1px solid rgba(179,98,0,.18); }
.nen-badge-payment  .nen-dot { background: #b36200; }

.nen-badge-draft    { background: rgba(0,0,0,.07);       color: inherit; opacity: .7; }
.nen-badge-draft    .nen-dot { background: currentColor; opacity: .4; }

.nen-badge-rejected { background: rgba(182,50,36,.1);    color: #b63224; }
.nen-badge-rejected .nen-dot { background: #b63224; }

.nen-badge-past     { background: rgba(0,0,0,.05);       color: inherit; opacity: .55; }
.nen-badge-past     .nen-dot { background: currentColor; opacity: .35; }

/* ── Event actions ── */
.nen-event-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.nen-action-link {
  font-size: 12px; font-weight: 500;
  background: none; border: none; padding: 0;
  cursor: pointer; text-decoration: none;
}
.nen-action-link:hover { text-decoration: underline; }
.nen-action-link--warn   { color: #b36200 !important; }
.nen-action-link--danger { color: #b63224 !important; }
.nen-action-link--danger:hover { opacity: .8; }

.nen-action-sep { opacity: .3; font-size: 12px; user-select: none; }

/* ── Rejection note ── */
.nen-rejection-note { padding: 0 20px 14px; margin-top: -6px; }
.nen-rejection-note.is-hidden { display: none; }

.nen-rejection-inner {
  padding: 9px 13px;
  background: rgba(182,50,36,.08);
  border: 1px solid rgba(182,50,36,.14);
  border-radius: 6px;
  font-size: 12px; color: #b63224; line-height: 1.5;
}
.nen-rejection-inner strong { font-weight: 600; }

/* ── Empty state ── */
.nen-empty-state {
  text-align: center; padding: 56px 20px; opacity: .6;
}
.nen-empty-state p { margin-bottom: 16px; font-size: 13px; }

/* ── Section header ─────────────────────────────────────────────── */
.nen-section-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 22px; gap: 16px;
}
.nen-section-title { font-size: 19px; font-weight: 600; }
.nen-section-sub   { font-size: 12.5px; opacity: .6; margin-top: 3px; }

/* ── Submit callout ─────────────────────────────────────────────── */
.nen-submit-callout {
  border: 1px solid rgba(0,0,0,.1);
  border-radius: var(--nen-radius);
  padding: 48px 40px;
  text-align: center;
  max-width: 560px;
}
.nen-submit-callout__heading  { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.nen-submit-callout__body     { font-size: 13.5px; line-height: 1.7; margin-bottom: 24px; max-width: 380px; margin-inline: auto; opacity: .7; }
.nen-submit-callout__hint     { font-size: 11.5px; opacity: .5; margin-top: 16px; }

/* ── Cards ──────────────────────────────────────────────────────── */
.nen-card {
  border: 1px solid rgba(0,0,0,.1);
  border-radius: var(--nen-radius);
  padding: 22px;
}

.nen-card__title {
  font-size: 13px; font-weight: 600;
  padding-bottom: 13px; margin-bottom: 18px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

/* ── Settings grid ── */
.nen-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}
.nen-settings-right { display: flex; flex-direction: column; gap: 0; }

/* ── Forms ── */
.nen-form-field { margin-bottom: 15px; }
.nen-form-field:last-child { margin-bottom: 0; }

.nen-form-label {
  display: block;
  font-size: 11.5px; font-weight: 600; opacity: .7;
  margin-bottom: 5px; letter-spacing: .02em;
}

.nen-form-input {
  width: 100%; padding: 8px 11px;
  border: 1px solid rgba(0,0,0,.18); border-radius: 6px;
  font-family: inherit;
  font-size: 13.5px;
  background: transparent;
  transition: border-color .13s, box-shadow .13s;
  appearance: none;
}
.nen-form-input:focus {
  outline: none;
  border-color: var(--nen-sidebar);
  box-shadow: 0 0 0 2px rgba(25,41,58,.12);
}
.nen-form-input--error {
  border-color: #b63224;
  box-shadow: 0 0 0 2px rgba(182,50,36,.1);
}

.nen-field-error { font-size: 11.5px; color: #b63224; margin-top: 4px; }
.nen-hint { font-size: 11.5px; opacity: .55; margin-top: 4px; }

/* ── Logo upload ── */
.nen-logo-upload {
  display: flex; align-items: center; gap: 14px;
  padding: 14px;
  border: 1px dashed rgba(0,0,0,.2);
  border-radius: var(--nen-radius);
  background: rgba(0,0,0,.02);
}

.nen-logo-preview {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--nen-sidebar);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff; font-weight: 700; flex-shrink: 0; overflow: hidden;
}
.nen-logo-preview__img { width: 100%; height: 100%; object-fit: cover; }
.nen-logo-upload__text p { font-size: 12.5px; opacity: .7; }
.nen-logo-upload__text .nen-hint { margin-bottom: 8px; }

.nen-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Upgrade card ── */
.nen-upgrade-card {
  border: 1px solid rgba(0,0,0,.1);
  border-left: 3px solid var(--nen-sidebar);
  border-radius: var(--nen-radius);
  padding: 20px 22px;
}
.nen-upgrade-card--pending { border-left-color: #b36200; opacity: .85; }
.nen-upgrade-card__title { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.nen-upgrade-card p { font-size: 12.5px; opacity: .7; line-height: 1.6; margin-bottom: 14px; }
.nen-upgrade-card p:last-child { margin-bottom: 0; }

/* ── Billing ────────────────────────────────────────────────────── */
.nen-billing-wrap { max-width: 500px; display: flex; flex-direction: column; gap: 18px; }

.nen-card-on-file {
  display: flex; align-items: center; gap: 14px;
  padding: 14px;
  border: 1px solid rgba(0,0,0,.1);
  border-radius: var(--nen-radius);
  background: rgba(0,0,0,.02);
  margin-bottom: 14px;
}

.nen-card-brand-icon {
  width: 42px; height: 28px; flex-shrink: 0;
  border-radius: 4px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.nen-card-brand-icon svg { width: 42px; }

.nen-card-number { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .09em; }
.nen-card-label  { font-size: 11.5px; opacity: .5; }
.nen-card-expiry { font-size: 12.5px; font-variant-numeric: tabular-nums; opacity: .7; }

.nen-card-actions { display: flex; gap: 10px; margin-bottom: 0; }

.nen-square-badge {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; opacity: .5;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid rgba(0,0,0,.08);
}

.nen-no-card-notice { font-size: 13px; opacity: .7; margin-bottom: 14px; }

.nen-pricing-row {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 12px; margin-bottom: 12px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.nen-pricing-name   { font-size: 13.5px; font-weight: 600; }
.nen-pricing-sub    { font-size: 12px; opacity: .55; margin-top: 1px; }
.nen-pricing-amount { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nen-pricing-per    { font-size: 12px; font-weight: 400; opacity: .55; }
.nen-pricing-note   { font-size: 12.5px; opacity: .7; line-height: 1.6; margin-bottom: 8px; }

/* ── Login prompt ───────────────────────────────────────────────── */
.nen-login-prompt {
  text-align: center; padding: 60px 20px;
  max-width: 400px; margin: 0 auto;
}
.nen-login-prompt h2 { font-size: 20px; font-weight: 600; margin-bottom: 10px; }
.nen-login-prompt p  { font-size: 13px; opacity: .7; margin-bottom: 20px; }

/* ── Toast notifications ────────────────────────────────────────── */
.nen-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(8px);
  background: #1c2b3a; color: #fff;
  padding: 10px 18px; border-radius: 6px;
  font-size: 13px;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  opacity: 0; transition: opacity .2s, transform .2s;
  z-index: 9999; white-space: nowrap;
  pointer-events: none;
}
.nen-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.nen-toast--error   { background: #b63224; }
.nen-toast--success { background: #25795a; }

/* ── Focus styles ───────────────────────────────────────────────── */
.nen-dashboard :focus-visible {
  outline: 2px solid var(--nen-sidebar);
  outline-offset: 2px;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 800px) {
  .nen-sidebar {
    position: fixed; inset: 0 auto 0 0;
    transform: translateX(-100%);
    transition: transform .22s cubic-bezier(.4,0,.2,1);
    box-shadow: none;
    height: 100%;
  }
  .nen-sidebar.is-open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,.35);
  }

  .nen-main { margin-left: 0; }
  .nen-topbar { display: none; }
  .nen-content { padding: 20px 16px; }

  .nen-stats-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  .nen-table-head { display: none; }
  .nen-event-row {
    grid-template-columns: 1fr;
    gap: 8px; padding: 14px 16px;
  }

  .nen-settings-grid { grid-template-columns: 1fr; }
  .nen-section-header { flex-direction: column; }
  .nen-section-header .nen-btn { align-self: flex-start; }
}

/* Mobile bar */
.nen-mobile-bar {
  display: none;
  align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: var(--nen-sidebar);
  position: sticky; top: 0; z-index: 200;
}
.nen-mobile-bar .nen-brand-name { font-size: 15px; }

.nen-hamburger {
  display: flex; flex-direction: column; gap: 4px;
  cursor: pointer; padding: 4px;
  background: none; border: none;
}
.nen-hamburger span { display: block; width: 20px; height: 2px; background: var(--nen-sidebar-t); border-radius: 1px; }

.nen-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 99;
}
.nen-overlay.is-visible { display: block; }

@media (max-width: 800px) {
  .nen-mobile-bar { display: flex; }
}
