/* =====================================================
   Enrollment OS - SaaS Theme
   ===================================================== */

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

:root {
    /* Colors: trust and technology */
    --primary: #1F5FAE;
    --primary-dark: #0f3c75;
    --accent: #00d2d3;
    --navy: #0A1A2B;

    /* Surfaces */
    --bg-body: #F8FAFC;
    --bg-white: #ffffff;

    /* Effects */
    --glass: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);

    /* Shadows */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Structure */
    --radius: 16px;
    --radius-pill: 50px;

    /* App aliases */
    --primary-light: #4E86C9;
    --primary-glow: rgba(31, 95, 174, 0.18);
    --accent-soft: rgba(0, 210, 211, 0.14);
    --bg-main: var(--bg-body);
    --bg-card: var(--glass);
    --sidebar-bg: #071727;
    --sidebar-text: #cfe0f4;
    --text-primary: var(--navy);
    --text-secondary: #64748b;
    --text-muted: #8b9aad;
    --border-color: #e2e8f0;
    --border-soft: rgba(10, 26, 43, 0.07);
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #0891b2;
    --shadow-md: 0 12px 30px rgba(10, 26, 43, 0.08), 0 3px 10px rgba(10, 26, 43, 0.04);
    --transition: all 0.24s cubic-bezier(0.2, 0, 0, 1);
    --bs-primary: var(--primary);
    --bs-primary-rgb: 31, 95, 174;
    --bs-body-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --bs-body-color: var(--text-primary);
    --bs-body-bg: var(--bg-body);
    --bs-border-color: var(--border-color);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-primary);
    background:
        linear-gradient(180deg, #eef6fb 0%, var(--bg-body) 280px, var(--bg-body) 100%);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(135deg, rgba(31, 95, 174, 0.05), transparent 42%),
        linear-gradient(315deg, rgba(0, 210, 211, 0.05), transparent 38%);
    z-index: -1;
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand {
    font-family: 'Poppins', 'Inter', sans-serif;
    color: var(--navy);
    letter-spacing: 0;
}

h3 {
    font-weight: 800;
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    margin-bottom: 0;
}

h4 {
    font-weight: 700;
}

h5 {
    font-weight: 700;
    font-size: 1.05rem;
}

p {
    color: var(--text-secondary);
}

a {
    color: var(--primary);
    text-decoration-thickness: 1.5px;
    text-underline-offset: 0.18em;
}

a:hover {
    color: var(--primary-dark);
}

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

.text-primary {
    color: var(--primary) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

.glass-effect {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

/* App shell */
.sidebar {
    width: 272px;
    min-height: 100vh;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1rem;
    color: var(--sidebar-text);
    background:
        linear-gradient(180deg, rgba(10, 26, 43, 0.96), rgba(7, 23, 39, 0.98)),
        linear-gradient(135deg, rgba(0, 210, 211, 0.16), transparent 52%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 14px 0 36px rgba(10, 26, 43, 0.14);
}

.sidebar .brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 44px;
    padding: 0.35rem 0.6rem 1rem;
    margin-bottom: 0.8rem;
    color: #fff;
    font-size: 1.12rem;
    font-weight: 800;
}

.sidebar .brand i {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.sidebar .nav-link {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 0.64rem 0.75rem;
    color: var(--sidebar-text);
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid transparent;
}

.sidebar .nav-link i {
    width: 22px;
    margin-right: 0.62rem;
    font-size: 1rem;
    color: rgba(0, 210, 211, 0.9);
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.09);
    transform: translateX(3px);
}

.sidebar .nav-link.active::before {
    content: '';
    position: absolute;
    left: -0.95rem;
    width: 3px;
    height: 24px;
    border-radius: var(--radius-pill);
    background: var(--accent);
}

.sidebar .nav-link.disabled {
    opacity: 0.42;
    pointer-events: none;
}

.sidebar hr {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.sidebar .lang-toggle .btn {
    min-width: 42px;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 800;
}

.main-content {
    min-height: 100vh;
    margin-left: 272px;
    padding: 2rem clamp(1.4rem, 3vw, 2.75rem);
}

body > .container {
    max-width: none;
    padding: 0;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.35rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid rgba(10, 26, 43, 0.06);
}

.page-header h3,
.page-header h4 {
    margin: 0;
}

.page-subtitle {
    margin: 0.22rem 0 0;
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.page-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-secondary);
    font-weight: 700;
    text-decoration: none;
}

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

.search-input {
    width: min(280px, 100%);
}

.content-narrow {
    max-width: 760px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.section-heading h5,
.section-heading h6 {
    margin: 0;
}

.icon-tile {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 14px;
    color: var(--primary);
    background: linear-gradient(135deg, rgba(31, 95, 174, 0.12), rgba(0, 210, 211, 0.16));
}

.icon-tile i {
    font-size: 1.2rem;
}

.icon-tile.success {
    color: var(--success);
    background: linear-gradient(135deg, #ecfdf3, #dcfce7);
}

.icon-tile.warning {
    color: var(--warning);
    background: linear-gradient(135deg, #fff7ed, #fef3c7);
}

.icon-tile.info {
    color: var(--info);
    background: linear-gradient(135deg, #ecfeff, #cffafe);
}

.clickable-card {
    cursor: pointer;
}

.clickable-card:hover {
    transform: translateY(-7px);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    padding: 2.4rem 1.25rem;
    text-align: center;
}

.empty-state-icon {
    width: 66px;
    height: 66px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    border-radius: 20px;
    color: var(--primary);
    background: linear-gradient(135deg, rgba(31, 95, 174, 0.12), rgba(0, 210, 211, 0.16));
}

.empty-state-icon i {
    font-size: 1.75rem;
}

.empty-state p {
    max-width: 440px;
    margin-bottom: 1rem;
}

.upload-dropzone {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    min-height: 190px;
    padding: 1.5rem;
    border: 1.5px dashed rgba(31, 95, 174, 0.28);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.64);
    text-align: center;
}

.upload-dropzone .form-control {
    max-width: 420px;
}

.chart-frame {
    position: relative;
    height: 320px;
}

.mini-metric {
    padding: 0.75rem 0.9rem;
    border: 1px solid rgba(226, 232, 240, 0.72);
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.72);
}

.mini-metric .label {
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 700;
}

.mini-metric .value {
    color: var(--navy);
    font-weight: 800;
}

.main-content > .d-flex:first-child,
.main-content > h3:first-child {
    margin-bottom: 1.35rem !important;
}

.main-content > .d-flex:first-child {
    padding-bottom: 0.45rem;
    border-bottom: 1px solid rgba(10, 26, 43, 0.05);
}

.main-content > .d-flex:first-child > span,
.main-content h3 .text-muted {
    color: var(--text-secondary) !important;
    font-weight: 500;
}

/* Cards and bento surfaces */
.card {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(31, 95, 174, 0.16);
    box-shadow: var(--shadow-md);
}

.card .card {
    transform: none;
}

.card .card:hover {
    transform: none;
}

.metric-card,
.stat-card {
    overflow: hidden;
    min-height: 112px;
}

.stat-card {
    position: relative;
}

.stat-card::before,
.metric-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.stat-card.stat-enrolled::before {
    background: linear-gradient(90deg, var(--success), #78d998);
}

.stat-card.stat-programs::before {
    background: linear-gradient(90deg, var(--warning), #fbbf24);
}

.stat-card.stat-calls::before {
    background: linear-gradient(90deg, var(--info), var(--accent));
}

.stat-card .rounded-circle {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft) !important;
}

.stat-card .fs-4,
.metric-card .fs-2 {
    color: var(--navy);
    font-family: 'Poppins', 'Inter', sans-serif;
    letter-spacing: 0;
}

.metric-card {
    text-align: left !important;
}

.metric-card .fs-2 {
    margin-top: 0.35rem;
}

/* Tables */
.table-responsive {
    border-radius: 12px;
    -webkit-overflow-scrolling: touch;
}

/* On tight screens, tables get a soft right-fade hint to indicate scroll */
@media (max-width: 760px) {
    .table-responsive {
        background:
            linear-gradient(90deg, transparent 70%, rgba(255,255,255,0.95) 100%);
        background-attachment: local, scroll;
    }
}

/* Hide on mobile / tablet — applied to less-critical table columns */
@media (max-width: 767.98px) {
    .col-hide-sm { display: none !important; }
}
@media (max-width: 991.98px) {
    .col-hide-md { display: none !important; }
}

/* Mobile-friendly stacked detail in the "Name" cell:
   gives the lead/program/email/phone an inline meta line beneath the name.  */
.cell-stacked .cell-meta {
    display: none;
    color: var(--text-muted);
    font-size: 0.74rem;
    margin-top: 2px;
    line-height: 1.3;
}
@media (max-width: 767.98px) {
    .cell-stacked .cell-meta { display: block; }
}

.table {
    margin-bottom: 0;
    color: var(--text-primary);
}

.table thead th {
    padding: 0.85rem 1rem;
    color: var(--text-secondary);
    background: #f3f7fb;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
    white-space: nowrap;
}

.table tbody td {
    padding: 0.92rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid rgba(226, 232, 240, 0.72);
    font-size: 0.9rem;
}

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

.table-hover tbody tr {
    transition: var(--transition);
}

.table-hover tbody tr:hover {
    background: rgba(31, 95, 174, 0.045) !important;
}

/* Badges */
.badge {
    border-radius: var(--radius-pill);
    padding: 0.38em 0.72em;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0;
}

.badge.bg-light,
.badge.bg-secondary {
    color: #475569 !important;
    background: #eef2f6 !important;
    border: 1px solid rgba(100, 116, 139, 0.12);
}

.badge.bg-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
}

.badge.bg-success {
    background: linear-gradient(135deg, #22c55e, var(--success)) !important;
}

.badge.bg-warning {
    color: #fff !important;
    background: linear-gradient(135deg, #f59e0b, var(--warning)) !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #ef4444, var(--danger)) !important;
}

.badge.bg-info {
    color: #fff !important;
    background: linear-gradient(135deg, var(--accent), var(--info)) !important;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 38px;
    border-radius: var(--radius-pill);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0;
    transition: var(--transition);
}

.btn i {
    line-height: 1;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: 0;
    box-shadow: 0 12px 22px rgba(31, 95, 174, 0.22);
}

.btn-primary:hover,
.btn-primary:focus {
    color: #fff;
    background: linear-gradient(135deg, #2c72c1, var(--primary-dark));
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(31, 95, 174, 0.26);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline-primary {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(31, 95, 174, 0.3);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 12px 22px rgba(31, 95, 174, 0.18);
}

.btn-secondary,
.btn-outline-secondary,
.btn-outline-dark {
    border-color: rgba(100, 116, 139, 0.25);
}

.btn-sm {
    min-height: 32px;
    padding: 0.35rem 0.8rem;
    font-size: 0.8rem;
}

.btn-danger {
    border: 0;
    background: linear-gradient(135deg, #ef4444, var(--danger));
}

.btn-success {
    border: 0;
    background: linear-gradient(135deg, #22c55e, var(--success));
}

/* Forms */
.form-control,
.form-select {
    min-height: 42px;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    background-color: #fff;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-control-sm,
.form-select-sm {
    min-height: 34px;
    border-radius: 10px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.form-control::placeholder {
    color: #a8b4c3;
}

.form-label {
    margin-bottom: 0.38rem;
    color: #516173;
    font-size: 0.82rem;
    font-weight: 700;
}

.input-group-text {
    border-color: var(--border-color);
    border-radius: 12px;
    background: #f3f7fb;
    color: var(--text-muted);
}

.form-check-input {
    border-color: #bdc8d5;
    cursor: pointer;
}

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

/* Modals and alerts */
.modal-content {
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.93);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* On phones, modals take full width and align to bottom (sheet-style) for thumb reach. */
@media (max-width: 575.98px) {
    .modal-dialog:not(.modal-sm) {
        margin: 0;
        max-width: 100%;
        min-height: 100%;
        align-items: flex-end;
        display: flex;
    }
    .modal-content {
        width: 100%;
        max-height: 92vh;
        border-radius: 18px 18px 0 0;
        overflow-y: auto;
    }
    .modal-header {
        position: sticky;
        top: 0;
        z-index: 5;
        background: inherit;
        border-bottom: 1px solid var(--border-color);
    }
    .modal-footer {
        position: sticky;
        bottom: 0;
        background: rgba(255, 255, 255, 0.96);
        border-top: 1px solid var(--border-color);
        flex-wrap: wrap;
    }
    .modal-footer .btn { flex: 1; min-width: 100px; }
}

.modal-header,
.modal-footer {
    border-color: rgba(226, 232, 240, 0.85);
}

.modal-title {
    color: var(--navy);
    font-family: 'Poppins', 'Inter', sans-serif;
    font-weight: 700;
}

.alert {
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    color: #14532d;
    background: #ecfdf3;
    border-color: #bbf7d0;
}

.alert-danger {
    color: #7f1d1d;
    background: #fef2f2;
    border-color: #fecaca;
}

.alert-info {
    color: #164e63;
    background: #ecfeff;
    border-color: #a5f3fc;
}

/* Tabs */
.nav-tabs {
    gap: 0.35rem;
    border-bottom: 1px solid var(--border-color);
}

.nav-tabs .nav-link {
    border: 0;
    border-radius: 12px 12px 0 0;
    color: var(--text-secondary);
    font-weight: 700;
}

.nav-tabs .nav-link.active {
    color: var(--primary);
    background: #fff;
    box-shadow: inset 0 -2px 0 var(--accent);
}

.nav-tabs .nav-link:hover:not(.active) {
    color: var(--primary-dark);
    background: rgba(255, 255, 255, 0.62);
}

/* Kanban */
.kanban-container {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1.5rem;
    min-height: 70vh;
}

.kanban-column {
    min-width: 280px;
    max-width: 320px;
    flex-shrink: 0;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: opacity 0.2s, transform 0.2s;
}
.kanban-column.col-dragging { opacity: 0.4; }
.kanban-column.col-drag-over { border: 2px dashed var(--primary); }

.kanban-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    margin-bottom: 0.75rem;
    color: var(--navy);
    font-weight: 800;
}

.kanban-column-count {
    padding: 2px 10px;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--primary);
    background: var(--accent-soft);
    border-radius: 999px;
}

.kanban-card {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: white;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    cursor: grab;
    transition: var(--transition);
}

.kanban-card:hover {
    transform: translateY(-3px);
    border-color: rgba(31, 95, 174, 0.2);
    box-shadow: var(--shadow-md);
}

.kanban-card.dragging { opacity: 0.5; }

.kanban-card { position: relative; }

.kanban-card .card-actions {
    position: absolute;
    top: 6px;
    right: 6px;
    display: none;
    gap: 4px;
}
.kanban-card:hover .card-actions { display: flex; }

.kanban-card .card-actions button {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 0.78rem;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(10, 26, 43, 0.12);
}
.kanban-card .card-actions .btn-accept {
    color: #fff;
    background: linear-gradient(135deg, #22c55e, var(--success));
}
.kanban-card .card-actions .btn-accept:hover { transform: scale(1.08); }
.kanban-card .card-actions .btn-reject {
    color: var(--danger);
    background: #fff;
    border: 1px solid #fecaca;
}
.kanban-card .card-actions .btn-reject:hover {
    color: #fff;
    background: linear-gradient(135deg, #ef4444, var(--danger));
    border-color: var(--danger);
}

.kanban-card .lead-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.kanban-card .lead-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.kanban-card .lead-source {
    display: inline-block;
    padding: 1px 6px;
    font-size: 0.7rem;
    color: var(--primary-dark);
    background: var(--accent-soft);
    border-radius: var(--radius-pill);
}

.column-drop-zone {
    min-height: 60px;
    border: 2px dashed transparent;
    border-radius: 8px;
    transition: all 0.2s;
}
.column-drop-zone.drag-over {
    border-color: var(--accent);
    background: rgba(0, 210, 211, 0.08);
}

.customize-bar,
#bulkBar {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    background: rgba(236, 254, 255, 0.78);
    border: 1px solid rgba(31, 95, 174, 0.14);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.customize-bar {
    display: none;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.customize-bar.active { display: flex; }

.col-delete-btn {
    display: none;
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    color: #dc2626;
    background: #fee2e2;
    border: none;
    border-radius: 50%;
    font-size: 0.7rem;
    cursor: pointer;
}
.customize-active .col-delete-btn { display: flex; }
.customize-active .kanban-column { cursor: grab; }
.customize-active .kanban-column-header { position: relative; }

.col-drag-handle {
    display: none;
    margin-right: 4px;
    color: #94a3b8;
    cursor: grab;
}
.customize-active .col-drag-handle { display: inline; }

/* Kanban mobile tweaks */
@media (max-width: 767.98px) {
    .kanban-container {
        gap: 0.6rem;
        scroll-snap-type: x mandatory;
        scroll-padding-left: 0.5rem;
    }
    .kanban-column {
        min-width: 78vw;
        max-width: 78vw;
        scroll-snap-align: start;
    }
    .kanban-card { padding: 0.65rem; }
    .kanban-card .lead-name { font-size: 0.9rem; }
    .kanban-card .lead-meta { font-size: 0.72rem; word-break: break-all; }
}

/* Lead detail timeline */
.stage-progress {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 1rem 0;
    overflow-x: auto;
}
.stage-step {
    display: flex;
    flex-shrink: 0;
    align-items: center;
}
.stage-dot {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    font-size: 0.85rem;
    transition: all 0.3s;
}
.stage-dot.completed {
    color: white;
    background: #22c55e;
    border-color: #22c55e;
}
.stage-dot.current {
    color: white;
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}
.stage-connector {
    width: 32px;
    height: 2px;
    flex-shrink: 0;
    background: #e2e8f0;
}
.stage-connector.completed { background: #22c55e; }
.stage-label {
    margin-top: 4px;
    max-width: 70px;
    color: #94a3b8;
    font-size: 0.65rem;
    text-align: center;
}
.stage-label.active {
    color: var(--text-primary);
    font-weight: 600;
}

.timeline {
    position: relative;
    padding-left: 2rem;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}
.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
    position: absolute;
    left: -2rem;
    top: 2px;
    width: 24px;
    height: 24px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border-radius: 50%;
    font-size: 0.7rem;
}
.timeline-dot.calling  { background: #0891b2; }
.timeline-dot.email    { background: #3b82f6; }
.timeline-dot.emails   { background: #3b82f6; }
.timeline-dot.forms    { background: #22c55e; }
.timeline-dot.kanban   { background: #f59e0b; }
.timeline-dot.leads    { background: var(--primary); }
.timeline-dot.system   { background: #94a3b8; }

.call-card {
    padding: 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}
.call-card:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); }

.transcript-toggle {
    color: var(--primary);
    font-size: 0.85rem;
    cursor: pointer;
}
.transcript-content {
    display: none;
    margin-top: 0.75rem;
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: pre-wrap;
}
.transcript-content.show { display: block; }

.analysis-badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
}
.analysis-interested      { color: #166534; background: #dcfce7; }
.analysis-not_interested  { color: #991b1b; background: #fef2f2; }
.analysis-undecided       { color: #854d0e; background: #fef9c3; }
.analysis-no_answer       { color: #475569; background: #f1f5f9; }
.analysis-call_later      { color: #0f3c75; background: var(--accent-soft); }

.tab-count {
    margin-left: 4px;
    padding: 1px 8px;
    background: #e2e8f0;
    border-radius: 999px;
    font-size: 0.7rem;
}

/* Profile / branding settings */
.cover-preview {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
}
.cover-placeholder {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    background: linear-gradient(135deg, #f8fafc, var(--accent-soft));
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s;
}
.cover-placeholder:hover {
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary-glow), var(--accent-soft));
    border-color: var(--primary);
}
.logo-preview-wrapper {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
}
.logo-preview-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.logo-placeholder {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s;
}
.logo-placeholder:hover {
    color: var(--primary);
    border-color: var(--primary);
}
.color-swatch {
    width: 44px;
    height: 44px;
    padding: 0;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
}
.color-swatch input[type="color"] {
    width: 60px;
    height: 60px;
    margin: -8px;
    border: none;
    cursor: pointer;
}
.live-preview {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}
.section-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

/* Profile mobile tweaks */
@media (max-width: 640px) {
    .live-preview { margin-top: 1rem; }
    .logo-preview-wrapper,
    .logo-placeholder {
        width: 80px;
        height: 80px;
    }
    .cover-preview,
    .cover-placeholder {
        height: 140px;
    }
}

/* Login split-screen mobile (already responsive in template, fine-tune here) */
@media (max-width: 640px) {
    .login-shell .form-card { padding: 0.5rem; }
}

/* Progress and detail surfaces */
.progress {
    height: 9px;
    border-radius: var(--radius-pill);
    background: #e5edf5;
}

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

.transcript-block,
.transcript-content {
    background: #f3f7fb !important;
    border: 1px solid var(--border-color);
    border-radius: 12px !important;
    color: #475569;
    line-height: 1.7;
}

.settings-oauth-card,
.cover-placeholder,
.logo-placeholder {
    border-color: rgba(31, 95, 174, 0.2) !important;
    background: rgba(255, 255, 255, 0.7) !important;
}

.settings-oauth-card {
    cursor: pointer;
}

.settings-oauth-card:hover,
.cover-placeholder:hover,
.logo-placeholder:hover {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    background: rgba(0, 210, 211, 0.08) !important;
}

/* Login */
.login-wrapper {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem;
    background:
        linear-gradient(90deg, rgba(5, 14, 23, 0.88), rgba(5, 14, 23, 0.48)),
        linear-gradient(135deg, var(--primary-dark), var(--primary) 48%, var(--accent));
}

.login-wrapper .card {
    width: min(100%, 430px);
    border-color: var(--glass-border);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-lg);
}

.login-wrapper .card:hover {
    transform: none;
}

.brand-mark,
.login-wrapper .brand-mark {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 16px 28px rgba(31, 95, 174, 0.24);
}

.brand-mark i,
.login-wrapper .brand-mark i {
    font-size: 1.8rem;
}

/* Motion */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-content > .row,
.main-content > .card,
.main-content > .d-flex,
.main-content > h3,
.main-content > .tab-content {
    animation: fadeInUp 0.36s ease-out both;
}

.main-content > .row {
    animation-delay: 0.04s;
}

.main-content > .card,
.main-content > .tab-content {
    animation-delay: 0.08s;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
}

/* ===== Mobile top bar (only shown on small screens) ===== */
.mobile-topbar {
    display: none;
    position: sticky;
    top: 0;
    z-index: 90;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu-btn,
.mobile-profile-btn {
    width: 40px; height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--navy);
    font-size: 1.2rem;
    cursor: pointer;
    text-decoration: none;
}
.mobile-menu-btn:hover,
.mobile-profile-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-glow);
}

.mobile-brand {
    flex: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--navy);
    font-family: 'Poppins', 'Inter', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    text-decoration: none;
}
.mobile-brand i {
    width: 28px; height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--accent);
    background: rgba(31, 95, 174, 0.1);
}

.sidebar-close-btn {
    display: none;
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    width: 36px; height: 36px;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 0;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    z-index: 5;
}
.sidebar-close-btn:hover { background: rgba(255, 255, 255, 0.2); }

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99;
    background: rgba(10, 26, 43, 0.55);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

@media (max-width: 991.98px) {
    .mobile-topbar {
        display: flex;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: 280px;
        height: 100vh;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.2, 0, 0, 1);
        overflow-y: auto;
        box-shadow: 14px 0 40px rgba(10, 26, 43, 0.32);
    }

    .sidebar nav {
        display: flex;
        flex-direction: column;
    }

    .sidebar-close-btn {
        display: inline-flex;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }
    body.sidebar-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }
    body.sidebar-open {
        overflow: hidden;
    }

    .main-content {
        margin-left: 0;
        padding: 1.25rem clamp(0.85rem, 3vw, 1.5rem);
    }
}

@media (max-width: 640px) {
    .main-content {
        padding: 1rem 0.85rem;
    }

    .page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-header .page-actions,
    .page-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .page-actions .search-input,
    .page-actions input[type='text'] {
        flex: 1 1 100%;
    }

    .btn {
        white-space: normal;
    }

    /* Tablo mobile uyumu — wrapping sırasında görünüm bozulmaz */
    .table thead th,
    .table tbody td {
        white-space: nowrap;
    }
}
