/* Member auth — structural only (visuals via Tailwind in templates) */
body.n1-login-open {
  overflow: hidden;
}

.n1-login-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.n1-login-modal.is-open {
  display: flex;
}

.n1-login-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.n1-login-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 26rem;
  max-height: 90vh;
  overflow-y: auto;
}

.n1-login-modal__panel--standalone {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
  color: #222;
}

.n1-login-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border: 0;
  background: transparent;
  font-size: 1.75rem;
  line-height: 1;
  color: #666;
  cursor: pointer;
}

.n1-login-modal__close:hover {
  color: #111;
}

.n1-auth-eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1e73be;
}

.n1-auth-title {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #111;
}

.n1-auth-tabs {
  display: flex;
  border-bottom: 1px solid #e5e5e5;
  margin-bottom: 1rem;
}

.n1-auth-tab {
  flex: 1;
  padding: 0.5rem 0;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: transparent;
  color: #666;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.n1-auth-tab.active {
  color: #1e73be;
  border-bottom-color: #1e73be;
}

.n1-form-group {
  margin-bottom: 1rem;
}

.n1-form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.875rem;
  color: #555;
}

.n1-form-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font: inherit;
  font-size: 0.875rem;
  color: #222;
  background: #fff;
}

.n1-form-input:focus {
  outline: none;
  border-color: #1e73be;
  box-shadow: 0 0 0 1px #1e73be;
}

.n1-pwd-wrap {
  position: relative;
}

.n1-pwd-wrap .n1-form-input {
  padding-right: 3.5rem;
}

.n1-pwd-toggle {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #666;
  font-size: 0.75rem;
  cursor: pointer;
}

.n1-pwd-toggle:hover {
  color: #1e73be;
}

.n1-btn-auth {
  display: block;
  width: 100%;
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: 4px;
  background: #1e73be;
  color: #fff;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
}

.n1-btn-auth:hover {
  background: #1665a8;
}

.n1-auth-alert.error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.n1-auth-alert.success {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.n1-auth-panel {
  display: none;
}

.n1-auth-panel.active {
  display: block;
}

.n1-auth-tab.active {
  color: #f59e0b;
  border-bottom-color: #f59e0b;
}

.n1-auth-alert {
  display: none;
  padding: 0.625rem 0.875rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.n1-auth-alert.show {
  display: block;
}

.n1-auth-alert.error {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.n1-auth-alert.success {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.n1-form-group .n1-form-error {
  display: none;
  color: #fca5a5;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.n1-form-group.has-error .n1-form-error {
  display: block;
}

.n1-form-group.has-error .n1-form-input {
  border-color: #ef4444;
}

.n1-btn-auth.loading {
  opacity: 0.7;
  pointer-events: none;
}

.n1-btn-auth.loading .n1-btn-auth-text::after {
  content: '…';
}

.n1-nav-user {
  gap: 0.625rem;
}

.n1-nav-user-profile {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 10.5rem;
  min-width: 0;
  padding: 0.25rem 0.5rem 0.25rem 0.25rem;
  border-radius: 9999px;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.n1-nav-user-profile:hover {
  background: rgba(245, 158, 11, 0.1);
}

.n1-nav-user-profile:hover .n1-nav-user-name {
  color: #f59e0b;
}

.n1-nav-user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #e5e7eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
  transition: color 0.2s ease;
}

.n1-nav-user-divider {
  width: 1px;
  height: 1rem;
  background: rgba(156, 163, 175, 0.35);
  flex-shrink: 0;
}

.n1-nav-logout {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.625rem;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  background: transparent;
  color: #9ca3af;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.n1-nav-logout i {
  font-size: 0.7rem;
  opacity: 0.9;
}

.n1-nav-logout:hover {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.25);
}

.n1-nav-user--mobile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 2.75rem;
  padding: 0 0.125rem;
  margin: 0;
}

.n1-nav-user--mobile .n1-nav-user-profile {
  flex: 1;
  min-width: 0;
  max-width: none;
  align-items: center;
  padding: 0.25rem 0.625rem 0.25rem 0.25rem;
}

.n1-nav-logout--mobile {
  flex-shrink: 0;
  align-self: center;
  padding: 0.55rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 0.5rem;
  color: #f3f4f6;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
}

.n1-nav-logout--mobile:hover {
  color: #0a0a0f;
  background: #f59e0b;
  border-color: #f59e0b;
}

.n1-nav-avatar {
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 9999px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1a1a2e;
  color: #f59e0b;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  border: 1.5px solid rgba(245, 158, 11, 0.55);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.n1-nav-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.n1-profile-panel {
  display: none;
}

.n1-profile-panel.active {
  display: block;
}

.n1-profile-nav-item.active {
  color: #f59e0b;
  border-bottom-color: #f59e0b;
}

.n1-avatar-preview {
  width: 5rem;
  height: 5rem;
  border-radius: 9999px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1a2e;
  color: #f59e0b;
  font-size: 1.5rem;
  font-weight: 700;
  border: 2px solid rgba(245, 158, 11, 0.4);
  flex-shrink: 0;
}

.n1-avatar-preview--header {
  width: 3rem;
  height: 3rem;
  font-size: 1rem;
  border-width: 1.5px;
}

@media (min-width: 640px) {
  .n1-avatar-preview--header {
    width: 5rem;
    height: 5rem;
    font-size: 1.5rem;
    border-width: 2px;
  }
}

.n1-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.n1-toast {
  position: fixed;
  top: 1.25rem;
  bottom: auto;
  left: 50%;
  right: auto;
  width: max-content;
  max-width: min(420px, calc(100vw - 2rem));
  height: auto;
  transform: translateX(-50%) translateY(-120%);
  z-index: 40000;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
  border: 1px solid transparent;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  box-sizing: border-box;
}

.n1-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.n1-toast.success {
  background: rgba(22, 101, 52, 0.95);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.45);
}

.n1-toast.error {
  background: rgba(127, 29, 29, 0.95);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.45);
}

.n1-toast.warning {
  background: rgba(120, 53, 15, 0.95);
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.45);
}

/* Profile lists */
.n1-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2.5rem 1rem;
  color: #94a3b8;
  font-size: 0.875rem;
}

.n1-loading[hidden],
.n1-empty-state[hidden],
.n1-btn-load-more[hidden] {
  display: none !important;
}

.n1-loading-spinner {
  width: 1.75rem;
  height: 1.75rem;
  border: 2px solid rgba(245, 158, 11, 0.25);
  border-top-color: #f59e0b;
  border-radius: 9999px;
  animation: n1-spin 0.7s linear infinite;
}

@keyframes n1-spin {
  to { transform: rotate(360deg); }
}

.n1-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 0.25rem 0 0.5rem;
  padding: 1.5rem 1rem;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 0.75rem;
  background:
    radial-gradient(ellipse 70% 80% at 50% 0%, rgba(245, 158, 11, 0.07), transparent 65%),
    rgba(10, 10, 15, 0.45);
}

.n1-empty-state__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 0.75rem;
  border-radius: 9999px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.28);
  color: #f59e0b;
  font-size: 1.125rem;
}

.n1-empty-state__title {
  margin: 0;
  color: #f8fafc;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.n1-empty-state__desc {
  margin: 0.375rem 0 0;
  max-width: 22rem;
  color: #94a3b8;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.n1-empty-state__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.55rem 1.1rem;
  border-radius: 0.375rem;
  background: #f59e0b;
  color: #0a0a0f;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.n1-empty-state__cta:hover {
  background: #d97706;
}

.n1-empty-state__cta i {
  font-size: 0.7rem;
  transition: transform 0.15s ease;
}

.n1-empty-state__cta:hover i {
  transform: translateX(2px);
}

@media (min-width: 640px) {
  .n1-empty-state {
    padding: 2.75rem 2rem;
  }

  .n1-empty-state__icon {
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: 1rem;
    font-size: 1.25rem;
  }

  .n1-empty-state__title {
    font-size: 1.25rem;
  }

  .n1-empty-state__desc {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.55;
  }

  .n1-empty-state__cta {
    margin-top: 1.25rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
  }
}

.n1-article-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .n1-article-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .n1-article-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.n1-article-card {
  display: flex;
  flex-direction: column;
  background: #0a0a0f;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.n1-article-card:hover {
  border-color: rgba(245, 158, 11, 0.45);
}

.n1-article-card__thumb {
  display: block;
  height: 8.5rem;
  overflow: hidden;
  background: #111827;
}

.n1-article-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.n1-article-card:hover .n1-article-card__thumb img {
  transform: scale(1.06);
}

.n1-article-card__ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #4b5563;
  font-size: 1.5rem;
}

.n1-article-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0.875rem 1rem 1rem;
  min-width: 0;
  flex: 1;
}

.n1-article-card__cat {
  display: inline-flex;
  align-self: flex-start;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #f59e0b;
  background: #1f2937;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
}

.n1-article-card__title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.35;
  min-width: 0;
}

.n1-article-card__title a {
  color: #fff;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s ease;
}

.n1-article-card__title a:hover {
  color: #f59e0b;
}

.n1-article-card__meta {
  margin: 0;
  font-size: 0.75rem;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.n1-btn-remove {
  margin-top: auto;
  align-self: flex-start;
  padding: 0.25rem 0;
  border: none;
  background: transparent;
  color: #9ca3af;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s ease;
}

.n1-btn-remove:hover {
  color: #f87171;
}

.n1-btn-load-more {
  position: relative;
  display: block;
  width: 100%;
  margin-top: 1.25rem;
  padding: 0.625rem 1rem;
  border: 1px solid #4b5563;
  border-radius: 0.375rem;
  background: transparent;
  color: #e2e8f0;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.n1-btn-load-more:hover {
  border-color: #f59e0b;
  color: #f59e0b;
}

.n1-btn-load-more.is-loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.n1-btn-load-more:disabled {
  cursor: not-allowed;
  opacity: 0.85;
  filter: none;
}

.n1-btn-load-more.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: profile-load-more-spin 0.7s linear infinite;
}

@keyframes profile-load-more-spin {
  to { transform: rotate(360deg); }
}


/* Confirm dialog */
.n1-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.65);
}

.n1-confirm-overlay.show {
  display: flex;
}

.n1-confirm-modal {
  width: 100%;
  max-width: 22rem;
  background: #1a1a2e;
  border: 1px solid #374151;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
}

.n1-confirm-title {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
}

.n1-confirm-desc {
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  color: #94a3b8;
  line-height: 1.5;
}

.n1-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.625rem;
}

.n1-confirm-cancel,
.n1-confirm-ok {
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.n1-confirm-cancel {
  border: 1px solid #4b5563;
  background: transparent;
  color: #9ca3af;
}

.n1-confirm-cancel:hover {
  border-color: #6b7280;
  color: #e5e7eb;
}

.n1-confirm-ok {
  border: none;
  background: #f59e0b;
  color: #0a0a0f;
}

.n1-confirm-ok:hover {
  background: #d97706;
}

/* Detail favorite button */
.detail-favorite-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0 0.875rem;
  border: 1px solid #374151;
  border-radius: 9999px;
  background: #1f2937;
  color: #e5e7eb;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.detail-favorite-btn__icon,
.detail-favorite-btn svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.detail-favorite-btn:not(.is-active) .detail-favorite-btn__icon,
.detail-favorite-btn:not(.is-active) svg {
  fill: none;
}

.detail-favorite-btn.is-active {
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.12);
}

.detail-favorite-btn.is-active .detail-favorite-btn__icon,
.detail-favorite-btn.is-active svg {
  fill: currentColor;
  stroke: currentColor;
}

.detail-favorite-btn__spinner {
  display: none;
  box-sizing: border-box;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: detail-fav-spin 0.7s linear infinite;
}

.detail-favorite-btn.is-toggling {
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.65);
  background: rgba(245, 158, 11, 0.14);
  cursor: wait;
  pointer-events: none;
  animation: detail-fav-pulse 1.2s ease-in-out infinite;
}

.detail-favorite-btn.is-toggling .detail-favorite-btn__icon {
  display: none;
}

.detail-favorite-btn.is-toggling .detail-favorite-btn__spinner {
  display: inline-block;
}

@keyframes detail-fav-spin {
  to { transform: rotate(360deg); }
}

@keyframes detail-fav-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
  50% { box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.22); }
}

.detail-favorite-btn:hover {
  border-color: #f59e0b;
  color: #f59e0b;
}

.detail-favorite-toast {
  position: fixed;
  left: 50%;
  bottom: max(1.5rem, env(safe-area-inset-bottom, 0px));
  z-index: 30000;
  max-width: min(92vw, 22.5rem);
  padding: 0.75rem 1.125rem;
  border-radius: 0.625rem;
  background: rgba(15, 23, 42, 0.94);
  color: #f8fafc;
  font-size: 0.875rem;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 0.75rem);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.detail-favorite-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 480px) {
  .detail-favorite-btn__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .detail-favorite-btn {
    padding: 0;
    width: 2.5rem;
  }
}


.n1-confirm-ok {
  position: relative;
}

.n1-confirm-ok:disabled,
.n1-confirm-cancel:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.n1-confirm-ok.is-loading {
  color: transparent;
  pointer-events: none;
}

.n1-confirm-ok.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: n1-confirm-spin 0.7s linear infinite;
}

@keyframes n1-confirm-spin {
  to { transform: rotate(360deg); }
}
