/* ChangeHub — Production design system (Bootstrap 5.3 overrides) */

:root {
    --ch-font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --ch-font-mono: 'JetBrains Mono', ui-monospace, monospace;

    --ch-primary: #6366f1;
    --ch-primary-dark: #4f46e5;
    --ch-primary-light: #818cf8;
    --ch-accent: #14b8a6;
    --ch-accent-dark: #0d9488;

    --ch-slate-50: #f8fafc;
    --ch-slate-100: #f1f5f9;
    --ch-slate-200: #e2e8f0;
    --ch-slate-300: #cbd5e1;
    --ch-slate-400: #94a3b8;
    --ch-slate-500: #64748b;
    --ch-slate-600: #475569;
    --ch-slate-700: #334155;
    --ch-slate-800: #1e293b;
    --ch-slate-900: #0f172a;
    --ch-slate-950: #020617;

    --ch-sidebar-bg: linear-gradient(180deg, #0f172a 0%, #1e1b4b 55%, #0f172a 100%);
    --ch-sidebar-width: 272px;
    --ch-header-height: 68px;
    --ch-radius: 0.75rem;
    --ch-radius-lg: 1rem;
    --ch-radius-xl: 1.25rem;
    --ch-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --ch-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
    --ch-shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    --ch-shadow-card: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);

    /* Spacing scale (4px base) */
    --ch-space-1: 0.25rem;
    --ch-space-2: 0.5rem;
    --ch-space-3: 0.75rem;
    --ch-space-4: 1rem;
    --ch-space-5: 1.25rem;
    --ch-space-6: 1.5rem;
    --ch-space-8: 2rem;

    --bs-body-font-family: var(--ch-font);
    --bs-body-color: var(--ch-slate-700);
    --bs-body-bg: var(--ch-slate-50);
    --bs-border-color: var(--ch-slate-200);
    --bs-primary: var(--ch-primary);
    --bs-primary-rgb: 99, 102, 241;
    --bs-link-color: var(--ch-primary);
    --bs-link-hover-color: var(--ch-primary-dark);
    --bs-border-radius: var(--ch-radius);
    --bs-border-radius-sm: 0.5rem;
    --bs-border-radius-lg: var(--ch-radius-lg);
    --bs-focus-ring-color: rgba(99, 102, 241, 0.25);
}

/* ── Base typography ── */
body {
    font-family: var(--ch-font);
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--ch-slate-50) !important;
    color: var(--ch-slate-700);
    letter-spacing: -0.01em;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--ch-slate-900);
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-top: 0;
}

.changehub-main > h1,
.changehub-main > h2,
.changehub-main > h3,
.changehub-main > h4,
.changehub-main > h5,
.changehub-main > h6 {
    margin-bottom: var(--ch-space-4);
}

.changehub-main > p {
    margin-bottom: var(--ch-space-3);
}

.changehub-main > p:last-child {
    margin-bottom: 0;
}

.text-muted {
    color: var(--ch-slate-500) !important;
}

small, .small {
    color: var(--ch-slate-500);
}

code {
    font-family: var(--ch-font-mono);
    font-size: 0.8125em;
    color: var(--ch-primary-dark);
    background: rgba(99, 102, 241, 0.08);
    padding: 0.15em 0.45em;
    border-radius: 0.375rem;
    font-weight: 500;
}

/* ── Buttons ── */
.btn {
    font-weight: 600;
    letter-spacing: -0.01em;
    border-radius: 0.625rem;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--ch-primary) 0%, var(--ch-primary-dark) 100%);
    border: none;
    box-shadow: 0 1px 2px rgba(79, 70, 229, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, var(--ch-primary-light) 0%, var(--ch-primary) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-outline-primary {
    color: var(--ch-primary);
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(99, 102, 241, 0.04);
}

.btn-outline-primary:hover {
    background: var(--ch-primary);
    border-color: var(--ch-primary);
    color: #fff;
}

.btn-outline-secondary {
    color: var(--ch-slate-600);
    border-color: var(--ch-slate-200);
    background: #fff;
}

.btn-outline-secondary:hover {
    background: var(--ch-slate-100);
    border-color: var(--ch-slate-300);
    color: var(--ch-slate-800);
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8125rem;
    border-radius: 0.5rem;
}

/* ── Cards ── */
.card {
    border: 1px solid var(--ch-slate-200);
    border-radius: var(--ch-radius-lg);
    box-shadow: var(--ch-shadow-card);
    background: #fff;
    overflow: hidden;
}

.card.shadow-sm {
    box-shadow: var(--ch-shadow-card) !important;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid var(--ch-slate-100);
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--ch-slate-800);
    padding: var(--ch-space-4) var(--ch-space-5);
    letter-spacing: -0.02em;
}

.card-header > *:last-child {
    margin-bottom: 0;
}

.card-body {
    padding: var(--ch-space-5);
}

.card-body > :last-child {
    margin-bottom: 0;
}

.card-body > h1,
.card-body > h2,
.card-body > h3,
.card-body > h4,
.card-body > h5,
.card-body > h6 {
    margin-bottom: var(--ch-space-3);
}

.card-body > p {
    margin-bottom: var(--ch-space-3);
}

.card-body > p:last-child {
    margin-bottom: 0;
}

.card-footer {
    background: var(--ch-slate-50);
    border-top: 1px solid var(--ch-slate-100);
    padding: var(--ch-space-3) var(--ch-space-5);
}

/* Stat / KPI cards */
.ch-stat-card {
    border: 1px solid var(--ch-slate-200);
    border-radius: var(--ch-radius-lg);
    background: #fff;
    box-shadow: var(--ch-shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    position: relative;
}

.ch-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--ch-stat-accent, linear-gradient(90deg, var(--ch-primary), var(--ch-accent)));
    opacity: 0.85;
}

.ch-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ch-shadow-lg);
}

.ch-stat-card .ch-stat-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--ch-primary);
    flex-shrink: 0;
}

.ch-stat-card--teal { --ch-stat-accent: linear-gradient(90deg, #14b8a6, #06b6d4); }
.ch-stat-card--teal .ch-stat-icon { background: rgba(20, 184, 166, 0.12); color: #0d9488; }

.ch-stat-card--amber { --ch-stat-accent: linear-gradient(90deg, #f59e0b, #f97316); }
.ch-stat-card--amber .ch-stat-icon { background: rgba(245, 158, 11, 0.12); color: #d97706; }

.ch-stat-card--rose { --ch-stat-accent: linear-gradient(90deg, #f43f5e, #ec4899); }
.ch-stat-card--rose .ch-stat-icon { background: rgba(244, 63, 94, 0.12); color: #e11d48; }

.ch-stat-card--violet { --ch-stat-accent: linear-gradient(90deg, #8b5cf6, #6366f1); }
.ch-stat-card--violet .ch-stat-icon { background: rgba(139, 92, 246, 0.12); color: #7c3aed; }

.ch-stat-value {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--ch-slate-900);
    line-height: 1;
    letter-spacing: -0.04em;
}

.ch-stat-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ch-slate-500);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: var(--ch-space-1);
}

/* ── Tables ── */
.table {
    --bs-table-bg: transparent;
    margin-bottom: 0;
    font-size: 0.875rem;
}

.table > :not(caption) > * > * {
    padding: 0.875rem 1.25rem;
    border-bottom-color: var(--ch-slate-100);
    vertical-align: middle;
}

.table > thead {
    background: var(--ch-slate-50);
}

.table > thead > tr > th {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ch-slate-500);
    border-bottom: 1px solid var(--ch-slate-200);
    white-space: nowrap;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.table-hover > tbody > tr {
    transition: background-color 0.15s ease;
}

.table-hover > tbody > tr:hover > * {
    background-color: rgba(99, 102, 241, 0.04);
    --bs-table-bg-state: rgba(99, 102, 241, 0.04);
}

.table tbody tr:last-child > * {
    border-bottom: none;
}

.card > .table-responsive {
    border-radius: var(--ch-radius-lg);
}

/* ── Badges ── */
.badge {
    font-weight: 600;
    font-size: 0.6875rem;
    letter-spacing: 0.03em;
    padding: 0.35em 0.65em;
    border-radius: 9999px;
    text-transform: uppercase;
    line-height: 1.2;
    vertical-align: middle;
}

.badge.bg-primary,
.badge.text-bg-primary {
    background: rgba(99, 102, 241, 0.12) !important;
    color: #4338ca !important;
}

.badge.bg-secondary,
.badge.text-bg-secondary {
    background: var(--ch-slate-100) !important;
    color: var(--ch-slate-600) !important;
}

.badge.bg-success,
.badge.text-bg-success {
    background: rgba(16, 185, 129, 0.12) !important;
    color: #047857 !important;
}

.badge.bg-danger,
.badge.text-bg-danger {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #b91c1c !important;
}

.badge.bg-warning,
.badge.text-bg-warning {
    background: rgba(245, 158, 11, 0.14) !important;
    color: #b45309 !important;
}

.badge.bg-info,
.badge.text-bg-info {
    background: rgba(6, 182, 212, 0.12) !important;
    color: #0e7490 !important;
}

.badge.bg-info.text-dark {
    color: #0e7490 !important;
}

.badge.bg-dark,
.badge.text-bg-dark {
    background: var(--ch-slate-800) !important;
    color: #fff !important;
}

.badge.text-bg-light {
    background: #fff !important;
    color: var(--ch-slate-600) !important;
    border: 1px solid var(--ch-slate-200);
    text-transform: none;
    font-size: 0.75rem;
    letter-spacing: 0;
}

/* ── Forms ── */
.form-control,
.form-select {
    border: 1px solid var(--ch-slate-200);
    border-radius: 0.625rem;
    padding: 0.5625rem 0.875rem;
    font-size: 0.875rem;
    color: var(--ch-slate-800);
    background-color: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--ch-primary-light);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-control::placeholder {
    color: var(--ch-slate-400);
}

.form-label {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--ch-slate-700);
    margin-bottom: var(--ch-space-2);
}

.input-group-text {
    border-color: var(--ch-slate-200);
    background: var(--ch-slate-50);
    color: var(--ch-slate-500);
    border-radius: 0.625rem;
}

.input-group > .form-control:first-child,
.input-group > .input-group-text:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group > .form-control:last-child,
.input-group > .input-group-text:last-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* ── Alerts ── */
.alert {
    border: none;
    border-radius: var(--ch-radius);
    font-size: 0.875rem;
    font-weight: 500;
    padding: var(--ch-space-3) var(--ch-space-4);
    margin-bottom: var(--ch-space-4);
}

.alert:last-child {
    margin-bottom: 0;
}

.alert > :last-child {
    margin-bottom: 0;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
    border-left: 4px solid #10b981;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.08);
    color: #b91c1c;
    border-left: 4px solid #ef4444;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
    border-left: 4px solid #f59e0b;
}

.alert-info {
    background: rgba(99, 102, 241, 0.08);
    color: #4338ca;
    border-left: 4px solid var(--ch-primary);
}

/* ── Nav tabs & pills ── */
.nav-tabs {
    border-bottom-color: var(--ch-slate-200);
    gap: 0.25rem;
}

.nav-tabs .nav-link {
    border: none;
    border-radius: 0.5rem 0.5rem 0 0;
    color: var(--ch-slate-500);
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.625rem 1rem;
}

.nav-tabs .nav-link:hover {
    color: var(--ch-primary);
    background: rgba(99, 102, 241, 0.05);
}

.nav-tabs .nav-link.active {
    color: var(--ch-primary);
    background: #fff;
    border-bottom: 2px solid var(--ch-primary);
}

.nav-pills .nav-link {
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
}

/* ── Pagination ── */
.pagination {
    gap: 0.25rem;
}

.page-link {
    border: 1px solid var(--ch-slate-200);
    border-radius: 0.5rem !important;
    color: var(--ch-slate-600);
    font-weight: 600;
    font-size: 0.8125rem;
    padding: 0.375rem 0.75rem;
    margin: 0 1px;
}

.page-link:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
    color: var(--ch-primary);
}

.page-item.active .page-link {
    background: var(--ch-primary);
    border-color: var(--ch-primary);
}

/* ── Breadcrumb ── */
.breadcrumb {
    font-size: 0.8125rem;
    margin-bottom: var(--ch-space-1);
    padding: 0;
}

.breadcrumb-item a {
    color: var(--ch-slate-500);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--ch-primary);
}

.breadcrumb-item.active {
    color: var(--ch-slate-700);
    font-weight: 600;
}

/* ── Progress bars ── */
.progress {
    height: 0.5rem;
    border-radius: 9999px;
    background: var(--ch-slate-100);
}

.progress-bar {
    border-radius: 9999px;
    background: linear-gradient(90deg, var(--ch-primary), var(--ch-accent));
}

/* ── Display numbers ── */
.display-6 {
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--ch-slate-900);
}

/* ── List groups ── */
.list-group-item {
    border-color: var(--ch-slate-100);
    padding: 0.875rem 1.25rem;
    font-size: 0.875rem;
}

.list-group-item-action:hover {
    background: rgba(99, 102, 241, 0.04);
}

/* ── Modals ── */
.modal-content {
    border: none;
    border-radius: var(--ch-radius-xl);
    box-shadow: var(--ch-shadow-lg);
}

.modal-header {
    border-bottom-color: var(--ch-slate-100);
    padding: 1.25rem 1.5rem;
}

.modal-footer {
    border-top-color: var(--ch-slate-100);
    padding: 1rem 1.5rem;
}

/* ── Dropdowns ── */
.dropdown-menu {
    border: 1px solid var(--ch-slate-200);
    border-radius: var(--ch-radius);
    box-shadow: var(--ch-shadow-lg);
    padding: 0.375rem;
}

.dropdown-item {
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
}

.dropdown-item:hover {
    background: rgba(99, 102, 241, 0.08);
    color: var(--ch-primary-dark);
}

/* ── Empty states ── */
.ch-empty-state {
    text-align: center;
    padding: var(--ch-space-8) var(--ch-space-6);
    color: var(--ch-slate-400);
}

.ch-empty-state i {
    font-size: 2.5rem;
    opacity: 0.4;
    margin-bottom: var(--ch-space-3);
    display: block;
}

.ch-empty-state p {
    margin-bottom: 0;
}

.ch-empty-state.py-4 {
    padding-top: var(--ch-space-6) !important;
    padding-bottom: var(--ch-space-6) !important;
}

/* ── Page header toolbar ── */
.ch-page-toolbar {
    background: #fff;
    border: 1px solid var(--ch-slate-200);
    border-radius: var(--ch-radius-lg);
    padding: var(--ch-space-4) var(--ch-space-5);
    margin-bottom: var(--ch-space-5);
    box-shadow: var(--ch-shadow-sm);
}

/* ── Spacing rhythm (app shell) ── */
.changehub-main > .alert:not(:last-child),
.changehub-main > .card:not(:last-child),
.changehub-main > .ch-page-toolbar:not(:last-child) {
    margin-bottom: var(--ch-space-4);
}

.changehub-main > .row.g-3:not(:last-child) {
    margin-bottom: var(--ch-space-5);
}

.changehub-main .mb-1 { margin-bottom: var(--ch-space-1) !important; }
.changehub-main .mb-2 { margin-bottom: var(--ch-space-2) !important; }
.changehub-main .mb-3 { margin-bottom: var(--ch-space-4) !important; }
.changehub-main .mb-4 { margin-bottom: var(--ch-space-5) !important; }
.changehub-main .mt-1 { margin-top: var(--ch-space-1) !important; }
.changehub-main .mt-2 { margin-top: var(--ch-space-2) !important; }
.changehub-main .mt-3 { margin-top: var(--ch-space-4) !important; }
.changehub-main .gap-2 { gap: var(--ch-space-2) !important; }
.changehub-main .gap-3 { gap: var(--ch-space-4) !important; }

/* ── List pages (tables, toolbars) ── */
.ch-page-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--ch-space-3);
}

.ch-page-toolbar form .form-control,
.ch-page-toolbar form .form-select,
.ch-page-toolbar > .btn,
.ch-page-toolbar form .btn {
    min-height: 2.375rem;
}

.ch-page-toolbar > .btn,
.ch-page-toolbar form .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.table td code,
.ch-ref-no {
    white-space: nowrap;
    font-family: var(--ch-font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ch-primary-dark);
    background: rgba(99, 102, 241, 0.08);
    padding: 0.2em 0.5em;
    border-radius: 0.375rem;
    display: inline-block;
    vertical-align: middle;
}

.table .badge {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
}

.table > :not(caption) > * > * {
    vertical-align: middle;
}

.table th.text-end,
.table td.text-end {
    text-align: right;
}

/* ── Status strip on ticket detail ── */
.border-warning {
    border-color: rgba(245, 158, 11, 0.5) !important;
}

.border-success {
    border-color: rgba(16, 185, 129, 0.4) !important;
}

/* ── Scrollbar (main content) ── */
.changehub-main::-webkit-scrollbar {
    width: 8px;
}

.changehub-main::-webkit-scrollbar-thumb {
    background: var(--ch-slate-300);
    border-radius: 4px;
}

/* ── Auth page ── */
.ch-auth-body {
    background: var(--ch-slate-950) !important;
}

.ch-auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    background: var(--ch-slate-950);
    overflow: hidden;
}

.ch-auth-brand-panel {
    flex: 1.05;
    display: none;
    position: relative;
    background: linear-gradient(145deg, #020617 0%, #1e1b4b 42%, #0f766e 100%);
    padding: clamp(2rem, 4vw, 4rem);
    overflow: hidden;
}

@media (min-width: 992px) {
    .ch-auth-brand-panel {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

.ch-auth-brand-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 70% at 30% 40%, #000 20%, transparent 75%);
    pointer-events: none;
}

.ch-auth-brand-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 55% 45% at 15% 85%, rgba(99, 102, 241, 0.35), transparent 60%),
        radial-gradient(ellipse 45% 35% at 85% 15%, rgba(45, 212, 191, 0.28), transparent 55%),
        radial-gradient(ellipse 30% 25% at 60% 60%, rgba(129, 140, 248, 0.15), transparent 50%);
    pointer-events: none;
}

.ch-auth-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.55;
    pointer-events: none;
    animation: chAuthOrbFloat 14s ease-in-out infinite;
}

.ch-auth-orb--1 {
    width: 280px;
    height: 280px;
    background: rgba(99, 102, 241, 0.45);
    top: 8%;
    right: 10%;
}

.ch-auth-orb--2 {
    width: 220px;
    height: 220px;
    background: rgba(20, 184, 166, 0.35);
    bottom: 12%;
    left: 8%;
    animation-delay: -6s;
}

@keyframes chAuthOrbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(12px, -18px) scale(1.06); }
}

.ch-auth-brand-content {
    position: relative;
    z-index: 1;
    max-width: 32rem;
}

.ch-auth-brand-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.ch-auth-logo-wrap {
    position: relative;
    flex-shrink: 0;
}

.ch-auth-logo-wrap::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.5), rgba(45, 212, 191, 0.35));
    filter: blur(12px);
    opacity: 0.7;
    z-index: 0;
}

.ch-auth-logo-wrap--sm::before {
    inset: -4px;
    border-radius: 16px;
}

.ch-auth-logo {
    position: relative;
    z-index: 1;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.ch-auth-logo-wrap--sm .ch-auth-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
}

.ch-auth-product {
    font-size: 1.125rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.ch-auth-product--dark {
    color: var(--ch-slate-900);
}

.ch-auth-product-tag {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
    margin-top: 0.125rem;
}

.ch-auth-product-tag--dark {
    color: var(--ch-slate-500);
}

.ch-auth-lead {
    color: rgba(255, 255, 255, 0.72);
    font-size: 1.0625rem;
    line-height: 1.65;
    margin: 1.25rem 0 0;
    max-width: 26rem;
}

.ch-auth-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin-top: 2.5rem;
}

.ch-auth-trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

.ch-auth-trust-pill i {
    color: var(--ch-accent);
    font-size: 0.875rem;
}

.ch-auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.25rem, 3vw, 2.5rem);
    position: relative;
    background: var(--ch-slate-50);
}

.ch-auth-form-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 100% 0%, rgba(99, 102, 241, 0.08), transparent 42%),
        radial-gradient(circle at 0% 100%, rgba(20, 184, 166, 0.06), transparent 38%);
    pointer-events: none;
}

.ch-auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 1.5rem;
    padding: clamp(1.75rem, 4vw, 2.75rem);
    box-shadow:
        0 0 0 1px rgba(15, 23, 42, 0.04),
        0 24px 48px -12px rgba(15, 23, 42, 0.12),
        0 8px 16px -8px rgba(99, 102, 241, 0.08);
}

.ch-auth-mobile-brand {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--ch-slate-100);
}

.ch-auth-card-head {
    margin-bottom: 1.75rem;
}

.ch-auth-title {
    font-size: 1.625rem;
    font-weight: 800;
    color: var(--ch-slate-900);
    letter-spacing: -0.035em;
    margin-bottom: 0.35rem;
}

.ch-auth-subtitle {
    color: var(--ch-slate-500);
    font-size: 0.9375rem;
    margin: 0;
}

.ch-auth-tagline {
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.04em;
    line-height: 1.15;
    margin: 0;
}

.ch-auth-tagline span {
    background: linear-gradient(135deg, #a5b4fc, #5eead4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ch-auth-features {
    list-style: none;
    padding: 0;
    margin: 2.25rem 0 0;
}

.ch-auth-features li {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.ch-auth-feature-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.625rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.ch-auth-feature-icon i {
    color: #5eead4;
    font-size: 1rem;
}

.ch-auth-field {
    margin-bottom: 1.25rem;
}

.ch-auth-field .form-label {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--ch-slate-700);
    letter-spacing: -0.01em;
    margin-bottom: 0.45rem;
}

.ch-auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1.5px solid var(--ch-slate-200);
    border-radius: 0.875rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.ch-auth-input-wrap:focus-within {
    border-color: var(--ch-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.ch-auth-input-wrap.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.ch-auth-input-icon {
    position: absolute;
    left: 1rem;
    color: var(--ch-slate-400);
    font-size: 1rem;
    pointer-events: none;
    transition: color 0.2s ease;
}

.ch-auth-input-wrap:focus-within .ch-auth-input-icon {
    color: var(--ch-primary);
}

.ch-auth-input {
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0.8rem 1rem 0.8rem 2.75rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--ch-slate-800);
}

.ch-auth-input::placeholder {
    color: var(--ch-slate-400);
    font-weight: 400;
}

.ch-auth-input-wrap .ch-auth-input {
    padding-right: 2.75rem;
}

.ch-auth-toggle-pw {
    position: absolute;
    right: 0.5rem;
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    background: transparent;
    border-radius: 0.5rem;
    color: var(--ch-slate-400);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, background 0.15s ease;
}

.ch-auth-toggle-pw:hover {
    color: var(--ch-slate-700);
    background: var(--ch-slate-100);
}

.ch-auth-field-error {
    margin-top: 0.4rem;
    font-size: 0.8125rem;
    color: #dc2626;
    font-weight: 500;
}

.ch-auth-link {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ch-primary);
    text-decoration: none;
}

.ch-auth-link:hover {
    color: var(--ch-primary-dark);
    text-decoration: underline;
}

.ch-auth-remember .form-check-label {
    font-size: 0.875rem;
    color: var(--ch-slate-600);
    font-weight: 500;
}

.ch-auth-remember .form-check-input:checked {
    background-color: var(--ch-primary);
    border-color: var(--ch-primary);
}

.ch-auth-submit {
    padding: 0.85rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 700;
    border: 0;
    border-radius: 0.875rem;
    background: linear-gradient(135deg, var(--ch-primary) 0%, #7c3aed 100%);
    box-shadow: 0 10px 24px -8px rgba(99, 102, 241, 0.55);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.ch-auth-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px -8px rgba(99, 102, 241, 0.6);
    background: linear-gradient(135deg, var(--ch-primary-dark) 0%, #6d28d9 100%);
}

.ch-auth-submit:active:not(:disabled) {
    transform: translateY(0);
}

.ch-auth-submit:disabled {
    opacity: 0.85;
}

.ch-auth-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--ch-slate-100);
    text-align: center;
}

.ch-auth-secure-note {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ch-slate-500);
    margin-bottom: 0.75rem;
}

.ch-auth-secure-note i {
    color: var(--ch-accent-dark);
}

.ch-auth-copy {
    font-size: 0.75rem;
    color: var(--ch-slate-400);
}

.ch-auth-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ch-slate-500);
    text-decoration: none;
    margin-bottom: 1.25rem;
    transition: color 0.15s ease;
}

.ch-auth-back:hover {
    color: var(--ch-primary);
}

.ch-auth-info {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.875rem 1rem;
    margin-bottom: 1.5rem;
    border-radius: 0.875rem;
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.12);
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--ch-slate-600);
}

.ch-auth-info i {
    color: var(--ch-primary);
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

@media (max-width: 991.98px) {
    .ch-auth-form-panel {
        background: linear-gradient(180deg, var(--ch-slate-50) 0%, #eef2ff 100%);
        min-height: 100vh;
        min-height: 100dvh;
    }

    .ch-auth-card {
        box-shadow: 0 16px 40px -16px rgba(15, 23, 42, 0.15);
    }
}

/* ── Toast notifications ── */
.changehub-toast-stack {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1090;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: min(420px, calc(100vw - 2rem));
    pointer-events: none;
}

.changehub-toast {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1rem 1rem 1rem 1.125rem;
    background: #fff;
    border: 1px solid var(--ch-slate-200);
    border-radius: var(--ch-radius-lg);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12), 0 4px 8px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    pointer-events: auto;
    opacity: 0;
    transform: translateX(1.25rem) scale(0.96);
    transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.changehub-toast.is-visible {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.changehub-toast.is-leaving {
    opacity: 0;
    transform: translateX(1rem) scale(0.98);
}

.changehub-toast__icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.625rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.125rem;
}

.changehub-toast--success .changehub-toast__icon {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.changehub-toast--error .changehub-toast__icon {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.changehub-toast--warning .changehub-toast__icon {
    background: rgba(245, 158, 11, 0.14);
    color: #d97706;
}

.changehub-toast--info .changehub-toast__icon {
    background: rgba(99, 102, 241, 0.12);
    color: #4f46e5;
}

.changehub-toast__body {
    flex: 1;
    min-width: 0;
    padding-right: 1.5rem;
}

.changehub-toast__title {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--ch-slate-900);
    letter-spacing: -0.02em;
    margin-bottom: 0.15rem;
}

.changehub-toast__message {
    font-size: 0.8125rem;
    color: var(--ch-slate-600);
    line-height: 1.45;
}

.changehub-toast__list {
    margin: 0.5rem 0 0;
    padding-left: 1.125rem;
    font-size: 0.8125rem;
    color: var(--ch-slate-600);
}

.changehub-toast__list li {
    margin-bottom: 0.2rem;
}

.changehub-toast__close {
    position: absolute;
    top: 0.625rem;
    right: 0.625rem;
    width: 1.75rem;
    height: 1.75rem;
    border: none;
    background: transparent;
    border-radius: 0.5rem;
    color: var(--ch-slate-400);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.changehub-toast__close:hover {
    background: var(--ch-slate-100);
    color: var(--ch-slate-700);
}

.changehub-toast__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    transform-origin: left;
    animation: changehub-toast-progress linear forwards;
}

.changehub-toast--success .changehub-toast__progress { background: #10b981; }
.changehub-toast--error .changehub-toast__progress { background: #ef4444; }
.changehub-toast--warning .changehub-toast__progress { background: #f59e0b; }
.changehub-toast--info .changehub-toast__progress { background: var(--ch-primary); }

@keyframes changehub-toast-progress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

/* ── Notification feed (inbox page) ── */
.ch-notif-item {
    display: flex;
    gap: 1rem;
    padding: 1.125rem 1.25rem;
    border-bottom: 1px solid var(--ch-slate-100);
    transition: background 0.15s ease;
}

.ch-notif-item:last-child {
    border-bottom: none;
}

.ch-notif-item:hover {
    background: rgba(99, 102, 241, 0.03);
}

.ch-notif-item.is-unread {
    background: rgba(99, 102, 241, 0.04);
}

.ch-notif-item__icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.125rem;
    background: var(--ch-slate-100);
    color: var(--ch-slate-500);
}

.ch-notif-item.is-unread .ch-notif-item__icon {
    background: rgba(99, 102, 241, 0.12);
    color: var(--ch-primary);
}

.ch-notif-item__content {
    flex: 1;
    min-width: 0;
}

.ch-notif-item__title {
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--ch-slate-900);
    margin-bottom: 0.25rem;
}

.ch-notif-item__message {
    font-size: 0.875rem;
    color: var(--ch-slate-600);
    line-height: 1.45;
    margin-bottom: 0.5rem;
}

.ch-notif-item__meta {
    font-size: 0.75rem;
    color: var(--ch-slate-400);
}

.ch-notif-unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ch-primary);
    flex-shrink: 0;
    margin-top: 0.5rem;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}
