n /* ==========================================================================
   NEXORA — static demo stylesheet (mirrors the Laravel app's design)
   ========================================================================== */
:root {
  --nx-accent: #6366f1;
  --nx-accent-dark: #4f46e5;
  --nx-accent-soft: #eef2ff;
  --nx-bg: #f1f5f9;
  --nx-surface: #ffffff;
  --nx-border: #e2e8f0;
  --nx-text: #1e293b;
  --nx-muted: #64748b;
  --nx-faint: #94a3b8;
  --nx-green: #22c55e;
  --nx-red: #ef4444;
  --nx-amber: #f59e0b;
  --nx-radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--nx-text);
  background:
    radial-gradient(1200px 400px at 80% -10%, rgba(99,102,241,.08), transparent 60%),
    radial-gradient(900px 300px at 5% 110%, rgba(56,189,248,.06), transparent 60%),
    var(--nx-bg);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.5;
}

h1, h2, h3 { letter-spacing: -0.02em; }

a { color: var(--nx-accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Layout shell ---- */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 32px 24px; }
footer {
  border-top: 1px solid var(--nx-border);
  background: #fff;
  padding: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--nx-faint);
}

/* ---- Navbar ---- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(226,232,240,.8);
}
.nav-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff; font-weight: 900; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(99,102,241,.35);
}
.brand-name { font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.brand-name b { color: var(--nx-accent); font-weight: 800; }

.nav-links { display: flex; gap: 4px; }
.nav-links a {
  padding: 8px 14px; border-radius: 10px;
  color: var(--nx-muted); font-weight: 500; font-size: 14px;
  transition: background .15s, color .15s;
}
.nav-links a:hover { background: #f1f5f9; color: var(--nx-text); text-decoration: none; }
.nav-links a.active { background: var(--nx-accent-soft); color: var(--nx-accent-dark); font-weight: 600; }
.nav-right { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.nav-user { color: var(--nx-faint); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: 12px; border: none; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 600;
  transition: all .15s; text-decoration: none !important;
}
.btn-primary {
  background: var(--nx-accent); color: #fff;
  box-shadow: 0 1px 3px rgba(99,102,241,.3);
}
.btn-primary:hover { background: var(--nx-accent-dark); box-shadow: 0 4px 12px rgba(99,102,241,.35); }
.btn-secondary { background: #fff; color: var(--nx-text); border: 1px solid #cbd5e1; }
.btn-secondary:hover { background: #f8fafc; }
.btn-danger { background: var(--nx-red); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-ghost { background: transparent; color: var(--nx-muted); }
.btn-ghost:hover { background: #f1f5f9; color: var(--nx-text); }
.btn-sm { padding: 5px 12px; font-size: 13px; border-radius: 9px; }
.btn-white { background: #fff; color: var(--nx-accent-dark); font-weight: 700; box-shadow: 0 6px 20px rgba(15,23,42,.25); }
.btn-white:hover { background: var(--nx-accent-soft); }
.btn-outline-light { background: rgba(255,255,255,.06); color: #fff; border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(4px); }
.btn-outline-light:hover { background: rgba(255,255,255,.12); }

/* ---- Cards ---- */
.card {
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(226,232,240,.85);
  border-radius: var(--nx-radius);
  padding: 24px;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.card-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--nx-faint); margin-bottom: 14px;
}

/* ---- Stat cards ---- */
.stats { display: grid; gap: 16px; margin-bottom: 28px; }
.stats-4 { grid-template-columns: repeat(4, 1fr); }
.stats-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 860px) { .stats-4, .stats-5 { grid-template-columns: repeat(2, 1fr); } }
.stat {
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(226,232,240,.85);
  border-radius: var(--nx-radius);
  padding: 20px; box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.stat-num { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.stat-label { margin-top: 3px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--nx-faint); }
.stat.accent .stat-num { color: var(--nx-accent); }
.stat.warn .stat-num { color: #f59e0b; }
.stat.danger .stat-num { color: var(--nx-red); }
.stat.ok .stat-num { color: var(--nx-green); }

/* ---- Badges ---- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 9999px;
  font-size: 11.5px; font-weight: 600; border: 1px solid transparent;
  white-space: nowrap;
}
.badge-blue    { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.badge-amber   { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.badge-purple  { background: #faf5ff; color: #7e22ce; border-color: #e9d5ff; }
.badge-green   { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.badge-gray    { background: #f8fafc; color: #475569; border-color: #e2e8f0; }
.badge-orange  { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.badge-red     { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.badge-indigo  { background: var(--nx-accent-soft); color: var(--nx-accent-dark); border-color: #c7d2fe; }

/* ---- Tables ---- */
.table-wrap {
  border: 1px solid var(--nx-border); border-radius: var(--nx-radius);
  background: #fff; overflow-x: auto; box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th {
  background: #f8fafc; text-align: left; padding: 11px 16px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--nx-faint);
  border-bottom: 1px solid var(--nx-border);
}
tbody td { padding: 12px 16px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #f8fafc; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--nx-accent); font-weight: 600; }
.sub { font-size: 12px; color: var(--nx-faint); margin-top: 2px; }

/* ---- Forms ---- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.input, select.input, textarea.input {
  width: 100%; padding: 9px 12px; border-radius: 10px;
  border: 1px solid #cbd5e1; font: inherit; font-size: 14px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--nx-accent); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
textarea.input { min-height: 120px; resize: vertical; }
.hint { font-size: 12px; color: var(--nx-faint); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

/* ---- Filter bar ---- */
.filters {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: 10px;
  margin-bottom: 20px;
}
@media (max-width: 860px) { .filters { grid-template-columns: 1fr 1fr; } }
.filters .input { padding: 8px 12px; font-size: 13px; }

/* ---- Page headers ---- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; font-weight: 800; }
.page-head p { color: var(--nx-muted); font-size: 14px; margin-top: 3px; }
.back-link { font-size: 13.5px; font-weight: 600; display: inline-block; margin-bottom: 10px; }

/* ---- Kanban board ---- */
.kanban { display: grid; grid-template-columns: repeat(5, minmax(228px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 10px; }
@media (max-width: 900px) { .kanban { grid-template-columns: repeat(5, 262px); } }
.kanban-col {
  background: rgba(255,255,255,.6);
  border: 1px solid rgba(203,213,225,.75);
  border-radius: 16px; padding: 10px; min-height: 340px;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.kanban-col.drag-over {
  background: var(--nx-accent-soft);
  border-color: var(--nx-accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
.kanban-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; }
.kanban-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot-blue { background: #3b82f6; } .dot-amber { background: #f59e0b; }
.dot-purple { background: #a855f7; } .dot-green { background: #22c55e; }
.dot-gray { background: #94a3b8; }
.kanban-title { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #334155; }
.kanban-count {
  margin-left: auto; font-size: 11px; font-weight: 700; color: #64748b;
  background: #e2e8f0; border-radius: 9999px; padding: 1px 8px;
}
.kanban-cards { display: flex; flex-direction: column; gap: 8px; }
.kanban-card {
  background: #fff; border: 1px solid var(--nx-border); border-radius: 12px;
  padding: 11px 13px; cursor: grab;
  box-shadow: 0 1px 2px rgba(15,23,42,.05);
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.kanban-card:hover { border-color: #c7d2fe; box-shadow: 0 4px 12px rgba(79,70,229,.1); transform: translateY(-1px); }
.kanban-card.dragging { opacity: .45; transform: rotate(1.5deg) scale(.98); }
.kanban-card:active { cursor: grabbing; }
.kanban-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.kanban-ref { font-family: ui-monospace, Menlo, monospace; font-size: 10.5px; color: var(--nx-accent); font-weight: 700; }
.kanban-subject { font-size: 13px; font-weight: 600; color: var(--nx-text); line-height: 1.35; display: block; }
.kanban-subject:hover { color: var(--nx-accent-dark); text-decoration: none; }
.kanban-meta { font-size: 11px; color: var(--nx-faint); margin-top: 5px; display: flex; gap: 4px; flex-wrap: wrap; }
.kanban-empty {
  border: 1.5px dashed #cbd5e1; border-radius: 12px;
  padding: 20px 10px; text-align: center; font-size: 11.5px; color: var(--nx-faint);
}

/* ---- Toast ---- */
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #1e293b; color: #f8fafc; font-size: 13.5px; font-weight: 500;
  padding: 10px 20px; border-radius: 9999px;
  box-shadow: 0 8px 24px rgba(15,23,42,.28);
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 90;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: #7f1d1d; }

/* ---- Conversation thread ---- */
.thread { display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 14px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  background: var(--nx-accent-soft); color: var(--nx-accent-dark);
}
.avatar.agent { background: var(--nx-accent); color: #fff; }
.msg-body { flex: 1; }
.msg-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.msg-author { font-size: 13.5px; font-weight: 700; }
.msg-time { font-size: 11.5px; color: var(--nx-faint); margin-left: auto; }
.msg-text { margin-top: 7px; font-size: 14px; color: #334155; white-space: pre-wrap; line-height: 1.55; }
.msg.agent-msg {
  background: rgba(238,242,255,.55);
  border: 1px solid #c7d2fe;
  border-radius: var(--nx-radius); padding: 16px;
}
.msg.internal-msg {
  background: rgba(255,251,235,.7);
  border: 1px solid #fde68a;
  border-radius: var(--nx-radius); padding: 16px;
}
.tag {
  padding: 2px 7px; border-radius: 6px;
  font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.tag-customer { background: #f1f5f9; color: #64748b; }
.tag-support { background: var(--nx-accent-soft); color: var(--nx-accent-dark); }
.tag-internal { background: #fef3c7; color: #92400e; }
.attach-chip {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--nx-border); background: #fff;
  padding: 4px 10px; border-radius: 9px; font-size: 12px; margin: 8px 6px 0 0;
  transition: border-color .15s, background .15s;
}
.attach-chip:hover { border-color: var(--nx-accent); background: var(--nx-accent-soft); text-decoration: none; }

/* ---- Activity timeline ---- */
.timeline { display: flex; flex-direction: column; gap: 13px; }
.timeline-item { font-size: 12.5px; }
.timeline-summary { font-weight: 600; color: #475569; }
.timeline-summary.internal { color: #92400e; }
.timeline-meta { font-size: 11px; color: var(--nx-faint); margin-top: 1px; }

/* ---- Home hero ---- */
.hero {
  background:
    radial-gradient(600px 220px at 15% 0%, rgba(99,102,241,.2), transparent 65%),
    radial-gradient(500px 220px at 90% 20%, rgba(56,189,248,.14), transparent 60%),
    linear-gradient(160deg, #0f172a 0%, #1e1b4b 55%, #312e81 100%);
  color: #fff; text-align: center;
  padding: 88px 24px 96px;
  margin: -32px -24px 56px;
  border-radius: 0 0 40px 40px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(129,140,248,.35); background: rgba(99,102,241,.12);
  padding: 6px 15px; border-radius: 9999px; font-size: 12.5px; font-weight: 500;
  color: #c7d2fe; margin-bottom: 26px;
}
.pulse { width: 7px; height: 7px; border-radius: 50%; background: #34d399; animation: pulse 1.8s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.hero h1 { font-size: clamp(38px, 6vw, 62px); font-weight: 800; line-height: 1.06; }
.hero .grad {
  background: linear-gradient(90deg, #a5b4fc, #7dd3fc, #6ee7b7);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { margin: 24px auto 0; max-width: 560px; color: rgba(203,213,225,.9); font-size: 16.5px; }
.hero-actions { margin-top: 36px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 56px; }
@media (max-width: 960px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .features { grid-template-columns: 1fr; } }
.feature {
  background: rgba(255,255,255,.92); border: 1px solid rgba(226,232,240,.85);
  border-radius: var(--nx-radius); padding: 24px;
  transition: transform .15s, box-shadow .15s;
}
.feature:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(79,70,229,.08); }
.feature-icon {
  width: 44px; height: 44px; border-radius: 12px; background: var(--nx-accent-soft);
  display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 13px;
}
.feature h3 { font-size: 14.5px; font-weight: 700; margin-bottom: 6px; }
.feature p { font-size: 13px; color: var(--nx-muted); line-height: 1.55; }

.strip {
  background: rgba(255,255,255,.92); border: 1px solid rgba(226,232,240,.85);
  border-radius: var(--nx-radius); overflow: hidden; margin-bottom: 56px;
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.strip div { padding: 28px 16px; text-align: center; border-left: 1px solid #f1f5f9; }
.strip div:first-child { border-left: none; }
.strip b { font-size: 24px; font-weight: 800; color: var(--nx-accent); display: block; }
.strip span { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--nx-faint); }
@media (max-width: 640px) { .strip { grid-template-columns: 1fr 1fr; } }

.stack-pills { text-align: center; margin-bottom: 40px; }
.stack-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: var(--nx-faint); }
.stack { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.pill {
  border: 1px solid var(--nx-border); background: #fff;
  padding: 5px 14px; border-radius: 9999px; font-size: 12.5px; font-weight: 500; color: var(--nx-muted);
}

/* ---- Auth pages ---- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-logo { text-align: center; margin-bottom: 26px; }
.demo-box {
  margin-top: 18px; border: 1px dashed #c7d2fe; background: var(--nx-accent-soft);
  border-radius: 12px; padding: 13px 15px; font-size: 12.5px; color: #4338ca;
}
.demo-box b { display: block; margin-bottom: 4px; }

/* ---- Detail layout ---- */
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 960px) { .detail-grid { grid-template-columns: 1fr; } }

/* ---- Admin panel bits ---- */
.admin-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 22px; align-items: start; }
@media (max-width: 960px) { .admin-grid { grid-template-columns: 1fr; } }
.cat-row { display: grid; grid-template-columns: 2fr 2fr 70px auto auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid #f1f5f9; }
.cat-row:last-child { border-bottom: none; }
@media (max-width: 700px) { .cat-row { grid-template-columns: 1fr 1fr; } }
.toggle { position: relative; width: 40px; height: 22px; background: #cbd5e1; border-radius: 9999px; cursor: pointer; transition: background .2s; flex: none; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.toggle.on { background: var(--nx-green); }
.toggle.on::after { left: 21px; }

/* ---- Modal ---- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15,23,42,.5); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; z-index: 80; padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: #fff; border-radius: 20px; width: 100%; max-width: 560px;
  padding: 26px; box-shadow: 0 24px 60px rgba(15,23,42,.3);
  animation: modalIn .18s ease-out;
}
@keyframes modalIn { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal-head h3 { font-size: 17px; font-weight: 800; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--nx-faint); padding: 4px 8px; border-radius: 8px; }
.modal-close:hover { background: #f1f5f9; color: var(--nx-text); }

/* ---- Empty state ---- */
.empty {
  border: 1.5px dashed #cbd5e1; background: rgba(255,255,255,.7);
  border-radius: var(--nx-radius); padding: 44px 20px; text-align: center;
}
.empty-icon { font-size: 26px; margin-bottom: 10px; opacity: .5; }
.empty h3 { font-size: 14px; font-weight: 700; color: #475569; }
.empty p { font-size: 12.5px; color: var(--nx-faint); margin-top: 4px; }

/* ---- Misc ---- */
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.muted { color: var(--nx-muted); font-size: 13px; }
.faint { color: var(--nx-faint); font-size: 12px; }
.right { text-align: right; }
.note { border: 1px solid var(--nx-border); background: #fffbeb; border-radius: 12px; padding: 12px 16px; font-size: 13px; color: #92400e; margin-bottom: 20px; }
