/* Kydesk Helpdesk - Custom theme on top of Tailwind (Coursue inspired) */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&family=Geist+Mono:wght@400;500&display=swap');

:root {
    --bg: #f3f4f6;
    --surface: #ffffff;
    --border: #ececef;
    --ink-900: #16151b;
    --ink-700: #2a2a33;
    --ink-500: #6b6b78;
    --ink-400: #8e8e9a;
    --ink-300: #b8b8c4;
    --brand-50: #f3f0ff;
    --brand-100: #e7e0ff;
    --brand-200: #cdbfff;
    --brand-300: #a78bfa;
    --brand-400: #8b6dff;
    --brand-500: #7c5cff;
    --brand-600: #6c47ff;
    --brand-700: #5a3aff;
    --shadow-purple: 0 16px 40px -10px rgba(124,92,255,.45);
}

* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html, body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--ink-900); }
.font-display { font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: -0.024em; }
.font-mono { font-family: 'Geist Mono', monospace; }
h1, h2, h3, h4 { font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: -0.024em; }
[x-cloak] { display: none !important; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(22,21,27,.08); border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(22,21,27,.18); border: 2px solid transparent; background-clip: content-box; }

/* APP SHELL */
.app-shell { padding: 16px; min-height: 100vh; background: var(--bg); }
.app-frame { background: white; border-radius: 28px; overflow: clip; box-shadow: 0 1px 3px rgba(22,21,27,.05), 0 1px 2px rgba(22,21,27,.03); display: flex; min-height: calc(100vh - 32px); align-items: stretch; }

/* SIDEBAR */
.sidebar { width: 232px; flex-shrink: 0; padding: 28px 18px 20px; display: flex; flex-direction: column; gap: 22px; background: white; position: sticky; top: 16px; align-self: flex-start; max-height: calc(100vh - 32px); overflow-y: auto; }
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: var(--bg); }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.brand-logo { width: 32px; height: 32px; border-radius: 10px; background: var(--brand-500); color: white; display: grid; place-items: center; font-weight: 700; box-shadow: 0 4px 12px -2px rgba(124,92,255,.4); }
.brand-name { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 18px; }
.nav-section { display: flex; flex-direction: column; gap: 2px; }
.nav-heading { font-size: 10.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-400); padding: 0 12px; margin-bottom: 8px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; font-size: 14px; font-weight: 500; color: var(--ink-500); transition: all .15s; position: relative; cursor: pointer; }
.nav-item:hover { color: var(--ink-900); background: var(--bg); }
.nav-item.active { background: var(--brand-50); color: var(--brand-700); font-weight: 600; }
.nav-item.active::before { content: ''; position: absolute; left: -18px; top: 50%; transform: translateY(-50%); width: 3px; height: 22px; background: var(--brand-500); border-radius: 3px; }
.nav-item i { width: 18px; height: 18px; flex-shrink: 0; font-size: 17px; }
.nav-item .badge-mini { margin-left: auto; font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--brand-500); color: white; }
.nav-friend { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; }
.nav-friend:hover { background: var(--bg); }

/* MAIN */
.main { flex: 1; background: var(--bg); padding: 22px 24px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }

/* TOPBAR */
.topbar { display: flex; align-items: center; gap: 14px; }
.search-pill { flex: 1; max-width: 480px; position: relative; }
.search-pill input { width: 100%; height: 44px; border-radius: 999px; background: white; border: 1px solid var(--border); padding: 0 18px 0 44px; font-size: 13.5px; outline: none; transition: all .15s; }
.search-pill input:focus { border-color: var(--brand-300); box-shadow: 0 0 0 4px var(--brand-50); }
.search-pill input::placeholder { color: var(--ink-400); }
.search-pill > i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-400); font-size: 18px; pointer-events: none; }
.icon-btn { width: 44px; height: 44px; border-radius: 999px; background: white; border: 1px solid var(--border); display: grid; place-items: center; color: var(--ink-700); transition: all .15s; position: relative; flex-shrink: 0; }
.icon-btn:hover { border-color: var(--ink-300); color: var(--ink-900); }
.icon-btn .dot-notif { position: absolute; top: 11px; right: 11px; width: 8px; height: 8px; border-radius: 999px; background: var(--brand-500); border: 2px solid white; }
.user-pill { display: flex; align-items: center; gap: 10px; padding: 5px 14px 5px 5px; background: white; border-radius: 999px; border: 1px solid var(--border); transition: all .15s; }
.user-pill:hover { border-color: var(--ink-300); }

/* HERO CARD */
.hero-card { position: relative; background: linear-gradient(135deg, #6c47ff 0%, #8b5cf6 50%, #a78bfa 100%); color: white; border-radius: 22px; padding: 36px 40px; overflow: hidden; box-shadow: var(--shadow-purple); }
.hero-card::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(circle at 90% 30%, rgba(255,255,255,.18) 0, transparent 50%), radial-gradient(circle at 10% 80%, rgba(255,255,255,.12) 0, transparent 50%); pointer-events: none; }
.hero-stars { position: absolute; top: 50%; right: 8%; transform: translateY(-50%); pointer-events: none; opacity: .35; }
.hero-stars svg { width: 280px; }
.hero-tag { font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; opacity: .85; position: relative; }
.hero-title { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 32px; line-height: 1.15; letter-spacing: -0.025em; margin-top: 10px; max-width: 480px; position: relative; }
.hero-cta { display: inline-flex; align-items: center; gap: 10px; margin-top: 24px; padding: 6px 8px 6px 22px; background: var(--ink-900); color: white; border-radius: 999px; font-weight: 600; font-size: 13.5px; transition: transform .2s; position: relative; }
.hero-cta:hover { transform: translateY(-1px); }
.hero-cta-arrow { width: 28px; height: 28px; border-radius: 999px; background: white; color: var(--ink-900); display: grid; place-items: center; }

/* STAT MINI */
.stat-mini { background: white; border-radius: 18px; padding: 14px 18px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); transition: all .15s; }
.stat-mini:hover { box-shadow: 0 4px 12px -4px rgba(22,21,27,.08); }
.stat-mini-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.stat-mini-meta { font-size: 11px; color: var(--ink-400); font-weight: 500; }
.stat-mini-title { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 16px; letter-spacing: -0.015em; margin-top: 2px; }
.stat-mini-action { margin-left: auto; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--ink-400); cursor: pointer; }
.stat-mini-action:hover { background: var(--bg); color: var(--ink-700); }

/* CARDS */
.card { background: white; border-radius: 22px; border: 1px solid var(--border); }
.card-pad { padding: 24px 26px; }

.section-title { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.section-link { font-size: 12.5px; font-weight: 500; color: var(--brand-600); }
.section-link:hover { color: var(--brand-700); }

/* MEDIA CARD */
.media-card { background: white; border-radius: 20px; overflow: hidden; border: 1px solid var(--border); transition: all .2s; }
.media-card:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -8px rgba(22,21,27,.1); }
.media-card-image { height: 132px; background: linear-gradient(135deg, var(--brand-100), var(--brand-200)); display: grid; place-items: center; color: var(--brand-700); position: relative; }
.media-card-tag { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.9); backdrop-filter: blur(8px); border-radius: 999px; padding: 4px 10px; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 4px; }
.media-card-fav { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 999px; background: white; display: grid; place-items: center; color: var(--ink-400); }
.media-card-body { padding: 16px 18px 18px; }
.media-card-title { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 14.5px; letter-spacing: -0.015em; line-height: 1.3; }
.media-card-progress { height: 4px; border-radius: 999px; background: var(--bg); margin: 12px 0; overflow: hidden; }
.media-card-progress-bar { height: 100%; border-radius: inherit; background: var(--brand-500); }
.media-card-foot { padding: 12px 0 0; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }

/* DONUT STAT */
.donut-stat { position: relative; width: 168px; height: 168px; margin: 0 auto; }
.donut-stat-inner { position: absolute; inset: 14px; border-radius: 50%; background: var(--brand-100); display: grid; place-items: center; overflow: hidden; }
.donut-stat-badge { position: absolute; top: 14px; right: 4px; background: var(--brand-500); color: white; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; border: 3px solid white; }

/* BAR CHART */
.bar-chart { display: flex; align-items: flex-end; gap: 22px; height: 140px; padding: 0 6px; margin-top: 14px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.bar { flex: 1; border-radius: 8px 8px 0 0; background: var(--brand-500); transition: opacity .15s; }
.bar:hover { opacity: .85; }
.bar-soft { background: var(--brand-200); }
.bar-labels { display: flex; gap: 22px; padding: 8px 6px 0; font-size: 11px; color: var(--ink-400); }
.bar-labels span { flex: 1; text-align: center; }

/* MENTOR */
.mentor-row { display: flex; align-items: center; gap: 12px; padding: 8px 4px; }
.mentor-row-name { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 13.5px; }
.mentor-row-role { font-size: 11px; color: var(--ink-400); }
.btn-follow { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 999px; background: var(--brand-50); color: var(--brand-700); font-size: 11.5px; font-weight: 600; border: 1px solid var(--brand-100); transition: background .15s; cursor: pointer; }
.btn-follow:hover { background: var(--brand-100); }
.see-all { display: block; width: 100%; text-align: center; padding: 11px 14px; border-radius: 999px; background: var(--brand-50); color: var(--brand-700); font-weight: 600; font-size: 13px; border: 1px solid var(--brand-100); transition: background .15s; }
.see-all:hover { background: var(--brand-100); }

/* AVATAR */
.avatar { border-radius: 999px; background: var(--bg); display: inline-grid; place-items: center; font-weight: 600; flex-shrink: 0; overflow: hidden; color: var(--ink-700); }
.avatar-xs { width: 24px; height: 24px; font-size: 10px; }
.avatar-sm { width: 32px; height: 32px; font-size: 11.5px; }
.avatar-md { width: 40px; height: 40px; font-size: 13px; }
.avatar-lg { width: 52px; height: 52px; font-size: 16px; }
.avatar-xl { width: 84px; height: 84px; font-size: 24px; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; height: 40px; border-radius: 999px; font-weight: 600; font-size: 13.5px; transition: all .15s; white-space: nowrap; border: none; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--brand-500); color: white; box-shadow: 0 4px 12px -2px rgba(124,92,255,.35); }
.btn-primary:hover { background: var(--brand-600); transform: translateY(-1px); }
.btn-dark { background: var(--ink-900); color: white; }
.btn-dark:hover { background: #000; transform: translateY(-1px); }
.btn-soft { background: var(--brand-50); color: var(--brand-700); border: 1px solid var(--brand-100); }
.btn-soft:hover { background: var(--brand-100); }
.btn-outline { background: white; color: var(--ink-700); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--ink-300); color: var(--ink-900); }
.btn-ghost { background: transparent; color: var(--ink-700); }
.btn-ghost:hover { background: var(--bg); color: var(--ink-900); }
.btn-danger { background: #ef4444; color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 12.5px; }
.btn-xs { height: 28px; padding: 0 11px; font-size: 11.5px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 14.5px; }
.btn-icon { padding: 0; width: 40px; }
.btn-icon-sm { padding: 0; width: 34px; height: 34px; }

/* INPUTS */
.input { display: block; width: 100%; height: 44px; border-radius: 14px; background: white; border: 1px solid var(--border); padding: 0 16px; font-size: 13.5px; color: var(--ink-900); outline: none; transition: all .15s; font-family: inherit; }
.input::placeholder { color: var(--ink-400); }
.input:focus { border-color: var(--brand-300); box-shadow: 0 0 0 4px var(--brand-50); }
.input:disabled { background: var(--bg); color: var(--ink-400); cursor: not-allowed; }
textarea.input { padding: 12px 16px; height: auto; min-height: 100px; line-height: 1.55; resize: vertical; }
select.input { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e8e9a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; padding-right: 40px; }
.label { font-size: 12.5px; font-weight: 600; color: var(--ink-700); display: block; margin-bottom: 8px; }

/* BADGES */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
.badge-purple { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-100); }
.badge-pink { background: #fce7f3; color: #be185d; border-color: #fbcfe8; }
.badge-amber { background: #fef3c7; color: #b45309; border-color: #fde68a; }
.badge-emerald { background: #d1fae5; color: #047857; border-color: #a7f3d0; }
.badge-rose { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.badge-blue { background: #dbeafe; color: #1d4ed8; border-color: #bfdbfe; }
.badge-gray { background: var(--bg); color: var(--ink-500); border-color: var(--border); }

.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.status-pill::before { content: ''; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.status-open { background: #dbeafe; color: #1d4ed8; }
.status-progress { background: #fef3c7; color: #b45309; }
.status-hold { background: var(--bg); color: var(--ink-500); }
.status-resolved { background: #d1fae5; color: #047857; }
.status-closed { background: var(--bg); color: var(--ink-500); }
.priority-low { background: var(--bg); color: var(--ink-500); }
.priority-medium { background: #dbeafe; color: #1d4ed8; }
.priority-high { background: #fef3c7; color: #b45309; }
.priority-urgent { background: #fee2e2; color: #b91c1c; }

/* TABLE */
.table { width: 100%; font-size: 13px; border-collapse: collapse; }
.table thead th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-400); padding: 14px 18px; border-bottom: 1px solid var(--border); }
.table tbody td { padding: 16px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--bg); }
.table-action { width: 32px; height: 32px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--brand-50); color: var(--brand-700); border: 1px solid var(--brand-100); transition: background .12s; }
.table-action:hover { background: var(--brand-100); }

/* DOT / KBD */
.dot { width: 8px; height: 8px; border-radius: 999px; display: inline-block; }
.kbd { font-family: 'Geist Mono', monospace; font-size: 10.5px; padding: 1px 6px; background: var(--bg); border: 1px solid var(--border); border-radius: 5px; color: var(--ink-500); display: inline-block; }

/* KANBAN */
.kanban-col { background: white; border-radius: 20px; border: 1px solid var(--border); width: 300px; flex-shrink: 0; display: flex; flex-direction: column; }
.kanban-col-head { padding: 16px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.kanban-card { background: white; border: 1px solid var(--border); border-radius: 14px; padding: 14px; transition: all .15s; cursor: pointer; display: block; }
.kanban-card:hover { border-color: var(--brand-200); box-shadow: 0 4px 12px -4px rgba(22,21,27,.06); }

/* NOTE STICKY */
.note-sticky { border-radius: 18px; padding: 18px; border: 1px solid rgba(0,0,0,0.04); transition: all .15s; position: relative; }
.note-sticky:hover { box-shadow: 0 8px 16px -4px rgba(22,21,27,.08); transform: translateY(-2px); }
.note-yellow { background: #fef9c3; }
.note-blue { background: #dbeafe; }
.note-pink { background: #fce7f3; }
.note-green { background: #dcfce7; }
.note-purple { background: #f3e8ff; }
.note-orange { background: #ffedd5; }
.note-gray { background: #f1f1f4; }
.note-red { background: #fee2e2; }

/* SEGMENTED */
.segmented { display: inline-flex; background: var(--bg); border-radius: 999px; padding: 4px; gap: 4px; }
.segmented a { padding: 7px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--ink-500); transition: all .12s; display: inline-flex; align-items: center; gap: 6px; }
.segmented a.active { background: white; color: var(--ink-900); box-shadow: 0 1px 2px rgba(0,0,0,.04); }

/* PROGRESS */
.progress { height: 8px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.progress-bar { height: 100%; border-radius: inherit; background: var(--brand-500); }

/* POPOVER */
.popover { background: white; border-radius: 14px; border: 1px solid var(--border); box-shadow: 0 12px 32px -8px rgba(22,21,27,.10); padding: 6px; }
.popover-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; font-size: 13px; color: var(--ink-700); cursor: pointer; width: 100%; text-align: left; border: none; background: transparent; }
.popover-item:hover { background: var(--bg); color: var(--ink-900); }
.popover-item .shortcut { margin-left: auto; font-size: 11px; color: var(--ink-400); }

/* PULSE */
.pulse { position: relative; display: inline-flex; width: 8px; height: 8px; border-radius: 999px; background: #16a34a; }
.pulse::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: inherit; animation: pulse-ring 2s ease-out infinite; }
@keyframes pulse-ring { 0%{transform:scale(1);opacity:.7} 80%,100%{transform:scale(2.4);opacity:0} }

/* HEADINGS */
.heading-xl { font-family: 'Plus Jakarta Sans', sans-serif; font-size: clamp(2.6rem, 5vw + 1rem, 4.8rem); line-height: 1.04; letter-spacing: -0.045em; font-weight: 800; }
.heading-lg { font-family: 'Plus Jakarta Sans', sans-serif; font-size: clamp(2rem, 3vw + 1rem, 3rem); line-height: 1.08; letter-spacing: -0.035em; font-weight: 700; }
.heading-md { font-family: 'Plus Jakarta Sans', sans-serif; font-size: clamp(1.55rem, 1.5vw + 1rem, 2.1rem); line-height: 1.15; letter-spacing: -0.025em; font-weight: 700; }

.text-gradient-purple { background: linear-gradient(135deg, var(--brand-600), #8b5cf6 50%, #d8b4fe); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }

/* TOOLTIP */
[data-tooltip] { position: relative; }
[data-tooltip]::after { content: attr(data-tooltip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%) scale(.95); background: var(--ink-900); color: white; font-size: 11px; padding: 4px 9px; border-radius: 7px; white-space: nowrap; opacity: 0; pointer-events: none; transition: all .15s; z-index: 60; }
[data-tooltip]:hover::after { opacity: 1; transform: translateX(-50%) scale(1); }

/* LUCIDE */
.lucide { display: inline-block; line-height: 1; vertical-align: middle; }
svg.lucide { width: 1em; height: 1em; stroke-width: 2; vertical-align: -0.15em; flex-shrink: 0; }
.nav-item svg.lucide { width: 18px; height: 18px; stroke-width: 2; }
.brand-logo svg.lucide { width: 18px; height: 18px; }
.icon-btn svg.lucide { width: 19px; height: 19px; }
.search-pill > svg.lucide { width: 18px; height: 18px; position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-400); pointer-events: none; }
.btn svg.lucide { width: 1.05em; height: 1.05em; }
.section-head-icon svg.lucide { width: 16px; height: 16px; }
.media-card-image svg.lucide { width: 38px; height: 38px; }
.stat-mini-icon svg.lucide { width: 19px; height: 19px; }
.hero-cta-arrow svg.lucide { width: 14px; height: 14px; }
.media-card-tag svg.lucide { width: 11px; height: 11px; }

/* WELCOME STRIP */
.welcome-strip { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-radius: 14px; background: linear-gradient(90deg, #ecfdf5, #f0fdfa); border: 1px solid #a7f3d0; color: #065f46; font-size: 13px; }
.welcome-strip-icon { width: 32px; height: 32px; border-radius: 10px; background: white; color: #047857; display: grid; place-items: center; box-shadow: 0 1px 2px rgba(6,95,70,.1); }
.welcome-strip-close { margin-left: auto; opacity: .6; cursor: pointer; }
.welcome-strip-close:hover { opacity: 1; }

/* TREND CHIP */
.trend-up { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 700; color: #047857; background: #d1fae5; padding: 2px 7px; border-radius: 999px; }
.trend-down { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 700; color: #b91c1c; background: #fee2e2; padding: 2px 7px; border-radius: 999px; }

/* SPARKLINE */
.sparkline { height: 28px; width: 60px; }

/* EMPTY STATE */
.empty-state { padding: 36px 24px; text-align: center; }
.empty-illust { width: 72px; height: 72px; border-radius: 24px; background: linear-gradient(135deg, var(--brand-50), white); border: 1px solid var(--border); display: grid; place-items: center; color: var(--brand-500); margin: 0 auto 14px; box-shadow: 0 8px 20px -8px rgba(124,92,255,.18); }
.empty-state-title { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 14.5px; color: var(--ink-900); }
.empty-state-text { font-size: 12px; color: var(--ink-400); margin-top: 4px; }

/* NOTIFICATION DROPDOWN */
.notif-dropdown { width: 360px; }
.notif-item { display: flex; gap: 10px; padding: 10px 12px; border-radius: 10px; cursor: pointer; align-items: flex-start; }
.notif-item:hover { background: var(--bg); }
.notif-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--brand-500); flex-shrink: 0; margin-top: 6px; }

/* HERO KPI STRIP */
.hero-kpi { display: flex; gap: 28px; margin-top: 22px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.18); position: relative; }
.hero-kpi-item { color: white; }
.hero-kpi-label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; opacity: .8; }
.hero-kpi-value { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 24px; letter-spacing: -0.025em; margin-top: 2px; }

/* CHECK CIRCLE */
.check-circle { width: 18px; height: 18px; border-radius: 999px; border: 2px solid var(--ink-300); flex-shrink: 0; transition: all .12s; cursor: pointer; }
.check-circle:hover { border-color: var(--brand-500); }
.check-circle.priority-urgent { border-color: #ef4444; }
.check-circle.priority-high { border-color: #f59e0b; }
.check-circle.priority-medium { border-color: #7c5cff; }
.check-circle.priority-low { border-color: #9ca3af; }

/* TODO ROW */
.todo-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 14px; transition: background .12s; }
.todo-row:hover { background: var(--bg); }

/* SLA ROW */
.sla-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; transition: background .12s; }
.sla-row:hover { background: var(--bg); }
.sla-bar { width: 3px; height: 36px; border-radius: 3px; flex-shrink: 0; }

/* DEMO BANNER */
.demo-banner { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-radius: 16px; background: linear-gradient(90deg, #1a1825 0%, #2a1f3d 100%); color: white; box-shadow: 0 8px 24px -8px rgba(124,92,255,.3); position: relative; overflow: hidden; }
.demo-banner::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 0% 50%, rgba(124,92,255,.3), transparent 60%); }
.demo-banner-content { position: relative; display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.demo-banner-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: rgba(124,92,255,.25); border: 1px solid rgba(124,92,255,.5); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.demo-countdown { font-family: 'Geist Mono', monospace; font-weight: 700; font-size: 13px; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15); }
.demo-credentials { font-family: 'Geist Mono', monospace; font-size: 11.5px; color: rgba(255,255,255,.7); }

/* DEMO MINI PICKER (login) */
.demo-divider { display: flex; align-items: center; gap: 12px; margin: 24px 0 18px; }
.demo-divider::before, .demo-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.demo-divider span { font-size: 10.5px; font-weight: 700; letter-spacing: 0.18em; color: var(--ink-400); text-transform: uppercase; }

.demo-mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.demo-mini-card { position: relative; border: 1px solid var(--border); border-radius: 16px; padding: 16px 12px 14px; background: white; text-align: center; cursor: pointer; transition: all .2s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column; align-items: center; gap: 4px; overflow: hidden; }
.demo-mini-card:hover { transform: translateY(-3px); border-color: var(--brand-300); box-shadow: 0 14px 28px -10px rgba(124,92,255,.18); }
.demo-mini-card:hover .demo-mini-cta { opacity: 1; transform: translateY(0); }
.demo-mini-card.featured { border-color: transparent; background: linear-gradient(180deg, #1a1825 0%, #16151b 100%); color: white; }
.demo-mini-card.featured::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; background: linear-gradient(135deg, #7c5cff, #d946ef); -webkit-mask: linear-gradient(white,white) content-box, linear-gradient(white,white); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.demo-mini-card.featured:hover { box-shadow: 0 20px 40px -12px rgba(124,92,255,.5); }
.demo-mini-tag { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); padding: 3px 10px; border-radius: 999px; background: linear-gradient(135deg, #7c5cff, #d946ef); color: white; font-size: 9.5px; font-weight: 800; letter-spacing: 0.14em; box-shadow: 0 4px 10px -2px rgba(124,92,255,.45); white-space: nowrap; }
.demo-mini-name { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 13.5px; letter-spacing: -0.015em; }
.demo-mini-price { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 17px; letter-spacing: -0.02em; margin-top: 2px; }
.demo-mini-price .demo-mini-price-period { font-size: 10px; font-weight: 500; opacity: .6; }
.demo-mini-meta { font-size: 10.5px; font-weight: 600; opacity: .6; margin-top: 4px; }
.demo-mini-cta { display: inline-flex; align-items: center; justify-content: center; gap: 4px; margin-top: 8px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; opacity: .55; transform: translateY(2px); transition: all .2s; }
.demo-mini-card.featured .demo-mini-cta { color: #c4b5fd; opacity: .8; }

/* DEMO PICKER */
.demo-card { position: relative; background: white; border: 1px solid var(--border); border-radius: 28px; padding: 36px 32px; transition: all .3s; }
.demo-card:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -20px rgba(124,92,255,.18); }
.demo-card.featured { background: linear-gradient(180deg, #1a1825 0%, #16151b 100%); color: white; border-color: transparent; box-shadow: 0 30px 60px -20px rgba(124,92,255,.4); }
.demo-card.featured::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; background: linear-gradient(135deg, #7c5cff, #d946ef); -webkit-mask: linear-gradient(white,white) content-box, linear-gradient(white,white); -webkit-mask-composite: xor; mask-composite: exclude; }
.demo-tag-recommended { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); padding: 5px 14px; border-radius: 999px; background: linear-gradient(135deg, #7c5cff, #d946ef); color: white; font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; box-shadow: 0 6px 16px -4px rgba(124,92,255,.5); }
.demo-icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; box-shadow: 0 8px 20px -6px rgba(124,92,255,.3); }
.demo-limit-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; font-size: 13px; }
.demo-limit-icon { width: 22px; height: 22px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }

/* TICKET COVER */
.ticket-cover { position: relative; border-radius: 22px; overflow: hidden; padding: 32px 32px 24px; background: linear-gradient(135deg, #fafafb 0%, #f3f0ff 100%); border: 1px solid var(--border); }
.ticket-cover::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, #7c5cff, #d946ef, #f59e0b); }
.ticket-cover-meta { font-size: 11.5px; color: var(--ink-400); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ticket-cover-meta-item { display: inline-flex; align-items: center; gap: 5px; }

/* CHAT BUBBLE */
.chat-row { display: flex; align-items: flex-start; gap: 12px; }
.chat-row.mine { flex-direction: row-reverse; }
.chat-bubble { max-width: 75%; padding: 12px 16px; border-radius: 18px; font-size: 13.5px; line-height: 1.55; position: relative; }
.chat-bubble-other { background: var(--bg); border-top-left-radius: 4px; }
.chat-bubble-mine { background: linear-gradient(135deg, #7c5cff, #6c47ff); color: white; border-top-right-radius: 4px; box-shadow: 0 4px 14px -4px rgba(124,92,255,.45); }
.chat-bubble-internal { background: linear-gradient(135deg, #fef3c7, #fde68a); border: 1px solid #fcd34d; color: #78350f; border-top-left-radius: 4px; }
.chat-meta { font-size: 11px; color: var(--ink-400); margin-top: 4px; padding: 0 6px; }

/* TIMELINE — for activity */
.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ''; position: absolute; left: 11px; top: 4px; bottom: 4px; width: 2px; background: var(--border); }
.timeline-item { position: relative; padding-bottom: 18px; }
.timeline-dot { position: absolute; left: -24px; top: 2px; width: 24px; height: 24px; border-radius: 999px; background: white; border: 2px solid var(--brand-500); display: grid; place-items: center; color: var(--brand-700); font-size: 11px; }

/* COVER BANNER */
.cover-banner { height: 132px; border-radius: 22px 22px 0 0; background: linear-gradient(120deg, #6c47ff 0%, #8b5cf6 45%, #c4b5fd 100%); position: relative; overflow: hidden; }
.cover-banner::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(circle at 80% 20%, rgba(255,255,255,.22) 0, transparent 45%), radial-gradient(circle at 15% 85%, rgba(255,255,255,.14) 0, transparent 45%); }
.cover-banner::after { content: ''; position: absolute; inset: auto 0 0 0; height: 60%; background: repeating-linear-gradient(45deg, transparent 0 18px, rgba(255,255,255,.05) 18px 19px); }
.profile-card { background: white; border-radius: 22px; border: 1px solid var(--border); overflow: hidden; }
.profile-card-body { padding: 0 28px 24px; margin-top: -42px; position: relative; display: flex; align-items: flex-end; gap: 20px; }
.profile-card-body .avatar { box-shadow: 0 0 0 4px white, 0 8px 24px -6px rgba(22,21,27,.18); }

/* SECTION HEAD */
.section-head { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.section-head-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--brand-50); color: var(--brand-700); display: grid; place-items: center; flex-shrink: 0; }
.section-head-meta { font-size: 11.5px; color: var(--ink-400); }

/* DANGER ZONE */
.danger-zone { border: 1px dashed #fecaca; background: #fef2f2; border-radius: 18px; padding: 18px 22px; }
.danger-zone .section-head-icon { background: #fee2e2; color: #b91c1c; }

/* COLOR SWATCH */
.swatch-wrap { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); }
.swatch-wrap input[type=color] { width: 44px; height: 44px; border-radius: 10px; border: none; padding: 0; background: transparent; cursor: pointer; }
.swatch-wrap input[type=color]::-webkit-color-swatch-wrapper { padding: 0; border-radius: 10px; }
.swatch-wrap input[type=color]::-webkit-color-swatch { border: none; border-radius: 10px; }

/* PLAN CARD */
.plan-card { background: linear-gradient(135deg, #6c47ff 0%, #8b5cf6 60%, #a78bfa 100%); color: white; border-radius: 22px; padding: 28px 32px; position: relative; overflow: hidden; box-shadow: var(--shadow-purple); }
.plan-card::before { content: ''; position: absolute; inset: auto -40px -60px auto; width: 240px; height: 240px; border-radius: 50%; background: rgba(255,255,255,.08); }
.plan-card::after { content: ''; position: absolute; inset: -60px auto auto -40px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,.06); }

/* ROLE CARD */
.role-card { position: relative; background: white; border-radius: 22px; border: 1px solid var(--border); padding: 24px 26px; transition: all .18s; overflow: hidden; }
.role-card:hover { border-color: var(--brand-200); transform: translateY(-2px); box-shadow: 0 14px 28px -10px rgba(22,21,27,.10); }
.role-card-accent { position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--brand-500), var(--brand-300)); }
.role-card-accent.system { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.role-card-accent.owner { background: linear-gradient(90deg, #ef4444, #f59e0b); }

/* TAB PILLS */
.tab-pills { display: inline-flex; padding: 4px; background: var(--bg); border-radius: 999px; gap: 2px; }
.tab-pills > * { padding: 8px 16px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--ink-500); transition: all .12s; cursor: pointer; }
.tab-pills > *.active { background: white; color: var(--ink-900); box-shadow: 0 1px 3px rgba(22,21,27,.06); }

/* RANGE PICKER */
.date-range { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 16px; border: 1px solid var(--border); border-radius: 999px; background: white; font-size: 12.5px; font-weight: 500; color: var(--ink-700); }
.date-range i { color: var(--ink-400); }

/* ============ LANDING — AURA & ANIMATIONS ============ */

/* AURORA BG */
.aurora-bg { position: absolute; inset: 0; overflow: hidden; z-index: -1; pointer-events: none; }
.aurora-blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.55; mix-blend-mode: multiply; will-change: transform; }
.aurora-blob.b1 { width: 520px; height: 520px; background: radial-gradient(circle, #a78bfa, transparent 70%); top: -120px; left: 8%; animation: aurora-1 22s ease-in-out infinite; }
.aurora-blob.b2 { width: 460px; height: 460px; background: radial-gradient(circle, #f0abfc, transparent 70%); top: 20%; right: 5%; animation: aurora-2 26s ease-in-out infinite; }
.aurora-blob.b3 { width: 600px; height: 600px; background: radial-gradient(circle, #818cf8, transparent 70%); bottom: -200px; left: 30%; animation: aurora-3 30s ease-in-out infinite; }
@keyframes aurora-1 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(80px,60px) scale(1.15)} }
@keyframes aurora-2 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(-100px,40px) scale(0.9)} }
@keyframes aurora-3 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(60px,-80px) scale(1.1)} }

.grid-bg { position: absolute; inset: 0; background-image: linear-gradient(rgba(124,92,255,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(124,92,255,0.06) 1px, transparent 1px); background-size: 64px 64px; mask-image: radial-gradient(ellipse 70% 50% at 50% 0%, black 30%, transparent 80%); -webkit-mask-image: radial-gradient(ellipse 70% 50% at 50% 0%, black 30%, transparent 80%); }

.noise-bg { position: absolute; inset: 0; opacity: 0.04; mix-blend-mode: overlay; pointer-events: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.5'/></svg>"); }

/* GLOW */
.glow-purple { box-shadow: 0 0 60px -10px rgba(124,92,255,.45), 0 20px 40px -20px rgba(124,92,255,.35); }
.glow-text { text-shadow: 0 0 30px rgba(124,92,255,.4); }

/* PILL — premium */
.aura-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; background: rgba(255,255,255,0.85); backdrop-filter: blur(20px); border: 1px solid rgba(124,92,255,0.2); box-shadow: 0 4px 14px -4px rgba(124,92,255,0.15); font-size: 12.5px; }
.aura-pill-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: linear-gradient(135deg, #7c5cff, #a78bfa); color: white; font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; }

/* HEADING — display */
.display-xl { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: clamp(2.8rem, 5.5vw + 1rem, 6rem); line-height: 0.98; letter-spacing: -0.05em; }

/* MARQUEE */
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent); }
.marquee-track { display: flex; gap: 64px; animation: marquee 28s linear infinite; width: max-content; }
@keyframes marquee { from{transform:translateX(0)} to{transform:translateX(-50%)} }

/* SPOTLIGHT — mouse follow */
.spotlight-card { position: relative; overflow: hidden; isolation: isolate; }
.spotlight-card::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), rgba(124,92,255,0.18), transparent 40%); opacity: 0; transition: opacity .3s; pointer-events: none; z-index: 0; }
.spotlight-card:hover::before { opacity: 1; }
.spotlight-card > * { position: relative; z-index: 1; }

/* BENTO — premium card */
.bento { position: relative; background: white; border-radius: 28px; border: 1px solid var(--border); padding: 32px; overflow: hidden; transition: all .35s cubic-bezier(.2,.8,.2,1); }
.bento:hover { transform: translateY(-4px); border-color: var(--brand-200); box-shadow: 0 24px 48px -16px rgba(124,92,255,.18); }
.bento-glow { position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: linear-gradient(135deg, transparent, rgba(124,92,255,0.4), transparent); -webkit-mask: linear-gradient(white,white) content-box, linear-gradient(white,white); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .35s; }
.bento:hover .bento-glow { opacity: 1; }
.bento-icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; box-shadow: 0 8px 20px -6px rgba(124,92,255,0.3); position: relative; }
.bento-icon::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(135deg, rgba(255,255,255,0.5), transparent); }

/* TICKER */
.ticker-row { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 16px; background: white; border: 1px solid var(--border); transition: all .3s; }
.ticker-row:hover { transform: translateX(4px); border-color: var(--brand-200); }

/* ANIMATED GRADIENT TEXT */
.gradient-shift { background: linear-gradient(120deg, #7c5cff, #d946ef, #818cf8, #7c5cff); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gradient-shift 6s ease infinite; }
@keyframes gradient-shift { 0%,100%{background-position:0% 50%} 50%{background-position:100% 50%} }

/* FLOATING UI CHIPS (around hero mockup) */
.float-chip { position: absolute; background: white; border-radius: 16px; padding: 12px 16px; box-shadow: 0 16px 40px -10px rgba(22,21,27,0.18); border: 1px solid var(--border); display: flex; align-items: center; gap: 10px; will-change: transform; }
.float-chip.delay-1 { animation: float 6s ease-in-out infinite; }
.float-chip.delay-2 { animation: float 7s ease-in-out infinite 1s; }
.float-chip.delay-3 { animation: float 8s ease-in-out infinite 2s; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }

/* TESTIMONIAL */
.testi { background: white; border: 1px solid var(--border); border-radius: 24px; padding: 28px; position: relative; }
.testi-quote { position: absolute; top: 18px; right: 22px; font-family: 'Plus Jakarta Sans'; font-size: 64px; line-height: 1; color: var(--brand-100); font-weight: 800; }

/* PRICING */
.price-card { position: relative; background: white; border: 1px solid var(--border); border-radius: 28px; padding: 32px; transition: all .3s; }
.price-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -16px rgba(22,21,27,0.1); }
.price-card.featured { background: linear-gradient(180deg, #1a1825 0%, #16151b 100%); color: white; border-color: transparent; box-shadow: 0 30px 60px -20px rgba(124,92,255,0.4); }
.price-card.featured::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(135deg, #7c5cff, #d946ef); -webkit-mask: linear-gradient(white,white) content-box, linear-gradient(white,white); -webkit-mask-composite: xor; mask-composite: exclude; }
.price-amount { font-family: 'Plus Jakarta Sans'; font-weight: 800; font-size: 56px; line-height: 1; letter-spacing: -0.04em; }
.price-feat { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; font-size: 13.5px; }
.price-feat-check { width: 20px; height: 20px; border-radius: 999px; background: var(--brand-50); color: var(--brand-700); display: grid; place-items: center; flex-shrink: 0; margin-top: 1px; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--border); padding: 22px 0; cursor: pointer; }
.faq-q { display: flex; align-items: center; justify-content: space-between; font-family: 'Plus Jakarta Sans'; font-weight: 700; font-size: 16px; }
.faq-icon { width: 32px; height: 32px; border-radius: 999px; background: var(--brand-50); color: var(--brand-700); display: grid; place-items: center; transition: transform .3s; flex-shrink: 0; }
.faq-item.open .faq-icon { transform: rotate(45deg); background: var(--brand-500); color: white; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease, margin-top .35s ease; color: var(--ink-500); font-size: 14px; line-height: 1.6; }
.faq-item.open .faq-a { max-height: 320px; margin-top: 14px; }

/* DASHBOARD MOCKUP — premium frame */
.mock-frame { background: white; border-radius: 28px; padding: 12px; box-shadow: 0 50px 100px -30px rgba(22,21,27,.35), 0 30px 60px -20px rgba(124,92,255,.25); border: 1px solid rgba(255,255,255,.5); position: relative; }
.mock-frame::before { content: ''; position: absolute; inset: -2px; border-radius: 30px; padding: 2px; background: linear-gradient(135deg, rgba(124,92,255,0.6), rgba(217,70,239,0.4), rgba(99,102,241,0.6)); -webkit-mask: linear-gradient(white,white) content-box, linear-gradient(white,white); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .5; pointer-events: none; }

/* SCROLL REVEAL helpers */
.reveal { opacity: 0; transform: translateY(28px); transition: all 1s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { opacity: 0; transform: translateY(20px); }
.reveal-stagger.in > * { opacity: 1; transform: translateY(0); transition: all .8s cubic-bezier(.16,1,.3,1); }
.reveal-stagger.in > *:nth-child(1){ transition-delay: 0s; }
.reveal-stagger.in > *:nth-child(2){ transition-delay: .08s; }
.reveal-stagger.in > *:nth-child(3){ transition-delay: .16s; }
.reveal-stagger.in > *:nth-child(4){ transition-delay: .24s; }
.reveal-stagger.in > *:nth-child(5){ transition-delay: .32s; }
.reveal-stagger.in > *:nth-child(6){ transition-delay: .40s; }

/* GRADIENT BORDER PILLS */
.gradient-border { position: relative; background: white; border-radius: 999px; }
.gradient-border::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: linear-gradient(135deg, #7c5cff, #d946ef); -webkit-mask: linear-gradient(white,white) content-box, linear-gradient(white,white); -webkit-mask-composite: xor; mask-composite: exclude; }

/* NAV LANDING */
.nav-land { position: sticky; top: 14px; z-index: 40; margin: 0 auto; max-width: 1100px; }
.nav-land-inner { background: rgba(255,255,255,0.78); backdrop-filter: blur(20px) saturate(180%); border: 1px solid rgba(124,92,255,0.12); border-radius: 999px; padding: 8px 8px 8px 22px; box-shadow: 0 4px 20px -4px rgba(22,21,27,0.06); display: flex; align-items: center; gap: 24px; }

/* ============ PERSONALIZATION ============ */

/* Brand color override (set via inline CSS var --accent) */
body[style*="--accent"] .btn-primary { background: var(--accent, #7c5cff); }
body[style*="--accent"] .btn-soft { background: color-mix(in srgb, var(--accent) 12%, white); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 25%, white); }
body[style*="--accent"] .nav-item.active { background: color-mix(in srgb, var(--accent) 12%, white); color: var(--accent); }
body[style*="--accent"] .nav-item.active::before { background: var(--accent); }
body[style*="--accent"] .badge-purple { background: color-mix(in srgb, var(--accent) 14%, white); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 25%, white); }
body[style*="--accent"] .table-action { background: color-mix(in srgb, var(--accent) 12%, white); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 22%, white); }
body[style*="--accent"] .input:focus { border-color: color-mix(in srgb, var(--accent) 50%, white); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, white); }
body[style*="--accent"] .brand-logo { background: var(--accent); }

/* DARK THEME */
body[data-theme="dark"] { --bg: #0f0d18; --surface: #16151b; --border: #2a2738; --ink-900: #f5f5f7; --ink-700: #d4d4dc; --ink-500: #a8a8b3; --ink-400: #8e8e9a; --ink-300: #6b6b78; }
body[data-theme="dark"] { background: var(--bg); color: var(--ink-900); }
body[data-theme="dark"] .app-frame { background: #16151b; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
body[data-theme="dark"] .sidebar { background: #16151b; }
body[data-theme="dark"] .main { background: #0f0d18; }
body[data-theme="dark"] .card, body[data-theme="dark"] .stat-mini, body[data-theme="dark"] .media-card, body[data-theme="dark"] .kanban-col, body[data-theme="dark"] .kanban-card, body[data-theme="dark"] .testi { background: #1a1825; border-color: #2a2738; color: var(--ink-900); }
body[data-theme="dark"] .input, body[data-theme="dark"] .search-pill input { background: #1a1825; border-color: #2a2738; color: var(--ink-900); }
body[data-theme="dark"] .icon-btn, body[data-theme="dark"] .user-pill { background: #1a1825; border-color: #2a2738; color: var(--ink-700); }
body[data-theme="dark"] .table tbody tr:hover { background: #1f1c2d; }
body[data-theme="dark"] .nav-item:hover { background: #1f1c2d; color: var(--ink-900); }
body[data-theme="dark"] .nav-item.active { background: color-mix(in srgb, var(--accent) 18%, #0f0d18); }
body[data-theme="dark"] .kbd { background: #1f1c2d; border-color: #2a2738; color: var(--ink-500); }
body[data-theme="dark"] .badge-gray { background: #1f1c2d; color: var(--ink-500); border-color: #2a2738; }
body[data-theme="dark"] .popover { background: #1a1825; border-color: #2a2738; box-shadow: 0 12px 32px -8px rgba(0,0,0,.5); }
body[data-theme="dark"] .popover-item { color: var(--ink-700); }
body[data-theme="dark"] .popover-item:hover { background: #1f1c2d; color: var(--ink-900); }
body[data-theme="dark"] .empty-illust { background: linear-gradient(135deg, #1f1c2d, #16151b); border-color: #2a2738; }
body[data-theme="dark"] select.input { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a8a8b3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>"); }
body[data-theme="dark"] .progress { background: #2a2738; }
body[data-theme="dark"] .ticket-cover { background: linear-gradient(135deg,#1a1825 0%,#252040 100%); border-color: #2a2738; }
body[data-theme="dark"] .chat-bubble-other { background: #1f1c2d; color: var(--ink-900); }

/* DENSITY */
body[data-density="compact"] .card-pad { padding: 16px 18px; }
body[data-density="compact"] .table tbody td { padding: 10px 14px; }
body[data-density="compact"] .table thead th { padding: 10px 14px; }
body[data-density="compact"] .nav-item { padding: 7px 12px; font-size: 13px; }
body[data-density="compact"] .stat-mini { padding: 12px 14px; }
body[data-density="compact"] .input { height: 38px; }
body[data-density="compact"] .btn-sm { height: 30px; }

body[data-density="spacious"] .card-pad { padding: 32px 34px; }
body[data-density="spacious"] .table tbody td { padding: 22px 22px; }
body[data-density="spacious"] .table thead th { padding: 18px 22px; }
body[data-density="spacious"] .nav-item { padding: 13px 14px; font-size: 14.5px; }
body[data-density="spacious"] .stat-mini { padding: 18px 22px; }
body[data-density="spacious"] .input { height: 50px; }
body[data-density="spacious"] .btn-sm { height: 40px; }

/* SIDEBAR COMPACT */
body[data-sidebar="compact"] .sidebar { width: 76px; padding: 24px 12px; }
body[data-sidebar="compact"] .brand-name,
body[data-sidebar="compact"] .nav-heading,
body[data-sidebar="compact"] .nav-item span,
body[data-sidebar="compact"] .nav-item .badge-mini,
body[data-sidebar="compact"] .nav-friend > div:not(.avatar) { display: none; }
body[data-sidebar="compact"] .nav-item { justify-content: center; padding: 10px 0; }
body[data-sidebar="compact"] .nav-item.active::before { display: none; }
body[data-sidebar="compact"] .nav-item:hover::after { content: attr(data-label); position: absolute; left: calc(100% + 16px); top: 50%; transform: translateY(-50%); padding: 4px 9px; background: var(--ink-900); color: white; font-size: 11px; border-radius: 6px; white-space: nowrap; z-index: 60; }
body[data-sidebar="compact"] .brand { justify-content: center; padding: 0; }

/* WALLPAPERS */
body[data-wallpaper="grid"] .app-shell { background-image: linear-gradient(rgba(124,92,255,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(124,92,255,0.06) 1px, transparent 1px); background-size: 32px 32px; }
body[data-wallpaper="dots"] .app-shell { background-image: radial-gradient(rgba(124,92,255,0.18) 1px, transparent 1px); background-size: 24px 24px; }
body[data-wallpaper="mesh"] .app-shell { position: relative; }
body[data-wallpaper="mesh"] .app-shell::before { content: ''; position: fixed; inset: 0; background-image: radial-gradient(circle at 0% 0%, rgba(124,92,255,0.18), transparent 50%), radial-gradient(circle at 100% 100%, rgba(217,70,239,0.12), transparent 50%); pointer-events: none; z-index: 0; }
body[data-wallpaper="mesh"] .app-frame { position: relative; z-index: 1; }

/* ACCENT TILE PICKER */
.accent-tile { width: 44px; height: 44px; border-radius: 14px; cursor: pointer; position: relative; transition: transform .15s; border: 2px solid transparent; }
.accent-tile:hover { transform: scale(1.08); }
.accent-tile.selected { border-color: white; box-shadow: 0 0 0 3px var(--ink-900); }
.accent-tile.selected::after { content: '✓'; position: absolute; inset: 0; display: grid; place-items: center; color: white; font-weight: 800; font-size: 16px; }

/* CHOICE TILE */
.choice-tile { position: relative; padding: 14px; border-radius: 16px; border: 1.5px solid var(--border); background: white; cursor: pointer; transition: all .15s; text-align: left; display: flex; flex-direction: column; gap: 6px; }
.choice-tile:hover { border-color: var(--brand-300); }
.choice-tile.selected { border-color: var(--brand-500); background: color-mix(in srgb, var(--brand-500) 6%, white); box-shadow: 0 6px 16px -4px color-mix(in srgb, var(--brand-500) 25%, transparent); }
.choice-tile.selected::after { content: ''; position: absolute; top: 10px; right: 10px; width: 18px; height: 18px; border-radius: 999px; background: var(--brand-500); background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>"); background-size: 12px; background-position: center; background-repeat: no-repeat; }
body[data-theme="dark"] .choice-tile { background: #1a1825; }
body[data-theme="dark"] .choice-tile.selected { background: color-mix(in srgb, var(--accent) 14%, #1a1825); }

/* SWITCH */
.kswitch { position: relative; display: inline-flex; width: 38px; height: 22px; flex-shrink: 0; }
.kswitch input { opacity: 0; width: 0; height: 0; }
.kswitch-track { position: absolute; inset: 0; background: var(--ink-300); border-radius: 999px; cursor: pointer; transition: background .15s; }
.kswitch-track::before { content: ''; position: absolute; left: 2px; top: 2px; width: 18px; height: 18px; border-radius: 999px; background: white; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.kswitch input:checked + .kswitch-track { background: var(--brand-500); }
.kswitch input:checked + .kswitch-track::before { transform: translateX(16px); }

/* RESPONSIVE */
@media (max-width: 1023px) {
    .app-shell { padding: 0; }
    .app-frame { border-radius: 0; min-height: 100vh; }
    .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; transform: translateX(-100%); transition: transform .25s; }
    .sidebar.open { transform: translateX(0); box-shadow: 0 24px 56px -12px rgba(22,21,27,.16); }
}

/* SIDEBAR TOGGLE BUTTON */
.sidebar-toggle {
    width: 30px; height: 30px; border-radius: 8px;
    display: none; align-items: center; justify-content: center;
    color: var(--ink-500); background: var(--bg);
    border: 1px solid var(--border);
    transition: color .15s, background .15s, border-color .15s, transform .15s;
    cursor: pointer; margin-left: auto; flex-shrink: 0; padding: 0;
}
.sidebar-toggle:hover { color: var(--brand-700); background: var(--brand-50); border-color: var(--brand-200); }
.sidebar-toggle:active { transform: scale(.92); }
.sidebar-toggle i, .sidebar-toggle svg { width: 15px; height: 15px; pointer-events: none; }
@media (min-width: 1024px) {
    .sidebar-toggle { display: inline-flex; }
}

.brand { position: relative; }

/* COLLAPSED SIDEBAR (desktop only) */
@media (min-width: 1024px) {
    body.sidebar-collapsed .sidebar { width: 80px !important; padding: 28px 14px 20px !important; }
    body.sidebar-collapsed .sidebar .brand { justify-content: center; padding: 0; gap: 0; }
    body.sidebar-collapsed .sidebar .brand-name { display: none; }
    body.sidebar-collapsed .sidebar .sidebar-toggle {
        position: absolute; right: -14px; top: 4px;
        width: 26px; height: 26px;
        background: white; border-color: var(--border);
        box-shadow: 0 4px 12px -4px rgba(22,21,27,.1);
        z-index: 5; margin: 0;
    }
    body.sidebar-collapsed .sidebar .nav-heading {
        opacity: 0; height: 0; margin: 0; padding: 0; overflow: hidden; pointer-events: none;
    }
    body.sidebar-collapsed .sidebar .nav-section { gap: 4px; }
    body.sidebar-collapsed .sidebar .nav-item { justify-content: center; padding: 11px 0; gap: 0; }
    body.sidebar-collapsed .sidebar .nav-item .nav-label,
    body.sidebar-collapsed .sidebar .nav-item .badge-mini,
    body.sidebar-collapsed .sidebar .nav-item .nav-lock { display: none !important; }
    body.sidebar-collapsed .sidebar .nav-item.active::before { left: -14px; }
    body.sidebar-collapsed .sidebar .sidebar-bottom-card { display: none !important; }

    /* Tooltip when collapsed (uses [data-tooltip]) */
    body.sidebar-collapsed .sidebar [data-tooltip] { position: relative; }
    body.sidebar-collapsed .sidebar .nav-item[data-tooltip]::after,
    body.sidebar-collapsed .sidebar .sidebar-collapsed-foot [data-tooltip]::after {
        content: attr(data-tooltip);
        position: absolute;
        left: calc(100% + 16px);
        top: 50%;
        transform: translateY(-50%) translateX(-4px);
        background: #16151b;
        color: white;
        padding: 7px 12px;
        border-radius: 8px;
        font-size: 11.5px;
        font-weight: 600;
        letter-spacing: 0;
        white-space: nowrap;
        opacity: 0;
        pointer-events: none;
        transition: opacity .15s ease, transform .15s ease;
        z-index: 100;
        box-shadow: 0 8px 20px -6px rgba(22,21,27,.25);
    }
    body.sidebar-collapsed .sidebar .nav-item[data-tooltip]::before,
    body.sidebar-collapsed .sidebar .sidebar-collapsed-foot [data-tooltip]::before {
        content: '';
        position: absolute;
        left: calc(100% + 10px);
        top: 50%;
        transform: translateY(-50%) translateX(-4px);
        border: 5px solid transparent;
        border-right-color: #16151b;
        opacity: 0;
        pointer-events: none;
        transition: opacity .15s ease, transform .15s ease;
        z-index: 100;
    }
    body.sidebar-collapsed .sidebar .nav-item[data-tooltip]:hover::after,
    body.sidebar-collapsed .sidebar .nav-item[data-tooltip]:hover::before,
    body.sidebar-collapsed .sidebar .sidebar-collapsed-foot [data-tooltip]:hover::after,
    body.sidebar-collapsed .sidebar .sidebar-collapsed-foot [data-tooltip]:hover::before {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

/* Smooth transitions on the sidebar generally */
.sidebar { transition: width .22s ease, padding .22s ease, transform .25s; }
