/* =====================================================================
   BUDDYINFOTECH ADMISSION CRM - BRAND THEME
   Colours taken from the Buddyinfotech logo:
   Blue #0B6CFF / Cyan #19C3FF / Purple #8A2BE2 / Red #FF3D1F / Orange #FF8A00 / Navy #1E2345
   ===================================================================== */
:root {
    --bi-blue: #0B6CFF;
    --bi-blue-dark: #0A52CC;
    --bi-cyan: #19C3FF;
    --bi-purple: #8A2BE2;
    --bi-red: #FF3D1F;
    --bi-orange: #FF8A00;
    --bi-amber: #FFB020;
    --bi-navy: #1E2345;
    --bi-ink: #2B3252;
    --bi-muted: #8087a3;
    --bi-bg: #F4F7FC;
    --bi-border: #E6EAF4;
    --bi-gradient: linear-gradient(90deg, #0B6CFF 0%, #8A2BE2 38%, #FF3D1F 70%, #FF8A00 100%);
    --bi-gradient-blue: linear-gradient(135deg, #0B6CFF 0%, #19C3FF 100%);

    --bs-primary: #0B6CFF;
    --bs-primary-rgb: 11, 108, 255;
    --bs-link-color: #0B6CFF;
    --bs-link-color-rgb: 11, 108, 255;
    --bs-link-hover-color: #0A52CC;
    --bs-body-font-family: 'Poppins', 'Segoe UI', system-ui, sans-serif;
    --bs-body-color: #2B3252;
    --bs-border-radius: 0.6rem;
}

body {
    font-family: 'Poppins', 'Segoe UI', system-ui, sans-serif;
    background: var(--bi-bg);
    color: var(--bi-ink);
    font-size: 0.92rem;
}
h1, h2, h3, h4, h5, h6 { color: var(--bi-navy); font-weight: 600; }
a { text-decoration: none; }

/* ---------- Layout ---------- */
.wrapper { display: flex; width: 100%; align-items: stretch; }
#content { width: 100%; min-width: 0; min-height: 100vh; transition: all 0.3s; display: flex; flex-direction: column; }
.page-body { padding: 22px 24px; flex: 1; }

/* ---------- Sidebar (light, Meritto style) ---------- */
.sidebar {
    min-width: 268px; max-width: 268px;
    background: #fff;
    color: var(--bi-ink);
    min-height: 100vh;
    border-right: 1px solid var(--bi-border);
    transition: all 0.3s;
    position: sticky; top: 0; align-self: flex-start;
    height: 100vh; overflow-y: auto;
}
.sidebar.active { margin-left: -268px; }
.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-thumb { background: #d5dbea; border-radius: 10px; }
.sidebar .sidebar-header {
    padding: 16px 18px 12px;
    text-align: center;
    border-bottom: 1px solid var(--bi-border);
    position: relative;
}
.sidebar .sidebar-header::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--bi-gradient);
}
.sidebar .sidebar-header img { max-height: 46px; max-width: 100%; object-fit: contain; }
.sidebar .sidebar-header .inst-name { font-size: 0.78rem; color: var(--bi-muted); margin-top: 6px; font-weight: 500; }
.sidebar ul.components { padding: 12px 10px 20px; margin: 0; }
.sidebar ul li a.nav-item-link {
    padding: 9px 14px; margin: 2px 0;
    display: flex; align-items: center; gap: 10px;
    color: #4a5270; font-size: 0.88rem; font-weight: 500;
    border-radius: 10px; transition: 0.18s;
}
.sidebar ul li a.nav-item-link i { width: 20px; text-align: center; color: #98a1bd; font-size: 0.95rem; transition: 0.18s; }
.sidebar ul li a.nav-item-link:hover { background: rgba(11,108,255,0.08); color: var(--bi-blue); }
.sidebar ul li a.nav-item-link:hover i { color: var(--bi-blue); }
.sidebar ul li a.nav-item-link.active {
    background: var(--bi-gradient-blue); color: #fff;
    box-shadow: 0 6px 14px rgba(11,108,255,0.28);
}
.sidebar ul li a.nav-item-link.active i { color: #fff; }

.sidebar .nav-group-toggle {
    width: 100%; background: none; border: 0; text-align: left;
    padding: 9px 14px; margin: 2px 0; border-radius: 10px;
    display: flex; align-items: center; gap: 10px;
    color: var(--bi-navy); font-size: 0.86rem; font-weight: 600;
}
.sidebar .nav-group-toggle i.grp-icon { width: 20px; text-align: center; color: var(--bi-orange); }
.sidebar .nav-group-toggle .chev { margin-left: auto; font-size: 0.7rem; color: #98a1bd; transition: transform .2s; }
.sidebar .nav-group-toggle:not(.collapsed) .chev { transform: rotate(180deg); }
.sidebar .nav-group-toggle:hover { background: #f3f6fd; }
.sidebar .nav-group-body { padding-left: 14px; border-left: 2px solid #eef1f9; margin-left: 20px; }
.sidebar .nav-group-body a.nav-item-link { font-size: 0.84rem; padding: 7px 12px; }
.sidebar .nav-logout a { color: var(--bi-red) !important; }
.sidebar .nav-logout a i { color: var(--bi-red) !important; }

/* ---------- Top navbar ---------- */
.top-navbar {
    background: #fff; padding: 10px 0; position: sticky; top: 0; z-index: 50;
    box-shadow: 0 2px 10px rgba(30,35,69,0.05);
}
.top-navbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--bi-gradient); }
.top-search { position: relative; max-width: 380px; width: 100%; }
.top-search input {
    border-radius: 30px; border: 1px solid var(--bi-border); background: #f6f8fd;
    padding: 8px 16px 8px 38px; font-size: 0.86rem; width: 100%;
}
.top-search input:focus { background: #fff; border-color: var(--bi-blue); outline: 0; box-shadow: 0 0 0 3px rgba(11,108,255,0.12); }
.top-search i { position: absolute; left: 14px; top: 11px; color: var(--bi-muted); font-size: 0.85rem; }
.user-chip { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.user-chip .avatar {
    width: 34px; height: 34px; border-radius: 50%; background: var(--bi-gradient-blue);
    color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.85rem;
}
.notif-btn { position: relative; border: 0; background: #f3f6fd; width: 38px; height: 38px; border-radius: 50%; color: var(--bi-navy); }
.notif-btn .dot {
    position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 10px;
    background: var(--bi-red); color: #fff; font-size: 0.66rem; line-height: 18px; text-align: center; font-weight: 600;
}

/* ---------- Cards / stat cards ---------- */
.card { border: 1px solid var(--bi-border); border-radius: 14px; box-shadow: 0 2px 12px rgba(30,35,69,0.04); background: #fff; }
.card-header { background: #fff; border-bottom: 1px solid var(--bi-border); border-radius: 14px 14px 0 0 !important; }
.stat-card { border-radius: 16px; color: #fff; padding: 20px; position: relative; overflow: hidden; box-shadow: 0 8px 20px rgba(30,35,69,0.12); }
.stat-card::after {
    content: ''; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px;
    border-radius: 50%; background: rgba(255,255,255,0.15);
}
.stat-card h3 { font-size: 1.8rem; margin: 0; color: #fff; }
.stat-card p { margin: 0; opacity: 0.92; font-size: 0.85rem; }
.bg-purple { background: linear-gradient(135deg, #0B6CFF, #8A2BE2); }
.bg-green  { background: linear-gradient(135deg, #19C3FF, #0B6CFF); }
.bg-orange { background: linear-gradient(135deg, #FF8A00, #FFB020); }
.bg-pink   { background: linear-gradient(135deg, #FF3D1F, #FF8A00); }

.kpi-card { background: #fff; border: 1px solid var(--bi-border); border-radius: 14px; padding: 16px 18px; display: flex; align-items: center; gap: 14px; height: 100%; }
.kpi-card .kpi-icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.15rem; flex-shrink: 0; }
.kpi-card .kpi-val { font-size: 1.45rem; font-weight: 700; color: var(--bi-navy); line-height: 1.1; }
.kpi-card .kpi-lbl { font-size: 0.78rem; color: var(--bi-muted); margin-top: 2px; }
.ic-blue { background: var(--bi-gradient-blue); }
.ic-purple { background: linear-gradient(135deg, #8A2BE2, #0B6CFF); }
.ic-orange { background: linear-gradient(135deg, #FF8A00, #FFB020); }
.ic-red { background: linear-gradient(135deg, #FF3D1F, #FF8A00); }
.ic-green { background: linear-gradient(135deg, #12B76A, #4BD58B); }

/* ---------- Buttons ---------- */
.btn { border-radius: 9px; font-weight: 500; }
.btn-primary {
    --bs-btn-bg: #0B6CFF; --bs-btn-border-color: #0B6CFF;
    --bs-btn-hover-bg: #0A52CC; --bs-btn-hover-border-color: #0A52CC;
    --bs-btn-active-bg: #0A52CC; --bs-btn-active-border-color: #0A52CC;
    --bs-btn-disabled-bg: #0B6CFF; --bs-btn-disabled-border-color: #0B6CFF;
    box-shadow: 0 4px 10px rgba(11,108,255,0.22);
}
.btn-outline-primary { --bs-btn-color: #0B6CFF; --bs-btn-border-color: #0B6CFF; --bs-btn-hover-bg: #0B6CFF; --bs-btn-hover-border-color: #0B6CFF; --bs-btn-active-bg: #0B6CFF; }
.btn-warning { --bs-btn-bg: #FF8A00; --bs-btn-border-color: #FF8A00; --bs-btn-color: #fff; --bs-btn-hover-bg: #e57c00; --bs-btn-hover-border-color: #e57c00; --bs-btn-hover-color: #fff; --bs-btn-active-bg: #e57c00; --bs-btn-active-color: #fff; }
.btn-danger { --bs-btn-bg: #FF3D1F; --bs-btn-border-color: #FF3D1F; --bs-btn-hover-bg: #e0310f; --bs-btn-hover-border-color: #e0310f; --bs-btn-active-bg: #e0310f; }
.btn-info { --bs-btn-bg: #19C3FF; --bs-btn-border-color: #19C3FF; --bs-btn-color: #fff; --bs-btn-hover-bg: #0fb0e8; --bs-btn-hover-border-color: #0fb0e8; --bs-btn-hover-color: #fff; }
.btn-dark { --bs-btn-bg: #1E2345; --bs-btn-border-color: #1E2345; --bs-btn-hover-bg: #12162c; }
.btn-brand { background: var(--bi-gradient); color: #fff; border: 0; }
.btn-brand:hover { color: #fff; opacity: 0.92; }
.text-primary { color: var(--bi-blue) !important; }
.bg-primary { background-color: var(--bi-blue) !important; }
.badge.bg-info { background-color: var(--bi-cyan) !important; color: #fff; }
.badge.bg-warning { background-color: var(--bi-orange) !important; color: #fff !important; }
.badge.bg-danger { background-color: var(--bi-red) !important; }
.badge.bg-secondary { background-color: #8b93b0 !important; }
.badge { font-weight: 500; }

.form-control, .form-select { border-radius: 9px; border-color: #dde2f0; }
.form-control:focus, .form-select:focus { border-color: var(--bi-blue); box-shadow: 0 0 0 3px rgba(11,108,255,0.13); }
.form-check-input:checked { background-color: var(--bi-blue); border-color: var(--bi-blue); }
.nav-pills .nav-link.active { background: var(--bi-gradient-blue); }
.nav-pills .nav-link { color: var(--bi-ink); border-radius: 10px; }
.nav-tabs .nav-link.active { color: var(--bi-blue); border-bottom: 3px solid var(--bi-blue); font-weight: 600; }
.nav-tabs .nav-link { color: var(--bi-muted); }
.modal-content { border-radius: 16px; border: 0; }
.modal-header { border-bottom: 1px solid var(--bi-border); }
.alert { border-radius: 12px; border: 0; }
.alert-info { background: #e8f3ff; color: #0a4fb3; }

/* ---------- Tables ---------- */
.table { --bs-table-hover-bg: #f6f9ff; }
.table thead th {
    background: var(--bi-navy) !important; color: #fff !important; font-weight: 500;
    font-size: 0.8rem; text-transform: uppercase; letter-spacing: .4px; border: 0; white-space: nowrap;
}
.table thead th:first-child { border-top-left-radius: 10px; }
.table thead th:last-child { border-top-right-radius: 10px; }
.table > :not(caption) > * > * { padding: 0.65rem 0.75rem; vertical-align: middle; }
.table-bordered > :not(caption) > * { border-color: var(--bi-border); }

/* ---------- Status / score badges ---------- */
.st { display: inline-block; white-space: nowrap; padding: 4px 10px; border-radius: 20px; font-size: 0.72rem; font-weight: 600; text-transform: capitalize; }
.st-new { background: #e3eeff; color: #0B6CFF; }
.st-contacted { background: #dff6ff; color: #0a9ccc; }
.st-interested { background: #fff0db; color: #d97600; }
.st-not_interested { background: #eceef5; color: #6b7391; }
.st-converted { background: #dcf7e8; color: #0e9a57; }
.st-dropped { background: #ffe5e0; color: #d9300f; }
.score-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 20px; font-size: 0.72rem; font-weight: 600; color: #fff; }
.score-hot { background: linear-gradient(135deg, #FF3D1F, #FF8A00); }
.score-warm { background: linear-gradient(135deg, #FF8A00, #FFB020); }
.score-cold { background: linear-gradient(135deg, #19C3FF, #0B6CFF); }
.src-pill { background: #f1f4fb; color: var(--bi-ink); border-radius: 6px; padding: 2px 8px; font-size: 0.72rem; font-weight: 500; }

/* ---------- Kanban pipeline ---------- */
.kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.kanban-col { background: #eef2fa; border-radius: 14px; min-width: 285px; width: 285px; flex-shrink: 0; display: flex; flex-direction: column; max-height: calc(100vh - 230px); }
.kanban-col-head { padding: 12px 14px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; border-radius: 14px 14px 0 0; color: var(--bi-navy); border-top: 4px solid var(--c, var(--bi-blue)); background: #fff; }
.kanban-col-head .cnt { background: var(--c, var(--bi-blue)); color: #fff; border-radius: 20px; padding: 1px 10px; font-size: 0.75rem; }
.kanban-list { padding: 10px; overflow-y: auto; min-height: 90px; flex: 1; }
.kanban-list.drag-over { background: rgba(11,108,255,0.08); outline: 2px dashed var(--bi-blue); outline-offset: -6px; border-radius: 0 0 14px 14px; }
.kcard { background: #fff; border-radius: 12px; padding: 12px; margin-bottom: 10px; border: 1px solid var(--bi-border); cursor: grab; box-shadow: 0 2px 6px rgba(30,35,69,0.05); }
.kcard:active { cursor: grabbing; }
.kcard.dragging { opacity: 0.45; }
.kcard .k-name { font-weight: 600; color: var(--bi-navy); }
.kcard .k-meta { font-size: 0.78rem; color: var(--bi-muted); }
.kcard .k-actions a { color: var(--bi-muted); margin-right: 10px; font-size: 0.85rem; }
.kcard .k-actions a:hover { color: var(--bi-blue); }
.k-avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--bi-gradient-blue); color: #fff; font-size: 0.68rem; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }

/* ---------- Lead timeline ---------- */
.timeline { position: relative; padding-left: 30px; }
.timeline::before { content: ''; position: absolute; left: 11px; top: 4px; bottom: 4px; width: 2px; background: #e3e8f4; }
.tl-item { position: relative; margin-bottom: 18px; }
.tl-dot { position: absolute; left: -30px; top: 0; width: 24px; height: 24px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; box-shadow: 0 0 0 4px #fff; }
.tl-box { background: #f8faff; border: 1px solid var(--bi-border); border-radius: 12px; padding: 10px 14px; }
.tl-title { font-weight: 600; color: var(--bi-navy); font-size: 0.88rem; }
.tl-time { font-size: 0.74rem; color: var(--bi-muted); }

/* ---------- Funnel (reports) ---------- */
.funnel-row { display: flex; align-items: center; margin-bottom: 8px; }
.funnel-label { width: 150px; font-size: 0.82rem; font-weight: 500; }
.funnel-bar { flex: 1; background: #eef2fa; border-radius: 8px; height: 30px; position: relative; overflow: hidden; }
.funnel-fill { height: 100%; border-radius: 8px; display: flex; align-items: center; padding-left: 10px; color: #fff; font-weight: 600; font-size: 0.8rem; min-width: 34px; }

/* ---------- Auth pages (login / forgot / reset / student login / apply form) ---------- */
.auth-body {
    min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
    background:
        radial-gradient(circle at 12% 18%, rgba(25,195,255,0.35), transparent 40%),
        radial-gradient(circle at 88% 82%, rgba(255,138,0,0.30), transparent 42%),
        linear-gradient(135deg, #0A3FB0 0%, #0B6CFF 45%, #8A2BE2 100%);
}
.auth-card { background: #fff; border-radius: 20px; box-shadow: 0 25px 60px rgba(10,30,90,0.35); overflow: hidden; width: 100%; }
.auth-logo { max-width: 230px; width: 100%; height: auto; }
.auth-strip { height: 5px; background: var(--bi-gradient); }

/* ---------- Misc ---------- */
.footer-bar { text-align: center; color: var(--bi-muted); padding: 12px; font-size: 0.8rem; border-top: 1px solid var(--bi-border); background: #fff; }
.footer-bar b { color: var(--bi-blue); }
.empty-state { text-align: center; color: var(--bi-muted); padding: 30px 10px; }
.empty-state i { font-size: 2rem; color: #c9d1e6; display: block; margin-bottom: 8px; }
.task-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--bi-border); }
.task-row:last-child { border-bottom: 0; }
.bulk-bar { background: #fff7e8; border: 1px solid #ffd9a0; border-radius: 12px; padding: 10px 14px; }

@media (max-width: 992px) {
    .sidebar { position: fixed; z-index: 1000; margin-left: -268px; }
    .sidebar.active { margin-left: 0; box-shadow: 0 0 40px rgba(0,0,0,0.25); }
    .page-body { padding: 16px 12px; }
}
