:root {
    --tc-primary: #2f6fed;
    --tc-primary-dark: #1f4fb0;
    --tc-bg: #f4f6fb;
    --tc-sidebar-bg: #101a33;
    --tc-sidebar-hover: #1c2b4f;
}

body {
    background-color: var(--tc-bg);
}

.app-navbar {
    background: linear-gradient(90deg, var(--tc-primary-dark), var(--tc-primary));
    padding: 0.75rem 1.25rem;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.app-navbar .navbar-brand {
    color: #fff;
}

.app-body {
    display: flex;
    min-height: calc(100vh - 56px);
}

.app-sidebar {
    width: 220px;
    background: var(--tc-sidebar-bg);
    padding: 1rem 0.5rem;
    flex-shrink: 0;
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    overflow-y: auto;
    align-self: flex-start;
}

.app-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.75);
    border-radius: 8px;
    padding: 0.55rem 0.9rem;
    margin-bottom: 0.15rem;
    font-size: 0.92rem;
}

.app-sidebar .nav-link i {
    width: 1.25rem;
    display: inline-block;
    text-align: center;
    margin-right: 0.4rem;
}

.app-sidebar .nav-link:hover:not(.disabled) {
    background: var(--tc-sidebar-hover);
    color: #fff;
}

.app-sidebar .nav-link.active {
    background: var(--tc-primary);
    color: #fff;
}

.app-sidebar .nav-link.disabled {
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
}

.app-content {
    flex-grow: 1;
    /* Without this, a flex item won't shrink below its content's natural
       width — a wide table (even one wrapped in .table-responsive) would
       force the whole page to scroll horizontally instead of just the
       table scrolling internally. */
    min-width: 0;
    padding: 1.75rem;
}

/* Phones/small tablets: the fixed-width side rail doesn't work — turn it
   into a horizontally-scrollable bar under the navbar instead, and let the
   content stack full-width below it. No JS/hamburger menu needed. */
@media (max-width: 767.98px) {
    .app-body {
        flex-direction: column;
    }

    .app-sidebar {
        width: 100%;
        height: auto;
        top: 56px;
        padding: 0.5rem;
    }

    .app-sidebar .nav {
        flex-direction: row !important;
        overflow-x: auto;
    }

    .app-sidebar .nav-link {
        white-space: nowrap;
        margin-bottom: 0;
        margin-right: 0.4rem;
    }

    .app-content {
        padding: 1rem;
    }
}

.app-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(16, 26, 51, 0.06);
}

/* Slightly denser than Bootstrap's default so data-heavy tables (leads,
   users, follow-ups) fit more cleanly without feeling cramped. */
.table {
    font-size: 0.875rem;
}

.table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6c757d;
    font-weight: 600;
    border-bottom-width: 1px;
}

.auth-body {
    background: linear-gradient(135deg, var(--tc-primary-dark), var(--tc-sidebar-bg));
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-wrapper {
    width: 100%;
    max-width: 380px;
}

.auth-card {
    border-radius: 14px;
}
