/* PosPoint Analytics - custom styles */

html, body { height: 100%; }
body {
    font-feature-settings: "cv11", "ss01";
    -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; border: 2px solid transparent; background-clip: padding-box; }

/* Card shadow */
.card {
    background: #ffffff;
    border: 1px solid #eef2f7;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

/* Subtle fade-in for tab content */
.fade-in { animation: fadeIn 220ms ease-out both; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Segmented control */
.seg-btn {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    transition: all .15s ease;
}
.seg-btn[data-active="true"] {
    background: #fff;
    color: #111827;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
}

/* Table */
.tbl th {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #64748b;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid #eef2f7;
    background: #f8fafc;
}
.tbl td {
    padding: 12px;
    font-size: 14px;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
}
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: #fafbfc; }

/* Input */
.fld {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #0f172a;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.fld:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .15);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all .15s ease;
    cursor: pointer;
}
.btn-primary { background: #4f46e5; color: #fff; }
.btn-primary:hover { background: #4338ca; }
.btn-ghost { background: transparent; color: #475569; border: 1px solid #e2e8f0; }
.btn-ghost:hover { background: #f8fafc; }
.btn-danger { background: #fee2e2; color: #b91c1c; }
.btn-danger:hover { background: #fecaca; }

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 999px;
    line-height: 1.2;
}
.badge-green { background: #d1fae5; color: #047857; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-red { background: #fee2e2; color: #b91c1c; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-gray { background: #f1f5f9; color: #475569; }
.badge-purple { background: #ede9fe; color: #6d28d9; }

/* Modal */
.modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, .5);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    z-index: 50;
    animation: fadeIn .18s ease-out;
    padding: 16px;
}
.modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .25);
    animation: modalUp .25s ease-out;
}
@keyframes modalUp {
    from { opacity: 0; transform: translateY(10px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Heat cells for cohort retention */
.heat { border-radius: 6px; padding: 6px 0; text-align: center; font-size: 12px; font-weight: 500; color: #fff; }

/* Icon */
.icon { width: 18px; height: 18px; flex-shrink: 0; }
.icon-sm { width: 16px; height: 16px; flex-shrink: 0; }

/* Navigation item */
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s ease;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
}
.nav-item:hover { background: #f1f5f9; color: #1e293b; }
.nav-item[data-active="true"] {
    background: #eef2ff;
    color: #4338ca;
}
.nav-item[data-active="true"] .icon { color: #4f46e5; }
