@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

/* =========================================================
   SCALYMISE CRM — CLEAN MASTER STYLESHEET
   Palette: #FFFFFF #E5E5E5 #FCA311 #14213D #000000
   ========================================================= */

/* =========================
   DESIGN TOKENS
========================= */
:root {
    --white: #FFFFFF;
    --light-gray: #E5E5E5;
    --gold: #FCA311;
    --gold-dark: #E99508;
    --navy: #14213D;
    --black: #000000;

    --green: #16A36A;
    --red: #D64545;
    --blue: #2D7FF9;

    --sidebar-width: 230px;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 16px;

    --theme-bg: #F7F8FA;
    --theme-surface: #FFFFFF;
    --theme-surface-soft: #FAFBFC;
    --theme-text: #000000;
    --theme-muted: #616A78;
    --theme-border: #E5E5E5;

    --theme-sidebar: #FFFFFF;
    --theme-sidebar-text: #000000;
    --theme-sidebar-muted: #4F5968;

    --theme-shadow: 0 4px 14px rgba(20, 33, 61, 0.07);

    --scroll-track: #EEF1F5;
    --scroll-thumb: #AAB3C2;
    --scroll-thumb-hover: #8E99AA;
}

html[data-theme="dark"] {
    --theme-bg: #0C1424;
    --theme-surface: #14213D;
    --theme-surface-soft: #182743;
    --theme-text: #FFFFFF;
    --theme-muted: #AAB4C6;
    --theme-border: #273754;

    --theme-sidebar: #101B31;
    --theme-sidebar-text: #FFFFFF;
    --theme-sidebar-muted: #AAB4C6;

    --theme-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);

    --scroll-track: #13233F;
    --scroll-thumb: #46566F;
    --scroll-thumb-hover: #5C6C86;
}

/* =========================
   RESET / BASE
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    background: var(--theme-bg);
    color: var(--theme-text);
    transition: background-color 0.25s ease, color 0.25s ease;
}

a {
    text-decoration: none;
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

img {
    max-width: 100%;
    display: block;
}

input,
select,
textarea {
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--gold) !important;
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
    color-scheme: dark;
}

/* =========================
   MAIN LAYOUT
========================= */
.crm-layout {
    min-height: 100vh;
    display: flex;
}

.crm-main {
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    margin-left: var(--sidebar-width);
    background: var(--theme-bg);
    transition: background-color 0.25s ease;
}

.page-content {
    padding: 28px;
    background: var(--theme-bg);
    transition: background-color 0.25s ease;
}

/* =========================
   SIDEBAR
========================= */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 100;

    display: flex;
    flex-direction: column;

    padding: 22px 14px;

    background: var(--theme-sidebar);
    color: var(--theme-sidebar-text);
    border-right: 1px solid var(--theme-border);

    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 8px 24px;
    border-bottom: 1px solid var(--theme-border);
}

.brand-mark {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;
    background: var(--gold);
    color: var(--black) !important;

    font-size: 21px;
    font-weight: 800;
}

.sidebar-brand h2 {
    font-size: 19px;
    line-height: 1.1;
    color: var(--theme-sidebar-text);
}

.sidebar-brand span {
    display: block;
    margin-top: 4px;
    font-size: 9px;
    color: var(--theme-sidebar-muted);
}

.sidebar-nav {
    margin-top: 22px;
    flex: 1;
}

.nav-group,
.sidebar-hover-group,
.add-lead-nav-group {
    position: relative;
}

.nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 11px 12px;
    margin-bottom: 4px;

    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--theme-sidebar-muted);

    font-size: 14px;
    text-align: left;

    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.nav-item:not(.active):hover {
    background: var(--gold) !important;
    color: var(--black) !important;
    transform: translateX(3px);
}

.nav-item:not(.active):hover * {
    color: var(--black) !important;
}

.nav-item:active {
    transform: translateX(1px) scale(0.98);
}

.nav-item.active,
.nav-item.active:hover,
.nav-item.active:active {
    background: var(--gold) !important;
    color: var(--black) !important;
    font-weight: 700;
    transform: none;
}

.nav-item.active * {
    color: var(--black) !important;
}

.nav-icon {
    width: 20px;
    text-align: center;
    font-size: 17px;
}

.nav-dropdown-toggle {
    cursor: pointer;
}

.nav-arrow {
    margin-left: auto;
    transition: transform 0.18s ease;
}

.nav-dropdown-toggle.expanded .nav-arrow {
    transform: rotate(180deg);
}

/* =========================
   SIDEBAR DROPDOWNS
========================= */
.nav-submenu {
    display: none;
    padding: 4px 0 8px 42px;
}

.nav-submenu.open,
.sidebar-hover-group:hover>.nav-submenu,
.add-lead-nav-group:hover>.add-lead-submenu {
    display: block;
}

.nav-submenu a,
.submenu-action {
    width: 100%;
    display: block;

    padding: 8px 10px;

    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--theme-sidebar-muted);

    font-size: 12px;
    text-align: left;

    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.nav-submenu a:hover,
.submenu-action:hover {
    background: var(--gold);
    color: var(--black) !important;
    transform: translateX(3px);
}

.nav-submenu a:hover *,
.submenu-action:hover * {
    color: var(--black) !important;
}

.nav-submenu a.active-sub {
    background: rgba(252, 163, 17, 0.12);
    color: var(--gold);
    font-weight: 700;
}

.add-lead-submenu {
    padding-left: 42px;
    padding-bottom: 8px;
}

/* =========================
   SIDEBAR USER
========================= */
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 16px 8px 0;
    border-top: 1px solid var(--theme-border);
}

.user-avatar,
.topbar-avatar {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    background: var(--gold);
    color: var(--black) !important;
    font-weight: 800;
}

.sidebar-user strong {
    display: block;
    font-size: 13px;
    color: var(--theme-sidebar-text);
}

.sidebar-user span {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    color: var(--theme-sidebar-muted);
}

/* =========================
   TOPBAR
========================= */
.topbar {
    height: 72px;
    position: sticky;
    top: 0;
    z-index: 50;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 28px;

    background: var(--theme-surface);
    border-bottom: 1px solid var(--theme-border);

    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.topbar-search {
    width: 390px;
}

.topbar-search input {
    width: 100%;
    height: 40px;
    padding: 0 14px;

    border: 1px solid var(--theme-border);
    border-radius: 8px;
    background: var(--theme-surface-soft);
    color: var(--theme-text);

    font-size: 13px;
}

.topbar-search input::placeholder {
    color: var(--theme-muted);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.topbar-date {
    font-size: 12px;
    color: var(--theme-muted);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 9px;
}

.topbar-avatar {
    width: 34px;
    height: 34px;
    font-size: 13px;
}

.topbar-user-info strong {
    display: block;
    font-size: 12px;
    color: var(--theme-text);
}

.topbar-user-info span {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    color: var(--theme-muted);
}

.theme-toggle,
.notification-toggle {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--theme-border);
    border-radius: 9px;
    background: var(--theme-surface-soft);
    color: var(--theme-text);

    font-size: 17px;
    cursor: pointer;

    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.theme-toggle:hover,
.notification-toggle:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--black);
    transform: translateY(-2px);
}

.theme-toggle:active,
.notification-toggle:active {
    transform: scale(0.94);
}

/* =========================
   PAGE TITLES
========================= */
.page-title {
    margin-bottom: 24px;
}

.page-title h1 {
    font-size: 25px;
    color: var(--theme-text);
}

.page-title p {
    margin-top: 6px;
    font-size: 13px;
    color: var(--theme-muted);
}

.dashboard-page-title,
.campaign-page-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.dashboard-add-lead {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    white-space: nowrap;
}

/* =========================
   CARDS
========================= */
.card,
.dashboard-stat-card {
    background: var(--theme-surface);
    border: 1px solid var(--theme-border);
    border-radius: var(--radius-md);
    box-shadow: var(--theme-shadow);

    transition: background-color 0.25s ease, border-color 0.2s ease, color 0.25s ease, transform 0.2s ease;
}

.card:hover {
    border-color: rgba(252, 163, 17, 0.24);
}

/* =========================
   BUTTONS
========================= */
.btn-primary,
.btn-secondary {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 9px 15px;

    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;

    box-shadow: none !important;

    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s cubic-bezier(.2, .8, .2, 1);
}

/* Light theme: normal white/black, hover gold/black */
.btn-primary {
    background: var(--theme-surface);
    border: 1px solid var(--theme-border);
    color: var(--theme-text) !important;
}

.btn-primary:hover {
    background: var(--gold) !important;
    border-color: var(--gold) !important;
    color: var(--black) !important;
    transform: translateY(-3px) scale(1.015);
}

.btn-primary:hover * {
    color: var(--black) !important;
}

.btn-primary:active {
    background: var(--gold-dark) !important;
    border-color: var(--gold-dark) !important;
    color: var(--black) !important;
    transform: translateY(0) scale(0.97);
}

.btn-primary:focus-visible,
.btn-secondary:focus-visible {
    outline: 3px solid rgba(252, 163, 17, 0.22);
    outline-offset: 3px;
}

/* Dark theme: normal navy/white, hover gold/black */
html[data-theme="dark"] .btn-primary {
    background: var(--navy) !important;
    border-color: var(--theme-border) !important;
    color: var(--white) !important;
}

html[data-theme="dark"] .btn-primary * {
    color: var(--white) !important;
}

html[data-theme="dark"] .btn-primary:hover,
html[data-theme="dark"] .btn-primary:active {
    color: var(--black) !important;
}

html[data-theme="dark"] .btn-primary:hover *,
html[data-theme="dark"] .btn-primary:active * {
    color: var(--black) !important;
}

.btn-secondary {
    background: var(--theme-surface);
    border: 1px solid var(--theme-border);
    color: var(--theme-text);
}

.btn-secondary:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--black);
    transform: translateY(-2px);
}

.btn-secondary:active {
    transform: translateY(0) scale(0.97);
}

/* =========================
   DASHBOARD
========================= */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.dashboard-stat-card {
    padding: 18px;
}

.dashboard-stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(252, 163, 17, 0.55);
}

.dashboard-stat-card:active {
    transform: translateY(-1px) scale(0.99);
}

.stat-label {
    display: block;
    margin-bottom: 10px;
    font-size: 12px;
    color: var(--theme-muted);
}

.dashboard-stat-card strong {
    display: block;
    margin-bottom: 7px;
    font-size: 28px;
    color: var(--theme-text);
}

.stat-help {
    font-size: 11px;
    color: var(--theme-muted);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 18px;
}

.dashboard-calling-card,
.recent-leads-card {
    min-height: 300px;
    padding: 20px;
}

.card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding-bottom: 16px;
    border-bottom: 1px solid var(--theme-border);
}

.card-heading h2 {
    font-size: 17px;
    color: var(--theme-text);
}

.card-heading p {
    margin-top: 5px;
    font-size: 11px;
    color: var(--theme-muted);
}

.text-link {
    font-size: 12px;
    color: var(--gold);
    font-weight: 700;
    transition: opacity 0.18s ease;
}

.text-link:hover {
    opacity: 0.75;
}

.dashboard-empty-state {
    min-height: 210px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
}

.dashboard-empty-state strong {
    font-size: 15px;
    color: var(--theme-text);
}

.dashboard-empty-state p {
    max-width: 360px;
    margin-top: 7px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--theme-muted);
}

.recent-leads-list {
    padding-top: 6px;
}

.recent-lead-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 3px;
    border-bottom: 1px solid var(--theme-border);
}

.recent-lead-row:last-child {
    border-bottom: 0;
}

.recent-lead-row strong {
    display: block;
    font-size: 13px;
    color: var(--theme-text);
}

.recent-lead-row span {
    display: block;
    margin-top: 4px;
    font-size: 10px;
    color: var(--theme-muted);
}

.lead-status-badge {
    padding: 5px 9px;
    border-radius: 20px;
    background: rgba(252, 163, 17, 0.14);
    color: var(--gold) !important;
    font-size: 10px !important;
    font-weight: 700;
}

/* =========================
   CAMPAIGNS / TABLES
========================= */
.campaign-table-card {
    padding: 18px;
}

.crm-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.crm-table {
    width: 100%;
    border-collapse: collapse;
}

.crm-table th,
.crm-table td {
    padding: 13px 14px;
    text-align: left;
    border-bottom: 1px solid var(--theme-border);
}

.crm-table th {
    font-size: 11px;
    font-weight: 700;
    color: var(--theme-muted);
}

.crm-table td {
    font-size: 12px;
    color: var(--theme-text);
}

.crm-table tbody tr {
    transition: background-color 0.18s ease;
}

.crm-table tbody tr:hover {
    background: rgba(252, 163, 17, 0.06);
}

.crm-table tbody tr:last-child td {
    border-bottom: 0;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
}

.status-active {
    background: rgba(22, 163, 106, 0.12);
    color: #169B66;
}

.status-paused {
    background: rgba(252, 163, 17, 0.15);
    color: #B36B00;
}

.status-completed {
    background: rgba(45, 127, 249, 0.12);
    color: #2D7FF9;
}

/* =========================
   FORMS
========================= */
.crm-form {
    margin-top: 18px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 12px;
    font-weight: 700;
    color: var(--theme-text);
}

.form-group input,
.form-group select,
.form-group textarea,
.lead-modal-box input,
.lead-modal-box select,
.lead-modal-box textarea {
    width: 100%;
    min-height: 42px;

    padding: 10px 12px;

    border: 1px solid var(--theme-border);
    border-radius: 8px;
    background: var(--theme-surface-soft);
    color: var(--theme-text);

    box-shadow: none !important;
}

.form-group input::placeholder,
.form-group textarea::placeholder,
.lead-modal-box input::placeholder,
.lead-modal-box textarea::placeholder {
    color: var(--theme-muted);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover,
.lead-modal-box input:hover,
.lead-modal-box select:hover,
.lead-modal-box textarea:hover {
    border-color: rgba(252, 163, 17, 0.55);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

textarea {
    resize: none !important;
    overflow-x: hidden;
    overflow-y: auto;
    line-height: 1.55;
}

textarea::-webkit-resizer,
textarea::-webkit-scrollbar-button {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

textarea::-webkit-scrollbar-corner {
    background: transparent;
}

textarea::-webkit-scrollbar {
    width: 8px;
}

textarea::-webkit-scrollbar-track {
    background: var(--scroll-track);
    border-radius: 20px;
}

textarea::-webkit-scrollbar-thumb {
    background: var(--scroll-thumb);
    border-radius: 20px;
    border: 2px solid var(--scroll-track);
}

textarea::-webkit-scrollbar-thumb:hover {
    background: var(--scroll-thumb-hover);
}

textarea {
    scrollbar-width: thin;
    scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}

#bulkPhoneNumbers {
    min-height: 190px;
    max-height: 290px;
    overflow-y: auto !important;
    scrollbar-gutter: auto;
}

.bulk-lead-counter {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-top: -4px;
    margin-bottom: 10px;
    color: var(--theme-muted);
    font-size: 11px;
}

.bulk-lead-counter strong {
    color: var(--theme-text);
    font-size: 14px;
}

/* =========================
   MODALS
========================= */
.crm-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 20px;
}

.crm-modal.open {
    display: flex;
}

.crm-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.52);
    backdrop-filter: blur(4px);
}

.crm-modal-box {
    width: 100%;
    max-width: 520px;
    position: relative;
    z-index: 2;

    padding: 22px;

    border: 1px solid var(--theme-border);
    border-radius: var(--radius-lg);
    background: var(--theme-surface);
    color: var(--theme-text);

    animation: modalOpen 0.2s ease;
}

.lead-modal-box {
    width: min(620px, calc(100vw - 36px));
    max-width: 620px;
    max-height: 88vh;
    overflow-y: auto;

    padding: 26px;
    border-radius: var(--radius-xl);

    box-shadow: 0 24px 65px rgba(0, 0, 0, 0.28);
}

@keyframes modalOpen {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.crm-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;

    padding-bottom: 16px;
    border-bottom: 1px solid var(--theme-border);
}

.lead-modal-box .crm-modal-header {
    padding-bottom: 18px;
    margin-bottom: 20px;
}

.crm-modal-header h2 {
    font-size: 18px;
    color: var(--theme-text);
}

.lead-modal-box .crm-modal-header h2 {
    font-size: 21px;
    font-weight: 750;
    letter-spacing: -0.3px;
}

.crm-modal-header p {
    margin-top: 5px;
    font-size: 11px;
    line-height: 1.5;
    color: var(--theme-muted);
}

.lead-modal-box .crm-modal-header p {
    font-size: 12px;
}

.modal-close {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--theme-border);
    border-radius: 8px;
    background: var(--theme-surface-soft);
    color: var(--theme-text);

    font-size: 20px;

    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.modal-close:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--black);
    transform: rotate(4deg);
}

.lead-modal-box .form-group {
    margin-bottom: 17px;
}

.lead-modal-box .form-group label {
    margin-bottom: 8px;
    font-size: 11px;
    letter-spacing: 0.15px;
}

.lead-modal-box input,
.lead-modal-box select,
.lead-modal-box textarea {
    min-height: 44px;
    padding: 11px 13px;
    border-radius: 9px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;

    padding-top: 16px;
    border-top: 1px solid var(--theme-border);
}

.lead-modal-box .modal-actions {
    margin-top: 6px;
    padding-top: 18px;
}

/* =========================
   TOAST NOTIFICATIONS
========================= */
.crm-toast {
    position: fixed;
    top: 90px;
    right: 28px;
    z-index: 10000;

    width: min(430px, calc(100vw - 40px));

    display: flex;
    align-items: flex-start;
    gap: 12px;

    padding: 15px 16px;

    border: 1px solid var(--theme-border);
    border-radius: 12px;
    background: var(--theme-surface);
    color: var(--theme-text);

    animation: toastIn 0.28s cubic-bezier(.2, .8, .2, 1);
}

.crm-toast-success {
    border-left: 4px solid #21A875;
}

.crm-toast-error {
    border-left: 4px solid var(--red);
}

.toast-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;
    font-weight: 800;
}

.crm-toast-success .toast-icon {
    background: rgba(33, 168, 117, 0.13);
    color: #21A875;
}

.crm-toast-error .toast-icon {
    background: rgba(214, 69, 69, 0.13);
    color: var(--red);
}

.toast-content {
    flex: 1;
}

.toast-content strong {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    color: var(--theme-text);
}

.toast-content span {
    display: block;
    font-size: 11px;
    line-height: 1.5;
    color: var(--theme-muted);
}

.toast-close {
    border: 0;
    background: transparent;
    color: var(--theme-muted);
    font-size: 19px;
    line-height: 1;
}

.toast-close:hover {
    color: var(--gold);
}

.crm-toast.toast-hide {
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(25px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* =========================
   NOTIFICATION BELL / PANEL
   Ready for the next step
========================= */
.notification-wrap {
    position: relative;
}

.notification-toggle {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;

    min-width: 18px;
    height: 18px;
    padding: 0 5px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 999px;
    background: var(--gold);
    color: var(--black);
    border: 2px solid var(--theme-surface);

    font-size: 9px;
    font-weight: 800;
}

.notification-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 500;

    width: min(380px, calc(100vw - 28px));
    max-height: 430px;
    overflow-y: auto;

    display: none;

    border: 1px solid var(--theme-border);
    border-radius: 14px;
    background: var(--theme-surface);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
}

.notification-panel.open {
    display: block;
}

.notification-panel-header {
    position: sticky;
    top: 0;
    z-index: 2;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    padding: 14px 16px;
    border-bottom: 1px solid var(--theme-border);
    background: var(--theme-surface);
}

.notification-panel-header strong {
    font-size: 13px;
    color: var(--theme-text);
}

.notification-list {
    padding: 6px;
}

.notification-item {
    padding: 12px;
    border-radius: 10px;
    border-bottom: 1px solid var(--theme-border);
}

.notification-item:last-child {
    border-bottom: 0;
}

.notification-item.unread {
    background: rgba(252, 163, 17, 0.07);
}

.notification-item strong {
    display: block;
    font-size: 12px;
    color: var(--theme-text);
}

.notification-item p {
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.5;
    color: var(--theme-muted);
}

.notification-item time {
    display: block;
    margin-top: 6px;
    font-size: 9px;
    color: var(--theme-muted);
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1100px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    :root {
        --sidebar-width: 200px;
    }

    .topbar-search {
        width: 280px;
    }
}

@media (max-width: 700px) {
    .sidebar {
        display: none;
    }

    .crm-main {
        width: 100%;
        margin-left: 0;
    }

    .topbar {
        padding: 0 15px;
    }

    .topbar-search {
        width: 65%;
    }

    .topbar-date,
    .topbar-user-info {
        display: none;
    }

    .page-content {
        padding: 18px;
    }

    .campaign-page-title,
    .dashboard-page-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .crm-modal-box {
        max-height: 90vh;
        overflow-y: auto;
    }
}

@media (max-width: 600px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   PREMIUM NOTIFICATION BELL
========================================= */

.notification-bell-svg {
    width: 18px;
    height: 18px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;

    pointer-events: none;

    transition:
        transform 0.18s ease,
        stroke 0.18s ease;
}


/* Utility button */
.notification-toggle {
    width: 38px;
    height: 38px;

    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 1px solid var(--theme-border);
    border-radius: 9px;

    background: var(--theme-surface-soft);
    color: var(--theme-text);

    box-shadow: none;

    cursor: pointer;

    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}


/* Hover */
.notification-toggle:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: #000000;

    transform: translateY(-2px);
}

.notification-toggle:hover .notification-bell-svg {
    transform: rotate(-7deg);
}


/* Click */
.notification-toggle:active {
    transform: translateY(0) scale(0.94);
}


/* Keyboard */
.notification-toggle:focus-visible {
    outline: 3px solid rgba(252, 163, 17, 0.20);
    outline-offset: 2px;
}


/* Unread badge */
.notification-badge {
    position: absolute;

    top: -5px;
    right: -5px;

    min-width: 18px;
    height: 18px;

    padding: 0 5px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 999px;

    background: #FCA311;
    color: #000000;

    border: 2px solid var(--theme-surface);

    font-size: 9px;
    font-weight: 800;
    line-height: 1;
}

/* =========================================================
   PREMIUM NOTIFICATION PANEL — FINAL OVERRIDES
   ========================================================= */

.notification-wrap {
    position: relative;
}

.notification-panel {
    width: min(420px, calc(100vw - 28px));
    max-height: none;
    overflow: hidden;

    border: 1px solid var(--theme-border);
    border-radius: 14px;
    background: var(--theme-surface);
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.24);
}

.notification-panel-header {
    position: relative;
    top: auto;
    z-index: 3;

    min-height: 56px;
    padding: 13px 14px 13px 16px;

    border-bottom: 1px solid var(--theme-border);
    background: var(--theme-surface);
}

.notification-panel-header strong {
    font-size: 13px;
    font-weight: 800;
    color: var(--theme-text);
}

.notification-mark-all-btn {
    min-height: 30px;
    padding: 6px 10px;

    border: 1px solid var(--theme-border);
    border-radius: 7px;

    background: var(--theme-surface-soft);
    color: var(--theme-text);

    font-size: 9px;
    font-weight: 750;

    cursor: pointer;

    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}

.notification-mark-all-btn:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: #000000;
    transform: translateY(-1px);
}

.notification-mark-all-btn:active {
    transform: scale(0.96);
}

.notification-mark-all-btn:disabled {
    opacity: 0.55;
    cursor: wait;
}

.notification-list {
    counter-reset: crm-notification;

    max-height: 430px;
    overflow-y: auto;

    padding: 10px;

    scrollbar-width: thin;
    scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}

.notification-list::-webkit-scrollbar {
    width: 8px;
}

.notification-list::-webkit-scrollbar-track {
    background: var(--scroll-track);
}

.notification-list::-webkit-scrollbar-thumb {
    background: var(--scroll-thumb);
    border: 2px solid var(--scroll-track);
    border-radius: 999px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
    background: var(--scroll-thumb-hover);
}

.notification-list::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

.notification-item[data-notification-id] {
    counter-increment: crm-notification;

    position: relative;

    min-height: 94px;

    margin-bottom: 8px;
    padding: 13px 118px 13px 48px;

    border: 1px solid var(--theme-border);
    border-radius: 11px;

    background: var(--theme-surface-soft);

    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease,
        opacity 0.18s ease;
}

.notification-item[data-notification-id]:last-child {
    margin-bottom: 0;
}

.notification-item[data-notification-id]:hover {
    border-color: rgba(252, 163, 17, 0.30);
    transform: translateX(2px);
}

.notification-item[data-notification-id].unread {
    background: rgba(252, 163, 17, 0.08);
    border-color: rgba(252, 163, 17, 0.26);
}

.notification-item[data-notification-id]::before {
    content: counter(crm-notification);

    position: absolute;
    top: 13px;
    left: 12px;

    width: 24px;
    height: 24px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--theme-border);
    border-radius: 7px;

    background: var(--theme-surface);
    color: var(--theme-muted);

    font-size: 9px;
    font-weight: 800;
}

.notification-item[data-notification-id].unread::before {
    background: var(--gold);
    border-color: var(--gold);
    color: #000000;
}

.notification-content {
    min-width: 0;
}

.notification-title {
    display: block;

    margin: 0 0 7px;

    color: var(--theme-text);

    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
}

.notification-message {
    margin: 0 !important;

    white-space: pre-line;

    color: var(--theme-muted);

    font-size: 10px !important;
    line-height: 1.65 !important;
    overflow-wrap: anywhere;
}

.notification-time {
    display: block;

    margin-top: 8px !important;

    color: var(--theme-muted);

    font-size: 8.5px !important;
    font-weight: 700;
}

.notification-actions {
    position: absolute;
    top: 10px;
    right: 10px;

    display: flex;
    align-items: center;
    gap: 6px;
}

.notification-read,
.notification-delete {
    min-height: 27px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--theme-border);
    border-radius: 7px;

    background: var(--theme-surface);
    color: var(--theme-muted);

    cursor: pointer;

    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}

.notification-read {
    padding: 0 8px;

    font-size: 8px;
    font-weight: 800;
    white-space: nowrap;
}

.notification-read:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: #000000;
    transform: translateY(-1px);
}

.notification-read:active {
    transform: scale(0.96);
}

.notification-delete {
    width: 27px;
    height: 27px;
    padding: 0;

    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}

.notification-delete:hover {
    background: rgba(214, 69, 69, 0.12);
    border-color: rgba(214, 69, 69, 0.42);
    color: var(--red);
    transform: scale(1.04);
}

.notification-delete:active {
    transform: scale(0.94);
}

.notification-read:disabled,
.notification-delete:disabled {
    opacity: 0.55;
    cursor: wait;
}

.notification-empty-state {
    padding: 28px 18px !important;
    text-align: center;
    border: 0 !important;
    background: transparent !important;
}

.notification-empty-state strong {
    display: block;
    margin-bottom: 6px;
    color: var(--theme-text);
    font-size: 12px;
}

.notification-empty-state p {
    margin: 0;
    color: var(--theme-muted);
    font-size: 10px;
    line-height: 1.5;
}

html[data-theme="dark"] .notification-item[data-notification-id] {
    background: #162540;
}

html[data-theme="dark"] .notification-item[data-notification-id].unread {
    background: linear-gradient(135deg,
            rgba(252, 163, 17, 0.11),
            rgba(252, 163, 17, 0.045));
}

@media (max-width: 520px) {
    .notification-panel {
        width: min(390px, calc(100vw - 18px));
        right: -8px;
    }

    .notification-item[data-notification-id] {
        padding-right: 42px;
        padding-top: 48px;
    }

    .notification-actions {
        left: 48px;
        right: auto;
        top: 10px;
    }
}

/* =========================================
   SINGLE / BULK LEAD MODAL SUBMIT BUTTON
========================================= */

#singleLeadModal .modal-actions button[type="submit"],
#bulkLeadModal .modal-actions button[type="submit"],
.lead-modal-box .modal-actions .btn-primary {
    background: var(--navy) !important;
    border: 1px solid var(--theme-border) !important;
    color: #FFFFFF !important;

    transition:
        background-color .18s ease,
        border-color .18s ease,
        color .18s ease,
        transform .18s ease,
        box-shadow .18s ease !important;
}

#singleLeadModal .modal-actions button[type="submit"] *,
#bulkLeadModal .modal-actions button[type="submit"] *,
.lead-modal-box .modal-actions .btn-primary * {
    color: #FFFFFF !important;
}


/* Hover */

#singleLeadModal .modal-actions button[type="submit"]:hover,
#bulkLeadModal .modal-actions button[type="submit"]:hover,
.lead-modal-box .modal-actions .btn-primary:hover {
    background: var(--gold) !important;
    border-color: var(--gold) !important;
    color: #000000 !important;

    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(252, 163, 17, .16) !important;
}

#singleLeadModal .modal-actions button[type="submit"]:hover *,
#bulkLeadModal .modal-actions button[type="submit"]:hover *,
.lead-modal-box .modal-actions .btn-primary:hover * {
    color: #000000 !important;
}


/* Click */

#singleLeadModal .modal-actions button[type="submit"]:active,
#bulkLeadModal .modal-actions button[type="submit"]:active,
.lead-modal-box .modal-actions .btn-primary:active {
    background: var(--gold-dark) !important;
    border-color: var(--gold-dark) !important;
    color: #000000 !important;

    transform: translateY(0) scale(.97);
}

/* =========================================
   DASHBOARD PRIMARY BUTTONS — FINAL FIX
========================================= */

.dashboard-page .btn-primary,
.dashboard-header .btn-primary,
.dashboard-card .btn-primary,
a.btn-primary,
button.btn-primary {
    background: var(--navy) !important;
    border-color: var(--theme-border) !important;
    color: #FFFFFF !important;

    transition:
        background-color .18s ease,
        border-color .18s ease,
        color .18s ease,
        transform .18s ease,
        box-shadow .18s ease !important;
}

.dashboard-page .btn-primary *,
.dashboard-header .btn-primary *,
.dashboard-card .btn-primary *,
a.btn-primary *,
button.btn-primary * {
    color: inherit !important;
}


/* HOVER */

.dashboard-page .btn-primary:hover,
.dashboard-header .btn-primary:hover,
.dashboard-card .btn-primary:hover,
a.btn-primary:hover,
button.btn-primary:hover {
    background: var(--gold) !important;
    border-color: var(--gold) !important;
    color: #000000 !important;

    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(252, 163, 17, .16) !important;
}

.dashboard-page .btn-primary:hover *,
.dashboard-header .btn-primary:hover *,
.dashboard-card .btn-primary:hover *,
a.btn-primary:hover *,
button.btn-primary:hover * {
    color: #000000 !important;
}


/* CLICK */

.dashboard-page .btn-primary:active,
.dashboard-header .btn-primary:active,
.dashboard-card .btn-primary:active,
a.btn-primary:active,
button.btn-primary:active {
    background: var(--gold-dark) !important;
    border-color: var(--gold-dark) !important;
    color: #000000 !important;

    transform: translateY(0) scale(.97);
}


/* =========================================================
   GLOBAL UI POLISH — COMPACT PANELS + PREMIUM SELECTS
   Calling Command Center is intentionally excluded so the
   approved calling UI remains unchanged.
   ========================================================= */

/* Keep panel/form geometry tighter across the rest of the CRM. */
body:not(.page-calling) :where(.card,
    [class$="-card"],
    [class*="-card "],
    [class$="-panel"],
    [class*="-panel "],
    .crm-modal-box,
    .crm-lead-panel,
    .settings-section,
    .settings-logo-control,
    .team-card,
    .team-stat-card,
    .team-modal-box,
    .assignment-card,
    .assignment-stat,
    .invoice-card,
    .invoice-modal-box,
    .leads-filter-card,
    .leads-table-card,
    .notification-panel,
    .crm-toast) {
    border-radius: 5px !important;
}

body:not(.page-calling) :where(input:not([type="checkbox"]):not([type="radio"]),
    textarea,
    select,
    .btn-primary,
    .btn-secondary,
    .modal-close,
    .settings-btn,
    .team-btn,
    .assignment-btn,
    .invoice-btn,
    .leads-filter-btn,
    .leads-edit-row-btn,
    .leads-delete-row-btn) {
    border-radius: 5px !important;
}

/*
 * Premium native select treatment. We keep the real <select> element
 * (rather than replacing it with JS) so all existing forms/change events
 * continue to work. Chrome/Edge still choose drop-down vs drop-up based on
 * available viewport space.
 */
body:not(.page-calling) select:not([multiple]) {
    -webkit-appearance: none !important;
    appearance: none !important;
    padding-right: 42px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23FCA311' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 13px center !important;
    background-size: 16px 16px !important;
    cursor: pointer;
}

body:not(.page-calling) select:not([multiple]):hover {
    border-color: rgba(252, 163, 17, .70) !important;
}

body:not(.page-calling) select:not([multiple]):focus {
    border-color: var(--gold) !important;
    box-shadow: 0 0 0 3px rgba(252, 163, 17, .09) !important;
}

body:not(.page-calling) select option {
    background: var(--theme-surface);
    color: var(--theme-text);
}

/* Settings no longer needs the left mini-navigation card. */
body.page-settings .settings-layout {
    display: block !important;
}

body.page-settings .settings-content {
    width: 100%;
    max-width: none;
}

/* Campaign table must remain fitted; never bring back a bottom scrollbar. */
body.page-campaigns .campaign-table-card .crm-table-wrapper {
    overflow-x: hidden !important;
}

/* =========================================================
   FINAL DEPLOYMENT UI POLISH — PREMIUM FORM CONTROLS
   UI-only. No CRM workflow, permissions or data logic changed.
   Calling Command Center keeps its approved custom controls.
   ========================================================= */

/* Accessible, consistent keyboard focus across the non-calling CRM. */
body:not(.page-calling) :where(button,
    a,
    input,
    textarea,
    select):focus-visible {
    outline: 2px solid rgba(252, 163, 17, .88);
    outline-offset: 2px;
}

/* Checkboxes/radios follow the Scalymise accent without changing behavior. */
body:not(.page-calling) :where(input[type="checkbox"],
    input[type="radio"]) {
    accent-color: var(--gold);
}

/* Smooth, premium form interactions while keeping existing dimensions. */
body:not(.page-calling) :where(input:not([type="checkbox"]):not([type="radio"]),
    textarea,
    select) {
    transition:
        border-color .18s ease,
        box-shadow .18s ease,
        background-color .18s ease,
        color .18s ease,
        transform .18s ease;
}

body:not(.page-calling) :where(input:not([type="checkbox"]):not([type="radio"]),
    textarea,
    select):hover:not(:disabled) {
    border-color: rgba(252, 163, 17, .50) !important;
}

body:not(.page-calling) :where(input:not([type="checkbox"]):not([type="radio"]),
    textarea,
    select):focus:not(:disabled) {
    border-color: var(--gold) !important;
    box-shadow: 0 0 0 3px rgba(252, 163, 17, .09) !important;
}

body:not(.page-calling) :where(input, textarea, select):disabled {
    opacity: .64;
    cursor: not-allowed;
}

/*
 * Modern Chromium/Edge (used by the local CRM) supports fully customizable
 * native selects. This keeps the ORIGINAL select element and all existing
 * form values/change events intact, while styling the opened option list.
 * Browsers without support continue to use the safe gold-chevron fallback
 * defined above.
 */
@supports (appearance: base-select) {
    body:not(.page-calling) select:not([multiple]) {
        appearance: base-select !important;
        -webkit-appearance: base-select !important;
        background-image: none !important;
        padding-right: 14px !important;
        cursor: pointer;
    }

    body:not(.page-calling) select:not([multiple])::picker-icon {
        color: var(--gold);
        width: 17px;
        height: 17px;
        margin-left: 12px;
        transition: transform .18s ease, color .18s ease;
    }

    body:not(.page-calling) select:not([multiple]):open::picker-icon {
        transform: rotate(180deg);
        color: var(--gold-dark);
    }

    body:not(.page-calling) select:not([multiple])::picker(select) {
        appearance: base-select;
        border: 1px solid var(--theme-border);
        border-radius: 7px;
        background: var(--theme-surface);
        color: var(--theme-text);
        box-shadow:
            0 18px 46px rgba(6, 13, 27, .18),
            0 4px 14px rgba(6, 13, 27, .10);
        padding: 6px;
        margin-block: 6px;
        max-height: min(360px, 52vh);
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: var(--scroll-thumb) transparent;
    }

    html[data-theme="dark"] body:not(.page-calling) select:not([multiple])::picker(select) {
        box-shadow:
            0 22px 54px rgba(0, 0, 0, .42),
            0 5px 16px rgba(0, 0, 0, .28);
    }

    body:not(.page-calling) select:not([multiple]) option {
        min-height: 38px;
        padding: 9px 11px;
        margin: 2px 0;
        border: 0;
        border-radius: 5px;
        background: transparent;
        color: var(--theme-text);
        cursor: pointer;
        font-weight: 500;
        line-height: 1.35;
        transition: background-color .14s ease, color .14s ease;
    }

    body:not(.page-calling) select:not([multiple]) option:hover,
    body:not(.page-calling) select:not([multiple]) option:focus {
        background: var(--gold);
        color: #000000;
    }

    body:not(.page-calling) select:not([multiple]) option:checked {
        background: rgba(252, 163, 17, .14);
        color: var(--theme-text);
        font-weight: 800;
    }

    body:not(.page-calling) select:not([multiple]) option:checked:hover,
    body:not(.page-calling) select:not([multiple]) option:checked:focus {
        background: var(--gold);
        color: #000000;
    }

    body:not(.page-calling) select:not([multiple]) option:disabled {
        color: var(--theme-muted);
        opacity: .58;
        cursor: not-allowed;
    }

    body:not(.page-calling) select:not([multiple]) option::checkmark {
        color: var(--gold);
        margin-right: 9px;
    }
}

/* Keep opened controls above modal/card content without altering layout. */
body:not(.page-calling) :where(.crm-modal-box,
    .crm-lead-panel,
    .team-modal-box,
    .invoice-modal-box,
    .campaign-modal-box) {
    isolation: isolate;
}

/* Small visual consistency pass for tables and action controls. */
body:not(.page-calling) :where(table tbody tr,
    [class*="-table"] tbody tr) {
    transition: background-color .16s ease;
}

body:not(.page-calling) :where([class*="-actions"] button,
    [class*="-actions"] a,
    td:last-child button,
    td:last-child a) {
    white-space: nowrap;
}

/* Premium but unobtrusive scrollbars in working panels/modals. */
body:not(.page-calling) :where(.crm-modal-box,
    .crm-lead-modal-body,
    .team-modal-box,
    .notification-list,
    textarea) {
    scrollbar-width: thin;
    scrollbar-color: var(--scroll-thumb) transparent;
}

body:not(.page-calling) :where(.crm-modal-box,
    .crm-lead-modal-body,
    .team-modal-box,
    .notification-list,
    textarea)::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

body:not(.page-calling) :where(.crm-modal-box,
    .crm-lead-modal-body,
    .team-modal-box,
    .notification-list,
    textarea)::-webkit-scrollbar-track {
    background: transparent;
}

body:not(.page-calling) :where(.crm-modal-box,
    .crm-lead-modal-body,
    .team-modal-box,
    .notification-list,
    textarea)::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: var(--scroll-thumb);
}

body:not(.page-calling) :where(.crm-modal-box,
    .crm-lead-modal-body,
    .team-modal-box,
    .notification-list,
    textarea)::-webkit-scrollbar-thumb:hover {
    background: var(--scroll-thumb-hover);
}

/* Users who prefer less motion keep a calm interface. */
@media (prefers-reduced-motion: reduce) {

    body:not(.page-calling) *,
    body:not(.page-calling) *::before,
    body:not(.page-calling) *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}


/* =========================================
   FINAL SIDEBAR ICON REVEAL
   Keep text aligned; reveal icons only on hover or the active gold item.
========================================= */
.sidebar .nav-item .nav-icon {
    opacity: 0;
    transform: scale(.78);
    transition: opacity .16s ease, transform .16s ease, color .16s ease;
}

.sidebar .nav-item:hover .nav-icon,
.sidebar .nav-item.active .nav-icon {
    opacity: 1;
    transform: scale(1);
}