:root {
    --navy: #061f3d;
    --navy-2: #082b55;
    --navy-3: #0d3b73;
    --blue: #0d6efd;
    --soft-bg: #f4f7fb;
    --text: #07162d;
    --muted: #64748b;
    --border: #e4eaf2;
    --shadow: 0 16px 35px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--soft-bg);
    font-family: Arial, sans-serif;
    color: var(--text);
}

.platform-wrapper {
    display: flex;
    min-height: 100vh;
}

.platform-sidebar {
    width: 360px;
    background: linear-gradient(180deg, #08284d 0%, #061f3d 45%, #04162b 100%);
    color: #fff;
    flex-shrink: 0;
    box-shadow: 8px 0 25px rgba(2, 8, 23, 0.08);
}

.brand-box {
    height: 325px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.brand-image {
    width: 98%;
    max-width: 330px;
    max-height: 305px;
    object-fit: contain;
    display: block;
}

.brand-logo {
    width: 110px;
    height: 110px;
    border-radius: 24px;
    background: var(--navy);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    font-weight: 800;
}

.sidebar-nav {
    padding: 18px 16px 28px;
}

.sidebar-section {
    color: #cbd5e1;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 800;
    padding: 20px 18px 10px;
}

.sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.14);
    margin: 18px 16px 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #eff6ff;
    text-decoration: none;
    border-radius: 12px;
    min-height: 52px;
    padding: 13px 18px;
    margin-bottom: 6px;
    font-size: 17px;
    font-weight: 800;
    transition: all .15s ease;
}

.sidebar-link i {
    width: 25px;
    text-align: center;
    font-size: 22px;
    color: #f8fafc;
}

.sidebar-link:hover,
.sidebar-link.active-main {
    background: linear-gradient(90deg, rgba(59,130,246,.32), rgba(59,130,246,.15));
    color: #fff;
    box-shadow: inset 3px 0 0 #93c5fd;
}

.sidebar-sub {
    min-height: 45px;
    padding-left: 62px;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 3px;
}

.sidebar-sub i {
    font-size: 18px;
    width: 20px;
    color: #dbeafe;
}

.sidebar-empty {
    color: #cbd5e1;
    padding: 12px 18px;
}

.platform-main {
    flex: 1;
    min-width: 0;
}

.platform-navbar {
    height: 92px;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    padding: 0 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 22px;
}

.menu-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy);
    font-size: 30px;
}

.page-head {
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 14px;
}

.bell-wrap {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy);
    font-size: 22px;
}

.bell-wrap span {
    position: absolute;
    top: 1px;
    right: 0;
    background: #f59e0b;
    color: #fff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    width: 19px;
    height: 19px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    background: #dbe5f3;
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 18px;
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.18;
}

.user-info strong {
    font-size: 15px;
}

.user-info small {
    color: var(--muted);
    font-size: 13px;
}

.logout-link {
    color: var(--navy);
    font-size: 22px;
    text-decoration: none;
    padding-left: 6px;
}

.platform-content {
    padding: 40px 42px;
}

.kpi-card,
.module-card {
    border: 0;
    border-radius: 22px;
    box-shadow: var(--shadow);
    background: #fff;
}

.kpi-card .card-body,
.module-card .card-body {
    padding: 28px;
}

.kpi-label {
    font-size: 15px;
    color: var(--muted);
    font-weight: 800;
}

.kpi-value {
    font-size: 42px;
    font-weight: 900;
    color: var(--text);
}

.btn-primary {
    background: var(--navy);
    border-color: var(--navy);
    border-radius: 9px;
    font-weight: 800;
    padding: 10px 18px;
}

.btn-primary:hover {
    background: #03162b;
    border-color: #03162b;
}

.btn-outline-primary,
.btn-outline-secondary {
    border-radius: 9px;
    font-weight: 700;
}

.table {
    margin-bottom: 0;
}

.table th {
    font-size: 15px;
    color: var(--text);
    font-weight: 900;
    padding: 14px 10px;
}

.table td {
    vertical-align: middle;
    padding: 14px 10px;
}

/* Dashboard module cards */
.module-card .bg-light {
    background: #ffffff !important;
    border: 1px solid var(--border) !important;
    border-radius: 16px;
    box-shadow: none;
}

.module-card .bg-light:hover {
    box-shadow: 0 10px 24px rgba(15,23,42,.08);
}

/* Pipeline */
.pipeline-board {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    padding-bottom: 20px;
}

.pipeline-column {
    min-width: 330px;
    background: #f8fafc;
    border-radius: 18px;
    padding: 18px;
    border: 1px solid var(--border);
}

.pipeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    font-size: 17px;
}

.pipeline-count {
    background: #4f6ef7;
    color: white;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 800;
}

.pipeline-card {
    background: white;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 14px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}

.pipeline-title {
    font-weight: 800;
    margin-bottom: 6px;
}

.pipeline-customer {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 10px;
}

.pipeline-value {
    font-size: 24px;
    font-weight: 900;
    color: var(--text);
}

.pipeline-probability {
    font-size: 13px;
    color: var(--muted);
    margin-top: 4px;
}

.pipeline-empty {
    color: #94a3b8;
    font-size: 15px;
    padding: 20px;
    text-align: center;
}

/* Activity sections */
.activity-section-red {
    border-left: 4px solid #ef4444;
}

.activity-section-yellow {
    border-left: 4px solid #f59e0b;
}

.activity-section-blue {
    border-left: 4px solid #3b82f6;
}

@media (max-width: 1100px) {
    .platform-sidebar {
        width: 300px;
    }

    .brand-box {
        height: 250px;
    }

    .brand-image {
        max-width: 280px;
        max-height: 230px;
    }

    .page-head {
        font-size: 24px;
    }
}

@media (max-width: 900px) {
    .platform-wrapper {
        flex-direction: column;
    }

    .platform-sidebar {
        width: 100%;
    }

    .brand-box {
        height: 190px;
    }

    .brand-image {
        max-width: 260px;
        max-height: 175px;
    }

    .platform-navbar {
        height: auto;
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .platform-content {
        padding: 22px;
    }
}

.module-icon-box {
    width: 78px;
    height: 78px;
    border-radius: 14px;
    background: #eaf2ff;
    color: #0d6efd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    flex-shrink: 0;
}

.card:hover .module-icon-box {
    background: #dbeafe;
}

/* Collapsible module menus */
.sidebar-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
}

.sidebar-toggle:hover {
    background: linear-gradient(90deg, rgba(59,130,246,.32), rgba(59,130,246,.15));
}

.sidebar-collapse {
    margin-bottom: 8px;
}

.sidebar-toggle[aria-expanded="true"] .toggle-chevron {
    transform: rotate(180deg);
}

.toggle-chevron {
    transition: transform .2s ease;
    font-size: 14px !important;
}

.sidebar-collapse .sidebar-sub {
    margin-left: 10px;
    border-left: 1px solid rgba(255,255,255,.16);
}

/* Login Page */
.login-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(13, 110, 253, .12), transparent 35%),
        linear-gradient(135deg, #061f3d, #0b2a50);
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.login-card {
    width: 100%;
    max-width: 460px;
    background: #fff;
    border-radius: 26px;
    padding: 42px;
    box-shadow: 0 30px 80px rgba(2, 8, 23, .35);
}

.login-brand {
    text-align: center;
    margin-bottom: 25px;
}

.login-brand img {
    max-width: 300px;
    max-height: 170px;
    object-fit: contain;
}

.login-card h3 {
    font-weight: 900;
    color: #061f3d;
    margin-bottom: 5px;
    text-align: center;
}

.login-card p {
    text-align: center;
    margin-bottom: 28px;
}

.login-card .form-control {
    height: 48px;
    border-radius: 10px;
}

.login-footer {
    margin-top: 28px;
    text-align: center;
    color: #64748b;
    font-size: 13px;
}

.login-logo-fallback {
    width: 90px;
    height: 90px;
    border-radius: 22px;
    background: #061f3d;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    font-weight: 900;
}
