/* ============================================================
   AI Namecard — Customer workspace theme
   Desktop sidebar · mobile bottom tabs + drawer
   ============================================================ */

body.nc-customer {
  --c-primary: #4f46e5;
  --c-primary-2: #7c3aed;
  background: #f6f7fb;
  padding-bottom: 0;
}
body.nc-customer .brand-mark {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  box-shadow: 0 8px 20px -6px rgba(99, 102, 241, .7);
}
body.nc-customer .side-link.active {
  background: linear-gradient(90deg, rgba(79, 70, 229, .95), rgba(124, 58, 237, .62));
  box-shadow: 0 10px 24px -12px rgba(79, 70, 229, .95);
}
body.nc-customer .btn-primary {
  --bs-btn-bg: #4f46e5;
  --bs-btn-border-color: #4f46e5;
  --bs-btn-hover-bg: #4338ca;
  --bs-btn-hover-border-color: #4338ca;
  --bs-btn-active-bg: #3730a3;
  --bs-btn-active-border-color: #3730a3;
}
body.nc-customer .form-control:focus,
body.nc-customer .form-select:focus {
  border-color: #a5b4fc;
  box-shadow: 0 0 0 .25rem rgba(79, 70, 229, .12);
}
body.nc-customer a:not(.side-link):not(.sidebar-brand):not(.btn):not(.admin-chip):not(.c-hero-url) { color: #4f46e5; }
body.nc-customer .app-sidebar .sidebar-brand { color: #fff; }
body.nc-customer .app-sidebar .side-link { color: var(--nc-sidebar-ink); }
body.nc-customer .app-sidebar .side-link:hover,
body.nc-customer .app-sidebar .side-link.active { color: #fff; }
body.nc-customer .btn-outline-primary {
  --bs-btn-color: #4f46e5;
  --bs-btn-border-color: #c7d2fe;
  --bs-btn-hover-bg: #4f46e5;
  --bs-btn-hover-border-color: #4f46e5;
  --bs-btn-active-bg: #4338ca;
  --bs-btn-active-border-color: #4338ca;
}
body.nc-customer .text-primary { color: #4f46e5 !important; }
body.nc-customer .bg-primary-subtle { background-color: #eef2ff !important; }

/* ---------- Hero ---------- */
.c-hero {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 26px 28px;
  color: #fff;
  background:
    radial-gradient(90% 140% at 100% 0%, rgba(139, 92, 246, .55) 0%, transparent 55%),
    radial-gradient(80% 120% at 0% 100%, rgba(59, 130, 246, .35) 0%, transparent 55%),
    linear-gradient(120deg, #0b1220, #171c3a 50%, #312e81);
  box-shadow: 0 24px 60px -28px rgba(30, 27, 75, .65);
}
.c-hero-grid {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.c-hero-brand { display: flex; align-items: center; gap: 16px; min-width: 0; }
.c-hero-logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  flex: none;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  object-fit: cover;
  text-transform: uppercase;
}
.c-hero h2 { font-size: 23px; font-weight: 750; margin: 0 0 6px; letter-spacing: -.01em; }
.c-hero-sub { color: #c7d2fe; font-size: 13.5px; margin: 0; }
.c-hero-url {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  color: #e0e7ff;
  font-size: 12px;
  text-decoration: none;
  max-width: 100%;
}
.c-hero-url span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-hero-url:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.c-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.c-hero-actions .btn { --bs-btn-color: #fff; --bs-btn-border-color: rgba(255, 255, 255, .3); --bs-btn-hover-bg: rgba(255, 255, 255, .16); --bs-btn-hover-border-color: rgba(255, 255, 255, .5); --bs-btn-hover-color: #fff; padding: .4rem .8rem; font-size: 13px; }
.c-ring {
  --val: 0;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  background: conic-gradient(#a5b4fc calc(var(--val) * 1%), rgba(255, 255, 255, .16) 0);
}
.c-ring-in {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  background: #111a33;
}
.c-ring-in strong { display: block; font-size: 24px; line-height: 1; }
.c-ring-in small { color: #a5b4fc; font-size: 11px; letter-spacing: .04em; }

/* ---------- Customer cards ---------- */
.c-card { border: 1px solid var(--nc-line); border-radius: 18px; background: #fff; box-shadow: var(--nc-shadow); }
.c-cycle-toggle { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: #eef2ff; }
.c-cycle-toggle button { border: 0; background: transparent; color: #475569; font-size: 13px; font-weight: 600; padding: .4rem .9rem; border-radius: 9px; }
.c-cycle-toggle button.active { background: #fff; color: #4f46e5; box-shadow: 0 2px 8px -2px rgba(15, 23, 42, .18); }
.c-price { font-size: 30px; font-weight: 780; letter-spacing: -.02em; color: #312e81; }
.c-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--nc-line); font-weight: 650; font-size: 14.5px; }
.c-card-body { padding: 20px; }
.c-muted { color: var(--nc-muted); }

.c-progress { height: 8px; border-radius: 999px; background: #eef2ff; overflow: hidden; }
.c-progress > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #6366f1, #a855f7); }

.c-check-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.c-check-list li { display: flex; align-items: center; gap: 9px; font-size: 13px; color: #475569; }
.c-check-list .dot { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; flex: none; background: #f1f5f9; color: #94a3b8; }
.c-check-list .dot svg { width: 12px; height: 12px; }
.c-check-list li.ok .dot { background: #dcfce7; color: #15803d; }

.c-trend { display: flex; align-items: flex-end; gap: 7px; height: 108px; }
.c-trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.c-trend-bar { width: 100%; height: 86px; display: flex; align-items: flex-end; background: #f1f5f9; border-radius: 8px; overflow: hidden; }
.c-trend-bar i { display: block; width: 100%; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, #818cf8, #4f46e5); }
.c-trend-col span { font-size: 10.5px; color: var(--nc-muted); }

.c-list { display: flex; flex-direction: column; }
.c-list-item { display: flex; gap: 12px; align-items: flex-start; padding: 13px 0; border-bottom: 1px solid #f1f5f9; min-width: 0; }
.c-list-item:last-child { border-bottom: 0; }
.c-list-item .thumb { width: 46px; height: 46px; border-radius: 11px; object-fit: cover; flex: none; background: #f1f5f9; }
.c-list-title { font-weight: 600; font-size: 13.5px; color: var(--nc-ink); margin: 0 0 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-list-meta { color: var(--nc-muted); font-size: 12px; margin: 0; }

.c-action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.c-action {
  display: flex; align-items: center; gap: 10px; padding: 13px; border: 1px solid var(--nc-line);
  border-radius: 14px; background: #fff; color: inherit; text-decoration: none; transition: .18s ease;
}
.c-action:hover { border-color: #c7d2fe; background: #f8faff; transform: translateY(-1px); color: inherit; }
.c-action .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: #eef2ff; color: #4f46e5; }
.c-action .ico svg { width: 18px; height: 18px; }
.c-action b { display: block; font-size: 13px; }
.c-action small { color: var(--nc-muted); font-size: 11.5px; }

.c-empty { text-align: center; padding: 42px 18px; color: var(--nc-muted); }
.c-empty svg { width: 44px; height: 44px; opacity: .35; margin-bottom: 10px; }
.c-empty p { margin: 0 0 12px; font-size: 13.5px; }

/* ---------- Mini card preview ---------- */
.c-mini-card { border: 1px solid var(--nc-line); border-radius: 18px; overflow: hidden; background: #fff; }
.c-mini-head {
  padding: 20px;
  color: #fff;
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(139, 92, 246, .55), transparent 60%),
    linear-gradient(120deg, #111827, #312e81);
}
.c-mini-head .logo { width: 48px; height: 48px; border-radius: 14px; object-fit: cover; background: rgba(255, 255, 255, .18); display: grid; place-items: center; font-weight: 800; }
.c-mini-head h3 { font-size: 17px; margin: 12px 0 2px; font-weight: 750; }
.c-mini-head p { margin: 0; color: #c7d2fe; font-size: 12.5px; }
.c-mini-body { padding: 16px 20px; }
.c-mini-row { display: flex; gap: 8px; font-size: 12.5px; color: #475569; padding: 5px 0; }
.c-mini-row svg { width: 15px; height: 15px; flex: none; color: #818cf8; margin-top: 2px; }

/* ---------- SEO checks ---------- */
.c-score-hero {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  padding: 22px;
  border-radius: 18px;
  background: linear-gradient(120deg, #eef2ff, #f5f3ff);
  border: 1px solid #e0e7ff;
}
.c-score-ring {
  --val: 0;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  background: conic-gradient(#4f46e5 calc(var(--val) * 1%), #e0e7ff 0);
}
.c-score-ring-in { width: 90px; height: 90px; border-radius: 50%; background: #fff; display: grid; place-items: center; text-align: center; }
.c-score-ring-in strong { display: block; font-size: 27px; line-height: 1; color: #312e81; }
.c-score-ring-in small { font-size: 11px; color: var(--nc-muted); }

.c-engine { padding: 12px 0; border-bottom: 1px solid #f1f5f9; }
.c-engine:last-child { border-bottom: 0; }
.c-engine-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; font-weight: 600; }
.c-engine-hits { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.c-hit { font-size: 11.5px; padding: 2px 7px; border-radius: 999px; }
.c-hit.ok { background: #dcfce7; color: #15803d; }
.c-hit.no { background: #fee2e2; color: #b91c1c; }

/* ---------- Chat ---------- */
.c-chat { display: flex; flex-direction: column; height: calc(100vh - 230px); min-height: 440px; }
.c-chat-log { flex: 1; overflow-y: auto; padding: 20px; background: #f8fafc; display: flex; flex-direction: column; gap: 10px; }
.c-msg { max-width: 78%; padding: 11px 14px; border-radius: 16px; font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.c-msg.bot { background: #fff; border: 1px solid var(--nc-line); border-bottom-left-radius: 5px; align-self: flex-start; }
.c-msg.me { background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; border-bottom-right-radius: 5px; align-self: flex-end; }
.c-chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--nc-line); background: #fff; }
.c-chat-form textarea { flex: 1; resize: none; border: 1px solid #dbe2ee; border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 13.5px; }
.c-chat-form textarea:focus { outline: 0; border-color: #a5b4fc; box-shadow: 0 0 0 .2rem rgba(79, 70, 229, .1); }

/* ---------- Auth ---------- */
body.nc-auth { background: #f6f7fb; font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif; color: var(--nc-ink); }
.c-auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.c-auth-aside {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 54px 56px;
  color: #fff;
  background:
    radial-gradient(80% 100% at 100% 0%, rgba(139, 92, 246, .55), transparent 55%),
    radial-gradient(70% 90% at 0% 100%, rgba(37, 99, 235, .4), transparent 55%),
    linear-gradient(140deg, #0b1220, #1e1b4b 60%, #4f46e5);
}
.c-auth-brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.c-auth-brand .brand-mark { width: 44px; height: 44px; border-radius: 13px; }
.c-auth-brand strong { display: block; font-size: 15px; line-height: 1.2; }
.c-auth-brand small { color: #c7d2fe; font-size: 11px; letter-spacing: .14em; }
.c-auth-copy h1 { font-size: 34px; line-height: 1.2; font-weight: 780; letter-spacing: -.02em; margin: 0 0 14px; max-width: 15em; }
.c-auth-copy p { color: #c7d2fe; margin: 0 0 22px; max-width: 30em; line-height: 1.7; }
.c-auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.c-auth-points li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: #e0e7ff; }
.c-auth-points .dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .14); flex: none; }
.c-auth-points svg { width: 12px; height: 12px; }
.c-auth-foot { color: #a5b4fc; font-size: 12px; }
.c-auth-panel { display: grid; place-items: center; padding: 40px 24px; }
.c-auth-card { width: 100%; max-width: 430px; }
.c-auth-card .auth-brand { margin-bottom: 20px; }
.c-auth-title { font-size: 24px; font-weight: 750; margin: 0 0 6px; letter-spacing: -.01em; }
.c-auth-sub { color: var(--nc-muted); font-size: 13.5px; margin: 0 0 22px; }
.c-auth-switch { text-align: center; font-size: 13px; color: var(--nc-muted); margin-top: 18px; }
.c-auth-switch a { font-weight: 600; text-decoration: none; }
.c-auth-back { display: inline-block; margin-top: 14px; font-size: 12.5px; color: var(--nc-muted); text-decoration: none; }

/* ---------- Bottom nav (mobile) ---------- */
.c-bottom-nav { display: none; }
.c-mobile-brand { display: none; align-items: center; gap: 8px; text-decoration: none; color: inherit; min-width: 0; }
.c-mobile-brand .brand-mark { width: 32px; height: 32px; border-radius: 9px; font-size: 12px; }
.c-mobile-brand span { font-weight: 700; font-size: 14px; }

@media (max-width: 991.98px) {
  body.nc-customer .app-content { padding-bottom: 104px; }
  .c-crumb { display: none !important; }
  .c-mobile-brand { display: flex; }
  .c-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1035;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-top: 1px solid var(--nc-line);
  }
  .c-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 5px 2px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #64748b;
    text-decoration: none;
    font-size: 10.5px;
    line-height: 1.1;
  }
  .c-tab svg { width: 20px; height: 20px; }
  .c-tab.active { color: var(--c-primary); background: #eef2ff; }
  .c-action-grid { grid-template-columns: 1fr; }
  .c-chat { height: calc(100dvh - 260px); }
}

@media (max-width: 575.98px) {
  .c-hero { padding: 20px; border-radius: 18px; }
  .c-hero h2 { font-size: 20px; }
  .c-ring { width: 96px; height: 96px; }
  .c-ring-in { width: 74px; height: 74px; }
  .c-ring-in strong { font-size: 20px; }
  .c-score-hero { padding: 16px; gap: 14px; }
  .c-score-ring { width: 96px; height: 96px; }
  .c-score-ring-in { width: 74px; height: 74px; }
  .c-auth-wrap { grid-template-columns: 1fr; }
  .c-auth-aside { display: none; }
  .c-auth-panel { padding: 32px 20px; align-items: start; }
}

@media (min-width: 992px) {
  .c-auth-card .auth-brand { display: none; }
}
