/* CRM-2026 — custom styles layered on Bootstrap 5 */

html, body { height: 100%; }
body { background: #f5f6fa; }

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    flex: 0 0 240px;
    min-height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
}

.sidebar-nav .nav-link {
    border-radius: 6px;
    margin-bottom: 2px;
    transition: background 0.15s;
}

.sidebar-nav .nav-link:hover {
    background: rgba(255,255,255,0.08);
}

.sidebar-nav .nav-link.active {
    background: rgba(255,255,255,0.18);
    font-weight: 600;
}

.main-area {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 0; /* allow table overflow inside */
}

.page-content {
    flex: 1 1 auto;
}

@media (max-width: 767.98px) {
    .sidebar {
        position: fixed;
        z-index: 1040;
        left: -260px;
        transition: left 0.2s ease;
    }
    .sidebar.show {
        left: 0;
    }
}

/* Login screen — legacy classes (portal login still uses these) */
.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
}
.login-card {
    max-width: 420px;
    width: 100%;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    padding: 2rem;
}

/* Two-card audience-picker login (v3) */
.login-shell-v3 {
    background: #f4f6fa;
    min-height: 100vh;
}
.login-cards .login-pick-card {
    border: 1px solid #e6e9ef;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(20, 30, 60, 0.05);
    transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.login-cards .login-pick-card:hover {
    box-shadow: 0 10px 26px rgba(20, 30, 60, 0.10);
    transform: translateY(-1px);
}
.login-pick-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.login-pick-icon-staff    { background: #e7f0ff; color: #0d6efd; }
.login-pick-icon-customer { background: #def7f3; color: #0aa697; }

/* SLA badge */
.sla-badge { font-size: 0.78rem; }

/* Kanban */
.kanban-board { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 1rem; }
.kanban-col { min-width: 260px; max-width: 260px; background: #ecedf1; border-radius: 8px; padding: 0.5rem; }
.kanban-col h6 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; margin: 0.25rem 0 0.5rem; }
.kanban-card { background: #fff; border-radius: 6px; padding: 0.6rem 0.75rem; margin-bottom: 0.5rem; box-shadow: 0 1px 2px rgba(0,0,0,0.06); cursor: grab; font-size: 0.9rem; }
.kanban-card:active { cursor: grabbing; }
.kanban-card .deal-value { font-weight: 600; color: #198754; }

/* Timeline */
.timeline { border-left: 2px solid #dee2e6; padding-left: 1rem; margin-left: 0.5rem; }
.timeline-item { position: relative; padding-bottom: 1rem; }
.timeline-item::before {
    content: ''; position: absolute; left: -1.42rem; top: 0.3rem;
    width: 10px; height: 10px; border-radius: 50%;
    background: #0d6efd; border: 2px solid #fff;
}
