/* MK AUTOMATION AI — Customer Dashboard RC2 */
/* UIV2-01 — shared tokens. Existing --dash-* names stay so current layout rules keep working. */

:root {
  --mk-primary: #0e7490;
  --mk-primary-hover: #155e75;
  --mk-accent: #06b6d4;
  --mk-bg: #f4f7fb;
  --mk-surface: #ffffff;
  --mk-surface-2: #f8fafc;
  --mk-border: #e2e8f0;
  --mk-text: #0f172a;
  --mk-text-secondary: #64748b;
  --mk-success: #047857;
  --mk-success-bg: #ecfdf5;
  --mk-warning: #b45309;
  --mk-warning-bg: #fffbeb;
  --mk-danger: #b91c1c;
  --mk-danger-bg: #fef2f2;
  --mk-info: #0e7490;
  --mk-info-bg: #ecfeff;
  --mk-navy: #0a1628;
  --mk-navy-800: #0f2341;

  --mk-font-page: 1.25rem;
  --mk-font-section: 1.125rem;
  --mk-font-card: 0.95rem;
  --mk-font-body: 0.9375rem;
  --mk-font-small: 0.8125rem;
  --mk-font-caption: 0.75rem;
  --mk-font-button: 0.875rem;
  --mk-font-table: 0.85rem;

  --mk-space-1: 4px;
  --mk-space-2: 8px;
  --mk-space-3: 12px;
  --mk-space-4: 16px;
  --mk-space-5: 20px;
  --mk-space-6: 24px;
  --mk-space-8: 32px;
  --mk-space-10: 40px;
  --mk-space-12: 48px;
  --mk-space-16: 64px;

  --mk-radius-sm: 8px;
  --mk-radius-md: 12px;
  --mk-radius-lg: 16px;
  --mk-radius-pill: 999px;

  --mk-shadow-subtle: 0 1px 2px rgba(15, 23, 42, 0.04);
  --mk-shadow-card: 0 8px 24px rgba(15, 23, 42, 0.06);
  --mk-shadow-floating: 0 16px 40px rgba(15, 23, 42, 0.16);

  --dash-navy: var(--mk-navy);
  --dash-navy-800: var(--mk-navy-800);
  --dash-cyan: var(--mk-accent);
  --dash-cyan-600: var(--mk-primary);
  --dash-bg: var(--mk-bg);
  --dash-sidebar-w: 260px;
  --dash-topbar-h: 64px;
  --dash-radius: var(--mk-radius-lg);
  --dash-border: var(--mk-border);
  --dash-text: #334155;
  --dash-muted: var(--mk-text-secondary);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.dash-body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, 'Segoe UI', system-ui, sans-serif;
  background: var(--dash-bg);
  color: var(--dash-text);
  -webkit-font-smoothing: antialiased;
}

.dash-shell {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.dash-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--dash-sidebar-w);
  background: linear-gradient(180deg, var(--dash-navy) 0%, var(--dash-navy-800) 100%);
  color: #e2e8f0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  transform: translateX(0);
  transition: transform 0.25s ease;
}

.dash-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  color: inherit;
}

.dash-sidebar-brand img {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  object-fit: cover;
}

.dash-sidebar-brand strong {
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.dash-sidebar-brand span {
  color: var(--dash-cyan);
}

.dash-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  overflow-y: auto;
}

.dash-nav-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  padding: 0.5rem 0.75rem 0.35rem;
}

.dash-nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.7rem 0.85rem;
  margin-bottom: 0.2rem;
  border: none;
  border-radius: 0.65rem;
  background: transparent;
  color: #cbd5e1;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.dash-nav-link:hover {
  background: rgba(6, 182, 212, 0.12);
  color: #fff;
}

.dash-nav-link.is-active {
  background: rgba(6, 182, 212, 0.22);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--dash-cyan);
}

.dash-nav-link svg {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
  opacity: 0.9;
}

.dash-sidebar-foot {
  padding: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.dash-nav-logout {
  color: #fca5a5;
}

.dash-nav-logout:hover {
  background: rgba(248, 113, 113, 0.15);
  color: #fecaca;
}

/* Main column */
.dash-main {
  flex: 1;
  margin-left: var(--dash-sidebar-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.dash-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--dash-topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.25rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--dash-border);
}

.dash-topbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.dash-menu-btn {
  display: none;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--dash-border);
  border-radius: 0.55rem;
  background: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.dash-menu-btn svg {
  width: 1.15rem;
  height: 1.15rem;
  color: var(--dash-navy);
}

.dash-page-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dash-navy);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.dash-plan-pill {
  display: none;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 9999px;
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  color: var(--dash-cyan-600);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.dash-plan-pill.is-expired {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #64748b;
}

@media (min-width: 640px) {
  .dash-plan-pill {
    display: inline-flex;
  }
}

.dash-user-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  max-width: 220px;
}

.dash-avatar {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--dash-cyan), var(--dash-navy-800));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  object-fit: cover;
}

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

.dash-user-meta {
  min-width: 0;
  display: none;
}

@media (min-width: 768px) {
  .dash-user-meta {
    display: block;
  }
}

.dash-user-email {
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-user-name {
  font-size: 0.7rem;
  color: var(--dash-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-content {
  flex: 1;
  min-width: 0;
  padding: 1.25rem 1.25rem 2rem;
}

.dash-content-inner {
  max-width: 1100px;
  min-width: 0;
  margin: 0 auto;
}

/* Cards */
.dash-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .dash-cards {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .dash-cards {
    grid-template-columns: repeat(4, 1fr);
  }
}

.dash-card {
  background: var(--mk-surface);
  border: 1px solid var(--mk-border);
  border-radius: var(--mk-radius-lg);
  padding: 1.15rem 1.2rem;
  box-shadow: var(--mk-shadow-subtle);
  min-height: 7.5rem;
  display: flex;
  flex-direction: column;
}

.dash-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dash-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.65rem;
}

.dash-card-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--dash-navy);
  line-height: 1.2;
}

.dash-card-sub {
  margin-top: auto;
  padding-top: 0.55rem;
  font-size: 0.8125rem;
  color: var(--dash-muted);
}

.dash-card-accent {
  border-top: 3px solid var(--dash-cyan);
}

/* Panels */
.dash-panel {
  background: var(--mk-surface);
  border: 1px solid var(--mk-border);
  border-radius: var(--mk-radius-lg);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--mk-shadow-subtle);
  margin-top: 1.25rem;
}

.dash-panel h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  color: var(--dash-navy);
}

.dash-panel p.lead {
  margin: 0 0 1rem;
  color: var(--dash-muted);
  font-size: 0.875rem;
}

.dash-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--dash-muted);
  font-size: 0.9rem;
}

.dash-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--mk-space-2);
  padding: 0.65rem 1.1rem;
  border-radius: var(--mk-radius-md);
  font-family: inherit;
  font-size: var(--mk-font-button);
  font-weight: 700;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  background: transparent;
  color: var(--mk-text);
}

.dash-btn:focus-visible {
  outline: 2px solid var(--mk-primary);
  outline-offset: 2px;
}

.dash-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.dash-btn-primary {
  color: #fff;
  background: var(--mk-primary);
  border-color: var(--mk-primary);
}

.dash-btn-primary:hover:not(:disabled) {
  background: var(--mk-primary-hover);
  border-color: var(--mk-primary-hover);
}

.dash-btn-outline {
  color: var(--mk-navy);
  background: var(--mk-surface);
  border-color: var(--mk-border);
}

.dash-btn-outline:hover:not(:disabled) {
  background: var(--mk-surface-2);
}

.dash-btn-ghost {
  color: var(--mk-primary);
  background: transparent;
  border-color: transparent;
}

.dash-btn-ghost:hover:not(:disabled) {
  background: var(--mk-info-bg);
}

.dash-btn-icon {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border-radius: var(--mk-radius-md);
  border-color: var(--mk-border);
  background: var(--mk-surface);
  color: var(--mk-navy);
}

@media (max-width: 767px) {
  .dash-btn:not(.dash-btn-sm) {
    min-height: 44px;
  }
}

.dash-table-wrap {
  overflow-x: auto;
}

.wallet-history-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.wallet-table-scroll {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
}

.wallet-table-scroll .dash-table {
  width: max-content;
  min-width: 100%;
}

.wallet-table-scroll th,
.wallet-table-scroll td {
  white-space: nowrap;
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--mk-font-table);
}

.dash-table th,
.dash-table td {
  text-align: left;
  padding: 0.7rem 0.55rem;
  border-bottom: 1px solid var(--dash-border);
}

.dash-table th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dash-muted);
}

.dash-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: var(--mk-radius-pill);
  font-size: var(--mk-font-caption);
  font-weight: 700;
  line-height: 1.3;
}

.dash-badge-neutral,
.dash-badge-off,
.dash-badge-history {
  background: var(--mk-surface-2);
  color: var(--mk-text-secondary);
}

.dash-badge-info,
.dash-badge-processing {
  background: var(--mk-info-bg);
  color: var(--mk-info);
}

.dash-badge-success,
.dash-badge-ok {
  background: var(--mk-success-bg);
  color: var(--mk-success);
}

.dash-badge-ok.license-status-active {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.dash-badge-warning,
.dash-badge-pending {
  background: var(--mk-warning-bg);
  color: var(--mk-warning);
}

.dash-badge-submitted {
  background: var(--mk-warning-bg);
  color: var(--mk-warning);
}

.license-row-active td {
  background: #f0fdf4;
}

.license-row-active .license-col-expire,
.license-row-active .license-col-remaining {
  font-weight: 600;
  color: #065f46;
}

.license-row-history td {
  color: #9ca3af;
  background: #fafafa;
}

.license-row-history .license-col-expire,
.license-row-history .license-col-remaining {
  color: #d1d5db;
}

.license-row-history code {
  color: #6b7280;
}

.license-row-expired td {
  color: #7f1d1d;
  background: #fffbfb;
}

.license-row-expired code {
  color: #991b1b;
}

.dash-badge-danger,
.dash-badge-expired,
.dash-badge-failed,
.license-status-expired {
  background: var(--mk-danger-bg);
  color: var(--mk-danger);
  border: 1px solid #fecaca;
}

.license-row-history .btn-renew-license,
.license-row-history .btn-renew-package,
.license-row-expired .btn-renew-license,
.license-row-expired .btn-renew-package {
  display: none !important;
}

.dash-btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  white-space: nowrap;
}

.dash-btn-danger {
  background: var(--mk-surface);
  border: 1px solid #fecaca;
  color: var(--mk-danger);
}

.dash-btn-danger:hover {
  background: #fef2f2;
}

.wallet-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.wallet-action-muted {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}

.wallet-remain-badge {
  display: inline-flex;
  align-items: center;
  min-width: 3.25rem;
  padding: 0.15rem 0.45rem;
  border-radius: 0.4rem;
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  color: #0e7490;
  font-size: 0.75rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.wallet-remain-badge.is-warn {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.wallet-remain-badge.is-expired {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #64748b;
}

.dash-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  color: var(--dash-muted);
  font-size: 0.9rem;
}

.dash-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.dash-profile-grid {
  display: grid;
  gap: 0.85rem;
}

.dash-profile-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--dash-border);
  font-size: 0.875rem;
}

.dash-profile-row dt {
  color: var(--dash-muted);
  font-weight: 600;
  margin: 0;
}

.dash-profile-row dd {
  margin: 0;
  color: var(--dash-navy);
  font-weight: 600;
  word-break: break-all;
}

.dash-profile-security {
  margin-top: 1.25rem;
}

.dash-security-form {
  display: grid;
  gap: 1rem;
  max-width: min(420px, 100%);
}

.dash-field-label {
  display: block;
  font-size: var(--mk-font-small);
  font-weight: 600;
  color: var(--dash-muted);
  margin-bottom: 0.35rem;
}

.dash-password-wrap {
  position: relative;
}

.password-toggle,
.dash-password-toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0.25rem 0.35rem;
  font-size: 1rem;
  line-height: 1;
  color: var(--dash-muted);
  opacity: 0.75;
  pointer-events: auto;
}

.password-toggle:hover,
.dash-password-toggle:hover {
  opacity: 1;
  color: var(--dash-navy);
}

.dash-password-icon {
  display: inline-flex;
  pointer-events: none;
}

.dash-password-icon-eye-off {
  display: none;
}

.dash-password-toggle.is-visible .dash-password-icon-eye,
.password-toggle.is-visible .dash-password-icon-eye {
  display: none;
}

.dash-password-toggle.is-visible .dash-password-icon-eye-off,
.password-toggle.is-visible .dash-password-icon-eye-off {
  display: inline-flex;
}

.dash-field-error {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: #dc2626;
}

.dash-security-actions {
  margin-top: 0.25rem;
}

/* Overlay mobile */
.dash-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.45);
  z-index: 35;
}

.dash-overlay.is-open {
  display: block;
}

@media (max-width: 900px) {
  .dash-sidebar {
    transform: translateX(-100%);
  }

  .dash-sidebar.is-open {
    transform: translateX(0);
  }

  .dash-main {
    margin-left: 0;
  }

  .dash-menu-btn {
    display: inline-flex;
  }
}

.dash-page-section[hidden] {
  display: none !important;
}

.dash-pkg-grid {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .dash-pkg-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.dash-pkg-card {
  cursor: pointer;
  text-align: left;
  font: inherit;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.dash-pkg-card:hover {
  border-color: var(--mk-primary);
}

.dash-pkg-card.is-selected {
  border-color: var(--mk-primary);
}

.dash-content:has(.admin-overview) {
  padding: 1.5rem 1.5rem 1.75rem;
}

.dash-content-inner:has(.admin-overview) {
  max-width: 1240px;
}

.admin-overview {
  width: 100%;
  margin: 0 auto;
}

.admin-overview-bar,
.admin-package-block .admin-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.admin-overview-bar {
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.admin-range {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem 0.65rem;
  width: 100%;
  min-width: 0;
  margin: 0 0 0.85rem;
}

.admin-range-kicker,
.admin-range-field {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
  color: var(--dash-muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.admin-range-kicker {
  align-self: center;
  color: var(--dash-navy);
  font-size: 0.8125rem;
}

.admin-range-field input {
  width: 11rem;
  max-width: 100%;
  height: 2.25rem;
  border: 1px solid var(--mk-border);
  border-radius: var(--mk-radius-sm);
  padding: 0 0.55rem;
  background: var(--mk-surface);
  color: var(--mk-text);
  font: inherit;
  font-size: var(--mk-font-button);
}

.admin-range-field input:focus-visible {
  outline: 2px solid var(--mk-primary);
  outline-offset: 2px;
  border-color: var(--mk-primary);
}

.admin-range-arrow {
  align-self: center;
  color: var(--dash-muted);
  padding-bottom: 0.35rem;
}

.admin-range-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-width: 0;
}

.admin-range-label,
.admin-range-error,
.admin-range-blocked p {
  margin: 0;
}

.admin-range-label,
.admin-range-error {
  flex: 1 0 100%;
}

.admin-range-label {
  color: var(--dash-navy);
  font-size: 0.8125rem;
  font-weight: 600;
}

.admin-range-error {
  color: #b91c1c;
  font-size: 0.8125rem;
}

.admin-range-blocked {
  display: grid;
  gap: 0.35rem;
}

.admin-section-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--dash-navy);
}

.admin-package-block {
  margin-top: 1rem;
}

.admin-web-block {
  margin-top: 1.75rem;
}

.admin-web-head {
  margin-bottom: 0.85rem;
}

.admin-web-note {
  margin: 0.2rem 0 0;
  color: var(--dash-muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

.admin-web-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin: 0;
}

.admin-web-card {
  min-width: 0;
  height: auto;
}

.admin-web-card .dash-card-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--dash-navy);
}

.admin-web-card .dash-card-value {
  overflow-wrap: anywhere;
  font-size: 1.65rem;
  line-height: 1.15;
}

.admin-web-card .dash-card-sub {
  font-size: 0.75rem;
  line-height: 1.35;
}

.admin-web-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: #16a34a;
  flex: 0 0 auto;
}

.admin-web-error p {
  margin: 0;
  color: var(--dash-muted);
  font-size: 0.875rem;
}

.admin-package-block .admin-section-title {
  margin-bottom: 0.85rem;
}

.admin-stat-cards,
.admin-package-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin: 0;
}

.admin-stat-card,
.admin-package-cards .dash-card {
  min-width: 0;
  height: auto;
}

.admin-stat-card .dash-card-value,
.admin-package-cards .dash-card-value {
  overflow-wrap: anywhere;
}

.admin-package-cards .dash-card-label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-stats-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.85rem;
}

.admin-stats-heading {
  margin: 1.25rem 0 0.75rem;
  font-size: 1rem;
  color: var(--dash-navy);
}

.admin-stat-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}

.admin-stat-card .dash-card-label {
  margin-bottom: 0;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
  color: var(--dash-navy);
}

.admin-stat-card .dash-card-value,
.admin-package-cards .dash-card-value {
  font-size: 1.65rem;
  line-height: 1.15;
}

.admin-stat-card .dash-card-sub,
.admin-package-cards .dash-card-sub {
  font-size: 0.75rem;
  line-height: 1.35;
}

.admin-stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  flex: 0 0 auto;
}

.admin-stat-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.admin-stat-accounts .admin-stat-icon {
  color: #1d4ed8;
  background: #eff6ff;
}

.admin-stat-activated .admin-stat-icon {
  color: #0f766e;
  background: #f0fdfa;
}

.admin-stat-active .admin-stat-icon {
  color: #15803d;
  background: #f0fdf4;
}

.admin-stat-revenue .admin-stat-icon {
  color: #b45309;
  background: #fffbeb;
}

.admin-stats-error {
  display: grid;
  gap: 0.75rem;
  justify-items: start;
}

.admin-stats-error p {
  margin: 0;
}

@media (min-width: 768px) {
  .dash-content:has(.admin-overview) {
    padding: 1.75rem 2rem 2rem;
  }

  .admin-stat-cards,
  .admin-package-cards,
  .admin-web-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .admin-stat-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .admin-package-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-web-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .admin-web-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.admin-biz-block,
.admin-trend-block {
  margin-top: 1.15rem;
}

.admin-web-block {
  margin-top: 1.75rem;
}

.admin-web-totals,
.admin-period-note,
.admin-chart-caption,
.admin-chart-empty,
.admin-trend-loading {
  margin: 0.75rem 0 0;
  color: var(--dash-muted);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.admin-trend-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.55rem;
}

.admin-trend-toggle {
  display: inline-flex;
  border: 1px solid var(--dash-border);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.admin-trend-toggle button {
  border: 0;
  background: transparent;
  color: var(--dash-navy);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 650;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
}

.admin-trend-toggle button[aria-pressed='true'] {
  background: var(--dash-navy);
  color: #fff;
}

.admin-trend-toggle button:disabled {
  cursor: default;
  opacity: 0.65;
}

.admin-trend-charts {
  display: grid;
  gap: 0.65rem;
}

.admin-chart {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 230px;
  min-width: 0;
  margin: 0;
  padding: 0.55rem 0.7rem 0.4rem;
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  background: #fff;
  overflow: visible;
}

@media (min-width: 768px) {
  .admin-chart {
    height: 250px;
  }
}

@media (min-width: 1024px) {
  .admin-chart {
    height: 270px;
  }
}

.admin-chart figcaption {
  margin: 0 0 0.2rem;
  color: var(--dash-navy);
  font-size: 1rem;
  font-weight: 700;
}

.admin-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.2rem;
  color: var(--dash-text);
  font-size: 0.8125rem;
}

.admin-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.admin-legend-item i {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  display: inline-block;
}

.admin-chart .admin-chart-caption,
.admin-chart .admin-chart-empty {
  margin: 0.1rem 0 0.15rem;
}

.admin-chart-plot {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) 1rem;
  column-gap: 0.25rem;
}

.admin-chart-y {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;
  color: var(--dash-muted);
  font-size: 11px;
  line-height: 1;
}

.admin-chart svg {
  grid-column: 2;
  grid-row: 1;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.admin-chart-x {
  grid-column: 2;
  grid-row: 2;
  position: relative;
  height: 1rem;
  color: var(--dash-muted);
  font-size: 11px;
  line-height: 1rem;
}

.admin-chart-x span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
}

.admin-chart-x span.admin-chart-x-start {
  transform: none;
}

.admin-chart-x span.admin-chart-x-end {
  transform: translateX(-100%);
}

.admin-chart-axis {
  stroke: var(--dash-border);
  stroke-width: 1;
}

.admin-chart-label {
  fill: var(--dash-muted);
  font-size: 11px;
}

.admin-chart-hit {
  fill: transparent;
  cursor: pointer;
}

.admin-chart-hit:focus {
  outline: 2px solid var(--dash-cyan);
  outline-offset: -2px;
}

.admin-trend-tip {
  position: absolute;
  z-index: 2;
  transform: translateX(-50%);
  max-width: 14rem;
  padding: 0.45rem 0.6rem;
  border-radius: 0.6rem;
  background: var(--dash-navy);
  color: #fff;
  font-size: 0.75rem;
  line-height: 1.4;
  white-space: pre-line;
  pointer-events: none;
}

.admin-mix {
  display: grid;
  gap: 0.75rem;
}

.admin-mix-row {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.admin-mix-label,
.admin-mix-value {
  color: var(--dash-navy);
  font-size: 0.875rem;
  font-weight: 650;
}

.admin-mix-value {
  font-variant-numeric: tabular-nums;
}

.admin-mix-track {
  display: block;
  height: 0.7rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.admin-mix-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--dash-cyan-600);
}

.admin-web-error .dash-btn {
  margin-top: 0.75rem;
}

@media (max-width: 430px) {
  .admin-mix-row {
    grid-template-columns: 4.5rem minmax(0, 1fr) auto;
    gap: 0.45rem;
  }
}

.dash-content:has(#guide-admin-root) {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.dash-content-inner:has(#guide-admin-root) {
  width: 100%;
  max-width: 1600px;
}

.guide-admin-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.guide-table {
  width: 100%;
}

.guide-table td {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

#guide-admin-root .dash-table-wrap {
  max-width: 100%;
}

.guide-table th,
.guide-table td {
  vertical-align: middle;
}

.guide-table th:nth-child(1),
.guide-table td:nth-child(1) {
  width: auto;
  min-width: 14rem;
  white-space: normal;
}

.guide-table th:nth-child(2),
.guide-table td:nth-child(2) {
  min-width: 11rem;
  white-space: nowrap;
}

.guide-table th:nth-child(3),
.guide-table td:nth-child(3),
.guide-table th:nth-child(4),
.guide-table td:nth-child(4),
.guide-table th:nth-child(5),
.guide-table td:nth-child(5) {
  white-space: nowrap;
}

.guide-actions-cell {
  width: 1%;
  white-space: nowrap;
}

.guide-actions,
.guide-actions-row {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  gap: 0.4rem;
  width: max-content;
  max-width: none;
}

.guide-actions .dash-btn {
  flex: 0 0 auto;
  width: auto;
  height: 38px;
  min-height: 38px;
  padding: 0 0.75rem;
  white-space: nowrap;
  line-height: 1;
  box-sizing: border-box;
}

.guide-status {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 700;
}

.guide-status.is-live {
  background: #ecfdf5;
  color: #047857;
}

.guide-form {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.guide-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--dash-navy);
}

.guide-form-section {
  display: grid;
  gap: 0.75rem;
}

.guide-form-section h3 {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  color: var(--dash-navy);
}

.guide-check {
  display: flex !important;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
  cursor: pointer;
  font-weight: 600;
}

.guide-form .guide-check input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  flex: 0 0 auto;
}

.guide-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
}

.guide-editor-wrap {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
}

.guide-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.35rem;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.4rem;
  border: 1px solid var(--dash-border);
  border-radius: 10px;
  background: #f8fafc;
  position: sticky;
  top: var(--dash-topbar-h);
  z-index: 20;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
}

.guide-editor-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
  max-width: 100%;
}

.guide-editor-divider {
  width: 1px;
  height: 1.35rem;
  flex: 0 0 auto;
  background: #cbd5e1;
}

.guide-editor-toolbar button,
.guide-editor-toolbar select,
.guide-editor-toolbar #guide-editor-size-custom {
  height: 2rem;
  min-height: 2rem;
  box-sizing: border-box;
  padding: 0 0.5rem;
  border: 1px solid var(--dash-border);
  border-radius: 8px;
  background: #fff;
  color: var(--dash-navy);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.guide-editor-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
}

.guide-form .guide-editor-toolbar select,
.guide-form .guide-editor-toolbar input {
  width: auto;
  max-width: 100%;
}

.guide-editor-toolbar select {
  max-width: 100%;
  font-weight: 600;
}

.guide-editor-toolbar #guide-editor-font {
  width: 10.5rem;
}

.guide-editor-toolbar #guide-editor-size {
  width: 5.75rem;
}

.guide-editor-size-field {
  position: relative;
  display: inline-flex;
  max-width: 100%;
}

.guide-editor-toolbar #guide-editor-size-custom {
  width: 4.25rem;
  font-weight: 600;
  cursor: text;
}

::highlight(guide-editor-target) {
  background-color: rgba(51, 144, 255, 0.45);
  color: inherit;
}

.guide-editor-toolbar #guide-editor-size-custom[aria-invalid='true'] {
  border-color: #dc2626;
}

.guide-editor-size-note {
  position: absolute;
  top: calc(100% + 0.2rem);
  right: 0;
  z-index: 3;
  max-width: 9rem;
  padding: 0.15rem 0.4rem;
  border: 1px solid #fde68a;
  border-radius: 6px;
  background: #fff;
  color: #b45309;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: normal;
}

.guide-editor-toolbar #guide-editor-leading {
  width: 6.5rem;
}

.guide-editor-color {
  position: relative;
}

.guide-editor-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  min-width: 2rem;
  padding: 0.25rem;
}

.guide-editor-icon svg {
  display: block;
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

.guide-editor-color-pop {
  position: absolute;
  z-index: 6;
  top: calc(100% + 0.3rem);
  left: 0;
  display: grid;
  grid-template-columns: repeat(4, 1.65rem);
  gap: 0.35rem;
  width: max-content;
  max-width: calc(100vw - 1.5rem);
  box-sizing: border-box;
  padding: 0.45rem;
  border: 1px solid var(--dash-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.guide-editor-color-pop[hidden] {
  display: none;
}

.guide-editor-toolbar .guide-editor-swatch {
  display: block;
  width: 1.65rem;
  height: 1.65rem;
  min-height: 1.65rem;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.22);
  border-radius: 6px;
  box-sizing: border-box;
  cursor: pointer;
}

.guide-editor-toolbar .guide-editor-swatch:hover {
  outline: 2px solid rgba(8, 145, 178, 0.45);
  outline-offset: 1px;
}

.guide-editor-swatch-custom {
  display: grid;
  overflow: hidden;
  background: conic-gradient(#dc2626, #ea580c, #eab308, #16a34a, #2563eb, #7c3aed, #dc2626);
  border-style: dashed;
}

.guide-form .guide-editor-swatch-custom input[type='color'] {
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}

.guide-editor-u {
  text-decoration: underline;
}

.guide-editor {
  min-height: 420px;
  padding: 0.9rem 1rem;
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  background: #fff;
  color: #1e293b;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.guide-editor:focus {
  outline: 2px solid rgba(8, 145, 178, 0.35);
}

.guide-editor img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0.75rem 0;
  object-fit: contain;
}

.guide-editor-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 65;
  background: rgba(15, 23, 42, 0.45);
}

.guide-editor-modal-backdrop[hidden] {
  display: none !important;
}

.guide-editor-dialog {
  position: fixed;
  z-index: 70;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  gap: 0.65rem;
  width: min(36rem, calc(100vw - 1.5rem));
  max-width: calc(100vw - 1.5rem);
  max-height: min(80vh, 40rem);
  margin: 0;
  box-sizing: border-box;
  padding: 0.9rem;
  overflow: auto;
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.28);
}

.guide-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.guide-modal-head h3 {
  margin: 0;
  min-width: 0;
}

.guide-modal-close {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #334155;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.guide-editor-file-label,
.guide-editor-or,
.guide-editor-file-meta {
  margin: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 0.86rem;
}

.guide-editor-or {
  color: var(--dash-muted, #64748b);
}

.guide-editor-dialog[hidden] {
  display: none;
}

.guide-editor-dialog h3 {
  margin: 0;
  font-size: 0.95rem;
}

.guide-editor-preview {
  display: block;
  max-width: 100%;
  max-height: 160px;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .guide-editor {
    min-height: 280px;
  }
}

.guide-form input,
.guide-form textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-weight: 500;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--dash-border);
  border-radius: 8px;
}

.guide-check {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
}

.guide-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.guide-form-note {
  color: #b45309;
  margin: 0.75rem 0 0;
}

.guide-form-note.is-ok {
  color: #047857;
}

#guide-library-note {
  white-space: pre-line;
}

.guide-detail-root {
  display: block;
  width: 100%;
  min-height: 0;
}

.guide-list {
  display: block;
  width: 100%;
  min-height: 0;
}

.guide-list .guide-list-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  justify-content: center;
  justify-items: stretch;
}

@media (min-width: 900px) {
  .guide-list .guide-list-container:has(.guide-card:nth-child(2)) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.guide-list .guide-card {
  margin-left: 0;
  margin-right: 0;
  justify-self: stretch;
  min-width: 0;
}

.guide-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--dash-border);
  border-radius: 16px;
  padding: 1.25rem 1.35rem;
  cursor: pointer;
  box-shadow: none;
}

.guide-card-cover {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
}

.guide-card-cat,
.guide-badge {
  display: inline-block;
  margin: 0;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #ecfeff;
  color: var(--dash-cyan-600, #0891b2);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.guide-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--dash-navy);
  overflow-wrap: anywhere;
}

.guide-card-excerpt {
  color: var(--dash-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.guide-article {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid var(--dash-border);
  border-radius: 16px;
  padding: 2rem 2.5rem 2.25rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.guide-back {
  display: inline-block;
  margin-bottom: 1.25rem;
  color: var(--dash-cyan-600, #0891b2);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.guide-article-header {
  max-width: 820px;
  margin: 0 auto 1.5rem;
}

.guide-article-title {
  margin: 0.75rem 0 0;
  color: var(--dash-navy);
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.guide-article-excerpt {
  margin: 0.85rem 0 0;
  color: #475569;
  font-size: 1.05rem;
  line-height: 1.6;
}

.guide-article .guide-updated {
  margin: 0.85rem 0 0;
}

.guide-article-cover {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto 1.5rem;
  border-radius: 10px;
  object-fit: contain;
}

.guide-article-body {
  color: #1e293b;
  font-size: 16px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.guide-article-body h1,
.guide-article-body h2,
.guide-article-body h3,
.guide-article-body h4,
.guide-article-body p,
.guide-article-body ul,
.guide-article-body ol,
.guide-article-body blockquote {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.guide-article-body h2,
.guide-article-body h3,
.guide-article-body h4 {
  color: var(--dash-navy);
  line-height: 1.3;
  font-weight: 700;
}

.guide-article-body h2 {
  margin-top: 2rem;
  margin-bottom: 0.85rem;
  font-size: 24px;
}

.guide-article-body h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  font-size: 20px;
}

.guide-article-body h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.65rem;
  font-size: 18px;
}

.guide-article-body p {
  margin-top: 0;
  margin-bottom: 16px;
}

.guide-article-body ul,
.guide-article-body ol {
  margin-top: 0;
  margin-bottom: 16px;
  padding-left: 1.35rem;
}

.guide-article-body ul {
  list-style: disc;
}

.guide-article-body ol {
  list-style: decimal;
}

.guide-article-body li {
  margin: 0.35rem 0;
}

.guide-article-body li ul,
.guide-article-body li ol {
  margin-top: 0.35rem;
  margin-bottom: 0.35rem;
}

.guide-article-body a {
  color: var(--dash-cyan-600, #0891b2);
  text-decoration: underline;
}

.guide-article-body img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 1.25rem auto;
  border-radius: 10px;
  object-fit: contain;
}

.guide-article-body pre,
.guide-article-body table {
  max-width: 100%;
  overflow-x: auto;
}

.guide-article .guide-video {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 1.5rem auto 0;
  padding-top: 56.25%;
}

.guide-article .guide-video iframe,
.guide-article .guide-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 10px;
}

.guide-article .guide-video-link {
  max-width: 820px;
  margin: 1rem auto 0;
}

.guide-center-head {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px 0;
  box-sizing: border-box;
}

.guide-center-head h1 {
  margin: 0;
  color: var(--dash-navy);
  font-size: 1.75rem;
  line-height: 1.25;
}

.guide-center-head p {
  margin: 0.45rem 0 0;
  color: var(--dash-muted);
  font-size: 1rem;
  line-height: 1.5;
}

.guide-center {
  display: grid;
  grid-template-columns: 250px minmax(0, 1000px) 250px;
  justify-content: center;
  gap: 24px;
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  box-sizing: border-box;
  align-items: start;
}

.guide-nav,
.guide-side-card,
.guide-meta-compact {
  background: #fff;
  border: 1px solid var(--dash-border);
  border-radius: 16px;
}

.guide-nav,
.guide-side-card {
  padding: 1rem 0.9rem 1.05rem;
}

.guide-side-kicker,
.guide-side-card h2,
.guide-meta-compact h2 {
  margin: 0 0 0.75rem;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.guide-all-link {
  display: inline-block;
  margin: 0 0 0.85rem;
  color: var(--dash-cyan-600, #0891b2);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

.guide-all-link:hover,
.guide-all-link:focus-visible {
  text-decoration: underline;
  outline: 2px solid #0891b2;
  outline-offset: 2px;
}

.guide-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.guide-nav-link {
  display: block;
  width: 100%;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  margin: 0;
  padding: 0.55rem 0.7rem;
  border: 1px solid transparent;
  border-left: 3px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #334155;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}

.guide-nav-link:hover,
.guide-nav-link:focus-visible {
  background: #f8fafc;
  outline: 2px solid #0891b2;
  outline-offset: 1px;
}

.guide-nav-link.is-active {
  background: #ecfeff;
  border-color: #cffafe;
  border-left-color: #0891b2;
  color: #0f2341;
  font-weight: 700;
}

.guide-meta {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.guide-facts {
  display: grid;
  gap: 0.65rem;
  margin: 0;
}

.guide-facts div {
  display: grid;
  gap: 0.1rem;
}

.guide-facts dt {
  color: #64748b;
  font-size: 0.75rem;
}

.guide-facts dd {
  margin: 0;
  color: var(--dash-navy);
  font-size: 0.92rem;
  font-weight: 700;
}

.guide-side-card p {
  margin: 0 0 0.85rem;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.5;
}

.guide-support-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  background: var(--mk-primary);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.guide-support-link:hover,
.guide-support-link:focus-visible {
  background: var(--mk-primary-hover);
  outline: 2px solid var(--mk-primary);
  outline-offset: 2px;
}

.guide-meta-compact {
  display: none;
  margin: 0 0 1.25rem;
  padding: 0.9rem 1rem;
}

.guide-flow {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  background: #f8fafc;
}

.guide-flow ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-flow li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #0f2341;
  font-size: 0.84rem;
  font-weight: 600;
}

.guide-flow li span {
  display: inline-flex;
  width: 1.35rem;
  height: 1.35rem;
  align-items: center;
  justify-content: center;
  border: 1px solid #0891b2;
  border-radius: 999px;
  color: #0e7490;
  font-size: 0.72rem;
  font-weight: 700;
}

.guide-flow li:not(:last-child)::after {
  content: "→";
  color: #94a3b8;
  font-weight: 500;
}

.guide-center .guide-article {
  max-width: none;
  margin: 0;
}

.guide-center .guide-article-header,
.guide-center .guide-article-body h1,
.guide-center .guide-article-body h2,
.guide-center .guide-article-body h3,
.guide-center .guide-article-body h4,
.guide-center .guide-article-body p,
.guide-center .guide-article-body ul,
.guide-center .guide-article-body ol,
.guide-center .guide-article-body blockquote,
.guide-center .guide-article .guide-video-link {
  max-width: none;
}

@media (max-width: 1100px) {
  .guide-center {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .guide-meta {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 800px) {
  .guide-center {
    grid-template-columns: minmax(0, 1fr);
    padding: 16px 12px 32px;
  }

  .guide-main {
    order: 1;
  }

  .guide-meta {
    order: 2;
    grid-template-columns: 1fr;
  }

  .guide-nav {
    order: 3;
  }

  .guide-info-card {
    display: none;
  }

  .guide-meta-compact {
    display: block;
  }

  .guide-center-head {
    padding: 20px 16px 0;
  }
}

.guide-updated {
  margin-top: 1rem;
  color: var(--dash-muted);
  font-size: 0.875rem;
}

@media (max-width: 1024px) {
  .guide-article-title {
    font-size: 1.625rem;
  }
}

@media (max-width: 768px) {
  .guide-list .guide-list-container {
    padding: 16px;
  }

  .guide-article {
    padding: 1.25rem 1rem 1.5rem;
    border-radius: 14px;
  }

  .guide-article-title {
    font-size: 1.45rem;
  }

  .guide-card {
    padding: 1.15rem 1rem;
  }
}

.admin-denied p {
  margin: 0;
  font-weight: 600;
}

.guide-library-page,
.guide-library-picker,
.guide-library-confirm {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.guide-library-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.guide-library-head h2,
.guide-library-picker h3,
.guide-library-confirm p,
.guide-library-empty p,
.guide-library-name,
.guide-library-meta,
.guide-library-status,
.guide-library-lock {
  margin: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.guide-library-head h2 {
  font-size: 1.25rem;
}

.guide-library-search,
.guide-library-picker input[type='search'] {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-bottom: 0.85rem;
}

.guide-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  width: 100%;
  min-width: 0;
}

.guide-library-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  min-width: 0;
  max-width: 100%;
  padding: 0.65rem;
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  font: inherit;
  color: inherit;
}

button.guide-library-card {
  cursor: pointer;
}

.guide-library-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 10px;
  background: #f1f5f9;
}

.guide-library-thumb img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.guide-library-name {
  font-size: 0.86rem;
  font-weight: 600;
}

.guide-library-meta,
.guide-library-lock {
  color: #64748b;
  font-size: 0.78rem;
}

.guide-library-status.is-used {
  color: #b45309;
  font-size: 0.78rem;
  font-weight: 600;
}

.guide-library-actions,
.guide-library-empty {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.guide-library-empty {
  grid-column: 1 / -1;
  flex-direction: column;
  align-items: flex-start;
}

.guide-library-picker {
  position: fixed;
  z-index: 70;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  gap: 0.65rem;
  width: min(52rem, calc(100vw - 1.5rem));
  max-width: calc(100vw - 1.5rem);
  max-height: min(80vh, 44rem);
  margin: 0;
  padding: 0.9rem;
  overflow: auto;
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.28);
}

.guide-library-picker[hidden],
.guide-library-confirm[hidden] {
  display: none;
}

.guide-cover-label,
.guide-cover-empty,
.guide-cover-name,
.guide-cover-missing,
.guide-cover-error {
  margin: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.guide-cover {
  display: grid;
  gap: 0.55rem;
  max-width: 100%;
}

.guide-cover-preview,
#guide-cover-preview {
  display: grid;
  gap: 0.45rem;
  max-width: 100%;
}

.guide-cover-thumb {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 240px;
  object-fit: contain;
  border-radius: 10px;
  background: #f1f5f9;
}

.guide-cover-missing,
.guide-cover-error {
  color: #b45309;
  font-size: 0.86rem;
}

.guide-cover-empty {
  color: #64748b;
  font-size: 0.86rem;
}

.guide-library-actions {
  position: relative;
  z-index: 2;
}

.guide-library-actions .dash-btn {
  pointer-events: auto;
  cursor: pointer;
}

.guide-library-confirm {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 1rem;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.45);
  pointer-events: auto;
}

.guide-library-confirm[hidden] {
  display: none !important;
}

.guide-library-confirm-panel {
  width: min(100%, 420px);
  max-width: 100%;
  box-sizing: border-box;
  padding: 1rem;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.2);
}

.guide-library-confirm-panel p + p {
  margin-top: 0.35rem;
}

@media (max-width: 768px) {
  .guide-library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.admin-users {
  min-width: 0;
  max-width: 100%;
}

.admin-users-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.admin-users-head h2 {
  margin: 0 0 0.3rem;
  font-size: 1.2rem;
  color: var(--dash-navy);
}

.admin-users-head p,
.admin-users-total {
  margin: 0;
  color: var(--dash-muted);
  font-size: 0.875rem;
}

.admin-users-total {
  margin-bottom: 0.85rem;
}

.admin-users-total strong {
  color: var(--dash-navy);
  font-size: 1.05rem;
}

.admin-users-filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.admin-users-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.admin-users-field label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--dash-muted);
}

.dash-field-input,
.admin-users-field input,
.admin-users-field select,
.admin-users-field textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid var(--mk-border);
  border-radius: var(--mk-radius-md);
  background: var(--mk-surface);
  color: var(--mk-text);
  font: inherit;
}

.dash-field-input {
  max-width: 100%;
  padding: 0.55rem 2.5rem 0.55rem 0.65rem;
  font-size: var(--mk-font-button);
}

.admin-users-field input,
.admin-users-field select,
.admin-users-field textarea {
  padding: 0.55rem 0.7rem;
  font-size: var(--mk-font-body);
}

.dash-field-input::placeholder,
.admin-users-field input::placeholder,
.admin-users-field textarea::placeholder {
  color: var(--mk-text-secondary);
}

.dash-field-input:hover:not(:disabled),
.admin-users-field input:hover:not(:disabled),
.admin-users-field select:hover:not(:disabled),
.admin-users-field textarea:hover:not(:disabled) {
  border-color: #cbd5e1;
}

.dash-field-input:focus-visible,
.admin-users-field input:focus-visible,
.admin-users-field select:focus-visible,
.admin-users-field textarea:focus-visible {
  outline: 2px solid var(--mk-primary);
  outline-offset: 2px;
  border-color: var(--mk-primary);
}

.dash-field-input:disabled,
.admin-users-field input:disabled,
.admin-users-field select:disabled,
.admin-users-field textarea:disabled {
  background: var(--mk-surface-2);
  color: var(--mk-text-secondary);
  cursor: not-allowed;
}

.dash-field.is-invalid .dash-field-input,
.admin-users-field input.is-invalid,
.admin-users-field select.is-invalid,
.admin-users-field textarea.is-invalid {
  border-color: var(--mk-danger);
}

.admin-users-scroll {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.admin-users-table {
  min-width: 860px;
}

.admin-users-email {
  display: block;
  max-width: 16rem;
  overflow-wrap: anywhere;
}

.admin-users-account {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.admin-users-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #ecfeff;
  color: var(--dash-cyan-600);
  font-size: 0.72rem;
  font-weight: 800;
}

.admin-users-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #f1f5f9;
  color: #334155;
}

.admin-role-admin {
  background: var(--mk-info-bg);
  color: var(--mk-info);
}

.admin-role-user {
  background: var(--mk-surface-2);
  color: var(--mk-text);
}

.admin-users-badge-neutral {
  background: var(--mk-surface-2);
  color: var(--mk-text-secondary);
}

.admin-users-expire {
  display: inline-block;
  margin-left: 0.25rem;
  color: var(--dash-muted);
  font-size: 0.75rem;
}

.admin-users-cards {
  display: none;
}

.admin-users-card {
  border: 1px solid var(--dash-border);
  border-radius: 0.9rem;
  padding: 0.85rem;
  background: #fff;
}

.admin-users-card-top,
.admin-users-card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.admin-users-card dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 0.75rem;
  margin: 0.75rem 0;
}

.admin-users-card dt {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--dash-muted);
}

.admin-users-card dd {
  margin: 0.1rem 0 0;
  overflow-wrap: anywhere;
}

.admin-users-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.admin-users-loading,
.admin-users-empty,
.admin-users-error,
.admin-users-empty-inline {
  padding: 1rem 0.2rem;
  color: var(--dash-muted);
}

.admin-users-empty,
.admin-users-error {
  text-align: center;
}

.admin-user-detail {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  justify-content: flex-end;
}

.admin-user-detail[hidden] {
  display: none !important;
}

.admin-user-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.admin-user-detail-panel {
  position: relative;
  width: min(720px, 100%);
  max-width: 100%;
  height: 100%;
  box-sizing: border-box;
  background: #fff;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-user-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--dash-border);
}

.admin-user-detail-head h2 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--dash-navy);
}

.admin-user-detail-close {
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--dash-border);
  border-radius: 0.55rem;
  background: #fff;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.admin-user-detail-body {
  overflow: auto;
  padding: 1rem;
  min-width: 0;
}

.admin-user-identity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.admin-user-email {
  margin: 0;
  font-weight: 800;
  color: var(--dash-navy);
  overflow-wrap: anywhere;
}

.admin-user-tabs {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  margin-bottom: 0.9rem;
}

.admin-user-tab {
  border: 1px solid var(--dash-border);
  background: #fff;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--dash-navy);
  cursor: pointer;
  white-space: nowrap;
}

.admin-user-tab.is-active {
  background: #ecfeff;
  border-color: #a5f3fc;
  color: #0e7490;
}

.admin-user-section h3 {
  margin: 0.8rem 0 0.45rem;
  font-size: 0.95rem;
  color: var(--dash-navy);
}

.admin-user-summary {
  margin: 0 0 0.6rem;
  color: var(--dash-muted);
  font-size: 0.85rem;
}

.admin-user-kv-list {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 0.5rem;
}

.admin-user-kv dt {
  font-size: 0.72rem;
  color: var(--dash-muted);
}

.admin-user-kv dd {
  margin: 0.1rem 0 0;
  overflow-wrap: anywhere;
}

.admin-user-id {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.75rem;
}

.admin-user-scroll {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

@media (min-width: 768px) {
  .admin-users-filters {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.8fr) minmax(0, 0.8fr);
  }
}

@media (max-width: 767px) {
  .admin-users-head {
    flex-direction: column;
  }

  .admin-users-scroll {
    display: none;
  }

  .admin-users-cards {
    display: grid;
    gap: 0.75rem;
  }

  .admin-user-detail-panel {
    width: 100%;
  }
}

.guide-lang-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.guide-lang-tab {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.guide-lang-tab.is-active {
  color: #0f172a;
  border-color: #0e7490;
  box-shadow: inset 0 -2px 0 #0e7490;
}

.guide-lang-tab:focus-visible {
  outline: 2px solid #0e7490;
  outline-offset: 2px;
}

button.guide-support-link {
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
}

.guide-card,
.guide-article,
.guide-article-excerpt,
.guide-card-excerpt {
  max-width: 100%;
  overflow-wrap: anywhere;
}

