﻿/* =====================================================
   DTX360 DESIGN SYSTEM - GLOBAL CSS (v3 FULL FINAL)
   Light + Dark Theme / Token Based
   ===================================================== */

/* =========================
   ROOT TOKENS (LIGHT DEFAULT)
========================= */
:root {
    /* APP */
    --app-bg: #f8fafc;
    --app-bg-soft: #f1f5f9;
    --app-surface: #ffffff;
    /* CARD / PANEL */
    --card-bg: #ffffff;
    --card-bg-hover: #f8fafc;
    /* TEXT */
    --text-main: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-soft: #94a3b8;
    --text-on-dark: #ffffff;
    /* BRAND */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-active: #1e40af;
    --primary-soft: #eaf2ff;
    --success: #10b981;
    --success-hover: #059669;
    --success-soft: #eafaf4;
    --warning: #f59e0b;
    --warning-hover: #d97706;
    --warning-soft: #fff7e8;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --danger-soft: #fef0f0;
    --info: #06b6d4;
    --info-hover: #0891b2;
    --info-soft: #ecfeff;
    /* BORDER */
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    /* SHADOW */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 10px 24px rgba(15, 23, 42, 0.08);
    /* RADIUS */
    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-pill: 999px;
    /* NAVBAR */
    --navbar-bg: #ffffff;
    --navbar-text: var(--text-secondary);
    --navbar-text-strong: var(--text-main);
    --navbar-hover-bg: var(--app-bg-soft);
    --navbar-active-bg: var(--primary-soft);
    --navbar-border: var(--border);
    --navbar-shadow: var(--shadow-xs);
    /* DROPDOWN */
    --dropdown-bg: #ffffff;
    --dropdown-text: var(--text-secondary);
    --dropdown-border: var(--border);
    --dropdown-hover-bg: var(--app-bg-soft);
    --dropdown-shadow: var(--shadow-md);
    /* INPUT */
    --input-bg: #ffffff;
    --input-border: var(--border);
    --input-text: var(--text-main);
    --input-placeholder: var(--text-soft);
    /* TABLE */
    --table-bg: #ffffff;
    --table-head-bg: #f8fafc;
    --table-row-even: #fcfdff;
    --table-row-hover: #f1f5f9;
    --table-border: #edf2f7;
    /* MODAL */
    --modal-bg: #ffffff;
    --modal-header-bg: #ffffff;
    --modal-footer-bg: #ffffff;
    /* PROGRESS */
    --progress-bg: #eaf0f6;
    /* AUTH */
    --auth-bg-start: #f8fafc;
    --auth-bg-end: #eef4ff;
    /* SCROLLBAR */
    --scrollbar-track: #f1f5f9;
    --scrollbar-thumb: #cbd5e1;
    --scrollbar-thumb-hover: #94a3b8;
    /* SPECIAL */
    --bg-dark: #0f172a;
    --focus-ring: 0 0 0 0.22rem rgba(37, 99, 235, 0.18);
    /* STATE */
    --saving-bg: #fff8db;
    --saved-bg: #eaf8ef;
    /* HEADER */
    --header-height: 68px;
    --header-control-height: 40px;
    --header-control-radius: 10px;
    /* TRANSITIONS */
    --transition-fast: 0.15s ease-in-out;
    --transition-base: 0.2s ease;
}

/* =========================
   DARK THEME OVERRIDES
========================= */
html[data-theme="dark"] {
    /* APP */
    --app-bg: #0b1220;
    --app-bg-soft: #111827;
    --app-surface: #0f172a;
    /* CARD / PANEL */
    --card-bg: #0f172a;
    --card-bg-hover: #162033;
    /* TEXT */
    --text-main: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-soft: #7c8aa0;
    --text-on-dark: #ffffff;
    /* BRAND */
    --primary: #60a5fa;
    --primary-hover: #3b82f6;
    --primary-active: #2563eb;
    --primary-soft: rgba(96, 165, 250, 0.12);
    --success: #34d399;
    --success-hover: #10b981;
    --success-soft: rgba(52, 211, 153, 0.12);
    --warning: #fbbf24;
    --warning-hover: #f59e0b;
    --warning-soft: rgba(251, 191, 36, 0.14);
    --danger: #f87171;
    --danger-hover: #ef4444;
    --danger-soft: rgba(248, 113, 113, 0.12);
    --info: #22d3ee;
    --info-hover: #06b6d4;
    --info-soft: rgba(34, 211, 238, 0.12);
    /* BORDER */
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);
    /* SHADOW */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.22);
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.22);
    --shadow-md: 0 14px 34px rgba(0, 0, 0, 0.32);
    /* NAVBAR */
    --navbar-bg: #0f172a;
    --navbar-text: rgba(255,255,255,0.82);
    --navbar-text-strong: #ffffff;
    --navbar-hover-bg: rgba(255,255,255,0.06);
    --navbar-active-bg: rgba(255,255,255,0.10);
    --navbar-border: rgba(255,255,255,0.06);
    --navbar-shadow: 0 6px 24px rgba(2,6,23,0.35);
    /* DROPDOWN */
    --dropdown-bg: #111827;
    --dropdown-text: #e5e7eb;
    --dropdown-border: rgba(255, 255, 255, 0.08);
    --dropdown-hover-bg: rgba(255, 255, 255, 0.06);
    --dropdown-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
    /* INPUT */
    --input-bg: #0f172a;
    --input-border: rgba(255, 255, 255, 0.10);
    --input-text: #f8fafc;
    --input-placeholder: #94a3b8;
    /* TABLE */
    --table-bg: #0f172a;
    --table-head-bg: #111827;
    --table-row-even: #101a2b;
    --table-row-hover: #162033;
    --table-border: rgba(255, 255, 255, 0.04) !important;
    /* MODAL */
    --modal-bg: #0f172a;
    --modal-header-bg: #111827;
    --modal-footer-bg: #111827;
    /* PROGRESS */
    --progress-bg: #1f2937;
    /* AUTH */
    --auth-bg-start: #0b1220;
    --auth-bg-end: #111827;
    /* SCROLLBAR */
    --scrollbar-track: #111827;
    --scrollbar-thumb: #334155;
    --scrollbar-thumb-hover: #475569;
    /* SPECIAL */
    --bg-dark: #020617;
    --focus-ring: 0 0 0 0.22rem rgba(96, 165, 250, 0.22);
    /* STATE */
    --saving-bg: rgba(251, 191, 36, 0.16);
    --saved-bg: rgba(52, 211, 153, 0.16);
}

/* =========================
   ROOT & BASE
========================= */
html {
    font-size: 15px;
    position: relative;
    min-height: 100%;
    height: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--app-bg);
    padding-top: var(--header-height);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
}

html, body {
    height: 100%;
}

.main-content {
    flex: 1;
}

/* =========================
   TYPOGRAPHY
========================= */
h1,
.h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    color: var(--text-main);
}

h2,
.h2 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin-bottom: 14px;
    color: var(--text-main);
}

h3,
.h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-main);
}

h4,
.h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-main);
}

p {
    margin-bottom: 10px;
    color: var(--text-secondary);
}

strong {
    font-weight: 600;
    color: var(--text-main);
}

small,
.small {
    color: var(--text-muted);
}

/* =========================
   LINKS
========================= */
a {
    color: var(--primary);
    text-decoration: none !important;
    transition: color var(--transition-fast), opacity var(--transition-fast);
}

    a:hover {
        color: var(--primary-hover);
        opacity: 1;
    }

hr {
    border: 0;
    border-top: 1px solid var(--border) !important;
    opacity: 1;
}

/* =========================
   TEXT HELPERS
========================= */
.text-muted {
    color: var(--text-muted) !important;
}

.text-muted-soft {
    color: var(--text-muted);
    font-size: 13px;
}

.text-small {
    font-size: 12px;
}

.text-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.text-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
}

.text-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
}

/* =========================
   NAVBAR
========================= */

.navbar {
    background: color-mix(in srgb, var(--navbar-bg) 96%, transparent) !important;
    border-bottom: 1px solid var(--navbar-border);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.055);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* =========================
   BRAND
========================= */

.navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text-main) !important;
    font-size: 14px;
    font-weight: 750;
    line-height: 1;
    letter-spacing: -0.015em;
    box-shadow: none;
    white-space: nowrap;
    transition: color var(--transition-fast), opacity var(--transition-fast);
}

    .navbar-brand::before {
        content: "›";
        width: 24px;
        height: 24px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 24px;
        border-radius: 7px;
        background: var(--primary);
        color: #ffffff;
        font-size: 18px;
        font-weight: 700;
        line-height: 1;
        box-shadow: 0 3px 8px rgba(37, 99, 235, 0.16);
        transition: transform var(--transition-fast), background-color var(--transition-fast);
    }

    .navbar-brand:hover,
    .navbar-brand:focus {
        color: var(--text-main) !important;
    }

        .navbar-brand:hover::before,
        .navbar-brand:focus::before {
            background: var(--primary-hover);
            transform: translateX(1px);
        }

    .navbar-brand:active::before {
        transform: translateX(0);
    }

html[data-theme="dark"] .navbar-brand {
    color: var(--text-main) !important;
}

    html[data-theme="dark"] .navbar-brand::before {
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.24);
    }


/* =========================
   NAVIGATION
========================= */

.navbar-nav .nav-link {
    position: relative;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: var(--navbar-text-strong) !important;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    transition: color var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast);
}

    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link:focus {
        background: var(--navbar-hover-bg);
        border-color: color-mix(in srgb, var(--border) 65%, transparent);
        color: var(--navbar-text-strong) !important;
    }

    .navbar-nav .nav-link.active {
        background: color-mix( in srgb, var(--primary) 8%, var(--navbar-bg) );
        border-color: color-mix( in srgb, var(--primary) 12%, transparent );
        color: var(--navbar-text-strong) !important;
        font-weight: 600;
    }


        /* subtle active indicator */

        .navbar-nav .nav-link.active::before {
            content: "";
            position: absolute;
            left: 50%;
            bottom: 3px;
            width: 14px;
            height: 2px;
            border-radius: 999px;
            background: var(--primary);
            transform: translateX(-50%);
            opacity: .85;
        }


/* =========================
   NAV ICONS
========================= */

.nav-menu-icon {
    width: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 16px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1;
    opacity: .86;
    transition: color var(--transition-fast), opacity var(--transition-fast), transform var(--transition-fast);
}

.navbar-nav .nav-link:hover .nav-menu-icon,
.navbar-nav .nav-link:focus .nav-menu-icon {
    color: var(--text-secondary);
    opacity: 1;
}

.navbar-nav .nav-link.active .nav-menu-icon {
    color: var(--primary);
    opacity: 1;
}


/* =========================
   DROPDOWN ARROWS
========================= */

.navbar-nav .dropdown-toggle::after {
    margin-left: 3px;
    vertical-align: middle;
    border-top-width: 4px;
    border-right-width: 4px;
    border-left-width: 4px;
    opacity: .75;
    transition: transform var(--transition-fast);
}

.navbar-nav .dropdown-toggle.show::after,
.navbar-nav .dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
}


/* =========================
   NAVBAR TOGGLER
========================= */

.navbar-toggler {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: transparent;
    transition: background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

    .navbar-toggler:hover {
        background: var(--navbar-hover-bg);
        border-color: var(--border-strong);
    }

    .navbar-toggler:focus {
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent);
    }


/* =========================
   DARK MODE
========================= */

html[data-theme="dark"] .navbar {
    box-shadow: 0 6px 22px rgba(2, 6, 23, .34);
}

html[data-theme="dark"] .navbar-brand {
    border-color: rgba(96, 165, 250, 0.18);
    box-shadow: 0 5px 16px rgba(2, 6, 23, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

    html[data-theme="dark"] .navbar-brand::before {
        border-color: rgba(255, 255, 255, 0.12);
        background: linear-gradient( 145deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05) );
    }

html[data-theme="dark"] .navbar-nav .nav-link.active {
    background: color-mix( in srgb, var(--primary) 12%, var(--navbar-bg) );
    border-color: color-mix( in srgb, var(--primary) 18%, transparent );
}

/* =========================================================
   HEADER CONTROL SYSTEM
========================================================= */

.navbar.fixed-top {
    min-height: var(--header-height);
    padding-top: 10px;
    padding-bottom: 10px;
}

.navbar > .container-fluid {
    min-height: calc(var(--header-height) - 20px);
    align-items: center;
}

.navbar-collapse,
.navbar-nav {
    align-items: center;
}

    /* Left-side navigation links */
    .navbar-nav > .nav-item > .nav-link {
        min-height: var(--header-control-height);
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Right-side header controls */
    #themeToggle,
    #notificationDropdownToggle,
    .navbar-nav.align-items-center > .nav-item.dropdown > .nav-link {
        min-height: var(--header-control-height);
        height: var(--header-control-height);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 12px;
        color: var(--navbar-text-strong) !important;
        background: transparent;
        border: 1px solid var(--border-strong);
        border-radius: var(--header-control-radius);
        line-height: 1;
        white-space: nowrap;
        transition: color var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast);
    }

/* Theme and notification controls remain square */
#themeToggle,
#notificationDropdownToggle {
    width: var(--header-control-height);
    min-width: var(--header-control-height);
    padding: 0;
}

/* Language and profile controls */
.navbar-nav.align-items-center > .nav-item.dropdown > .nav-link {
    gap: 8px;
}

    /* Shared hover and expanded states */
    #themeToggle:hover,
    #themeToggle:focus,
    #notificationDropdownToggle:hover,
    #notificationDropdownToggle:focus,
    .navbar-nav.align-items-center > .nav-item.dropdown > .nav-link:hover,
    .navbar-nav.align-items-center > .nav-item.dropdown > .nav-link:focus,
    .navbar-nav.align-items-center > .nav-item.dropdown > .nav-link.show,
    .navbar-nav.align-items-center > .nav-item.dropdown > .nav-link[aria-expanded="true"] {
        color: var(--navbar-text-strong) !important;
        background: var(--navbar-hover-bg);
        border-color: var(--border-strong);
        box-shadow: none !important;
    }

    .navbar-nav.align-items-center > .nav-item.dropdown > .nav-link.dropdown-toggle::after {
        margin-left: 2px;
        vertical-align: middle;
    }

#notificationDropdownToggle::after {
    display: none;
}

.navbar-nav.align-items-center {
    gap: 8px;
}

    .navbar-nav.align-items-center > .nav-item {
        margin-right: 0 !important;
    }

        .navbar-nav.align-items-center > .nav-item.dropdown > .nav-link
        .badge {
            min-height: 28px;
            display: inline-flex;
            align-items: center;
            padding: 5px 10px;
        }

.navbar-brand {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
}

.main-content {
    padding-top: 18px !important;
}

html[data-theme="dark"] #themeToggle,
html[data-theme="dark"] #notificationDropdownToggle,
html[data-theme="dark"]
.navbar-nav.align-items-center > .nav-item.dropdown > .nav-link {
    color: var(--navbar-text-strong) !important;
    background: transparent;
    border-color: var(--border-strong);
}

    html[data-theme="dark"] #themeToggle:hover,
    html[data-theme="dark"] #themeToggle:focus,
    html[data-theme="dark"] #notificationDropdownToggle:hover,
    html[data-theme="dark"] #notificationDropdownToggle:focus,
    html[data-theme="dark"]
    .navbar-nav.align-items-center > .nav-item.dropdown > .nav-link:hover,
    html[data-theme="dark"]
    .navbar-nav.align-items-center > .nav-item.dropdown > .nav-link:focus,
    html[data-theme="dark"]
    .navbar-nav.align-items-center > .nav-item.dropdown > .nav-link.show,
    html[data-theme="dark"]
    .navbar-nav.align-items-center > .nav-item.dropdown > .nav-link[aria-expanded="true"] {
        background: var(--navbar-hover-bg);
        border-color: rgba(255, 255, 255, 0.22);
    }

/* =========================================================
   HEADER RESPONSIVE
========================================================= */

@media (max-width: 1199.98px) {
    :root {
        --header-height: 62px;
    }

    .navbar.fixed-top {
        min-height: var(--header-height);
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .navbar > .container-fluid {
        min-height: calc(var(--header-height) - 16px);
        align-items: center;
    }

    .navbar-brand {
        flex: 0 0 auto;
    }

    .navbar-toggler {
        width: 40px;
        height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: 1px solid var(--border-strong);
        border-radius: var(--header-control-radius);
        background: transparent;
    }

    .navbar-collapse {
        width: 100%;
        padding-top: 12px;
        padding-bottom: 10px;
    }

        /* Main navigation becomes vertical. */
        .navbar-collapse > .navbar-nav:first-child {
            width: 100%;
            align-items: stretch;
            gap: 2px;
        }

            .navbar-collapse > .navbar-nav:first-child > .nav-item {
                width: 100%;
            }

                .navbar-collapse > .navbar-nav:first-child > .nav-item > .nav-link {
                    width: 100%;
                    min-height: 40px;
                    justify-content: flex-start;
                    padding: 8px 12px;
                    white-space: nowrap;
                }

            .navbar-collapse > .navbar-nav:first-child .dropdown-menu {
                position: static !important;
                width: 100%;
                margin: 4px 0 6px;
                transform: none !important;
                box-shadow: none;
            }

    /*
       Utility area stays compact.
       Theme, notifications and AI remain square;
       language and profile keep their natural width.
    */
    .navbar-nav.align-items-center {
        width: 100%;
        display: flex;
        flex-direction: row;
        align-items: center !important;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid var(--navbar-border);
    }

        .navbar-nav.align-items-center > .nav-item {
            width: auto;
            flex: 0 0 auto;
            margin-right: 0 !important;
        }

    #themeToggle,
    #notificationDropdownToggle,
    .ai-assistant-toggle {
        width: var(--header-control-height);
        min-width: var(--header-control-height);
        height: var(--header-control-height);
        padding: 0;
        justify-content: center;
    }

    .navbar-nav.align-items-center > .nav-item.dropdown > .nav-link {
        width: auto;
        min-width: 0;
        justify-content: center;
        padding-left: 12px;
        padding-right: 12px;
    }

    /*
       Do not force notification/language/profile dropdowns into document flow.
       Let Bootstrap/Popper position them as dropdowns.
    */
    .navbar-nav.align-items-center .dropdown-menu {
        width: auto;
    }

    /* Notification keeps its badge anchored to the square toggle. */
    #notificationDropdownWrapper {
        width: auto;
    }

    /* Application AI toggle stays compact while its drawer remains fixed. */
    .ai-assistant-header-item,
    .ai-assistant-header-item .ai-assistant {
        width: auto;
        flex: 0 0 auto;
    }

        .ai-assistant-header-item .ai-assistant-toggle {
            display: inline-flex;
        }
}

@media (max-width: 575.98px) {
    .navbar-nav.align-items-center {
        gap: 7px;
    }

        /*
       On very narrow screens, language/profile may wrap to a second row,
       while utility icon buttons remain compact.
    */
        .navbar-nav.align-items-center > .nav-item.dropdown > .nav-link {
            max-width: calc(100vw - 32px);
        }
}

/* =========================
   DROPDOWN
========================= */
.dropdown-menu {
    border-radius: 12px;
    border: 1px solid var(--dropdown-border);
    box-shadow: var(--dropdown-shadow);
    padding: 8px 0;
    min-width: 190px;
    background: var(--dropdown-bg);
    transform: translateY(8px);
    transition: all var(--transition-fast);
}

    .dropdown-menu.show {
        transform: translateY(0);
    }

.dropdown-item {
    font-size: 14px;
    font-weight: 500;
    color: var(--dropdown-text);
    padding: 9px 16px;
    transition: all var(--transition-fast);
}

    .dropdown-item:hover,
    .dropdown-item:focus {
        background-color: var(--dropdown-hover-bg);
        color: var(--navbar-text-strong);
    }

html[data-theme="light"] .dropdown-item:hover,
html[data-theme="light"] .dropdown-item:focus,
html:not([data-theme]) .dropdown-item:hover,
html:not([data-theme]) .dropdown-item:focus {
    color: var(--primary);
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--primary-soft);
    color: var(--primary);
}

.dropdown-divider {
    margin: 6px 0;
    border-color: var(--border);
}

/* =========================
   BADGES
========================= */
.badge {
    font-weight: 600;
    border-radius: var(--radius-pill);
    padding: 6px 10px;
}

    .badge.bg-dark {
        background-color: var(--bg-dark) !important;
    }

    .badge.bg-success-subtle {
        background-color: var(--success-soft) !important;
        color: var(--success) !important;
        border: 1px solid color-mix(in srgb, var(--success) 16%, transparent);
    }

    .badge.bg-danger-subtle {
        background-color: var(--danger-soft) !important;
        color: var(--danger) !important;
        border: 1px solid color-mix(in srgb, var(--danger) 14%, transparent);
    }

    .badge.bg-warning-subtle {
        background-color: var(--warning-soft) !important;
        color: var(--warning) !important;
        border: 1px solid color-mix(in srgb, var(--warning) 16%, transparent);
    }

    .badge.bg-primary-subtle {
        background-color: var(--primary-soft) !important;
        color: var(--primary) !important;
        border: 1px solid color-mix(in srgb, var(--primary) 14%, transparent);
    }

/* =========================
   TABLES
========================= */
.table {
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--card-bg);
    border: none !important;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 0;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

html[data-theme="dark"] .table {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
}

.table thead th {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    background: var(--table-head-bg);
    border-bottom: 1px solid var(--border) !important;
    padding: 12px 16px;
}

.table th {
    font-weight: 600;
    font-size: 12.5px;
    color: var(--text-secondary);
}

.table td {
    font-weight: 400;
    color: var(--text-secondary);
    vertical-align: middle;
}

.table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--table-border);
}

.table tbody tr:nth-child(even) {
    background: var(--table-row-even);
}

.table-hover tbody tr:hover {
    background: var(--table-row-hover);
}

.table-bordered > :not(caption) > * > * {
    border: none !important;
}

.table td.text-center {
    white-space: nowrap;
}

.table .btn-sm {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 4px 8px;
}

    .table .btn-sm:hover {
        background: var(--app-bg-soft);
        color: var(--text-main);
    }

.table .btn-delete:hover {
    background: rgba(239, 68, 68, 0.10);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.28);
}

#templateTableBody tr {
    background-color: var(--table-bg);
}

    #templateTableBody tr:hover {
        background-color: var(--table-row-hover);
    }

/* =========================
   DRAG HANDLE
========================= */
.drag-handle {
    cursor: grab;
    opacity: 0.45;
    transition: opacity var(--transition-fast);
}

    .drag-handle:hover {
        opacity: 1;
    }

/* =========================
   FORMS
========================= */
label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-control,
.form-select,
textarea.form-control {
    font-size: 14px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--input-border);
    color: var(--input-text);
    background-color: var(--input-bg);
    box-shadow: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

    .form-control::placeholder,
    textarea.form-control::placeholder {
        color: var(--input-placeholder);
    }

    .form-control:hover,
    .form-select:hover {
        border-color: var(--border-strong);
    }

    .form-control:focus,
    .form-select:focus,
    .form-check-input:focus {
        border-color: color-mix(in srgb, var(--primary) 45%, transparent);
        box-shadow: var(--focus-ring);
    }

.form-control-sm,
.form-select-sm {
    font-size: 13px !important;
    padding: 4px 10px !important;
    height: 34px;
}

/* focus generic */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: var(--focus-ring);
}

/* =========================
   INPUT GROUP
========================= */
.input-group .btn {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.input-group .form-control:focus {
    z-index: 2;
}

/* =========================
   BUTTONS
========================= */
.btn {
    font-size: 13px;
    font-weight: 600;
    padding: 7px 13px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    box-shadow: none !important;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

    .btn-primary:hover,
    .btn-primary:focus {
        background-color: var(--primary-hover);
        border-color: var(--primary-hover);
    }

    .btn-primary:active {
        background-color: var(--primary-active) !important;
        border-color: var(--primary-active) !important;
    }

.btn-outline-primary {
    color: var(--primary);
    border-color: color-mix(in srgb, var(--primary) 28%, transparent);
    background-color: transparent;
}

    .btn-outline-primary:hover,
    .btn-outline-primary:focus {
        color: var(--primary);
        background-color: var(--primary-soft);
        border-color: color-mix(in srgb, var(--primary) 40%, transparent);
    }

.btn-outline-secondary {
    color: var(--text-secondary);
    border-color: var(--border-strong);
    background-color: transparent;
}

    .btn-outline-secondary:hover,
    .btn-outline-secondary:focus {
        color: var(--text-main);
        background-color: var(--app-bg-soft);
        border-color: var(--border-strong);
    }

.btn-success {
    background-color: var(--success);
    border-color: var(--success);
    color: #fff;
}

    .btn-success:hover,
    .btn-success:focus {
        background-color: var(--success-hover);
        border-color: var(--success-hover);
    }

.btn-danger {
    background-color: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

    .btn-danger:hover,
    .btn-danger:focus {
        background-color: var(--danger-hover);
        border-color: var(--danger-hover);
    }

.btn-light {
    background-color: var(--card-bg);
    border-color: var(--border);
    color: var(--text-secondary);
}

    .btn-light:hover,
    .btn-light:focus {
        background-color: var(--app-bg-soft);
        border-color: var(--border-strong);
        color: var(--text-main);
    }

.btn-link {
    color: var(--primary);
    font-weight: 500;
}

    .btn-link:hover,
    .btn-link:focus {
        text-decoration: none;
        color: var(--primary-hover);
    }

/* =========================
   CARDS
========================= */
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background-color: var(--card-bg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
}

    .card:hover {
        background-color: var(--card-bg);
        box-shadow: var(--shadow-md);
    }

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
}

.card-subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

/* =========================
   PAGINATION
========================= */
.pagination .page-link {
    font-size: 13px;
    color: var(--text-secondary);
    border-color: var(--border);
    border-radius: var(--radius-sm);
    margin: 0 2px;
    background-color: var(--card-bg);
}

    .pagination .page-link:hover {
        color: var(--primary);
        background-color: var(--primary-soft);
        border-color: color-mix(in srgb, var(--primary) 22%, transparent);
    }

.pagination .page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* =========================
   NAV TABS
========================= */
.nav-tabs {
    border-bottom-color: var(--border);
}

    .nav-tabs .nav-link {
        border: 1px solid transparent;
        border-radius: 10px 10px 0 0;
        color: var(--text-muted);
        font-weight: 500;
    }

        .nav-tabs .nav-link:hover {
            color: var(--primary);
            background-color: transparent;
            border-color: transparent;
        }

        .nav-tabs .nav-link.active {
            color: var(--primary);
            font-weight: 600;
            background-color: var(--card-bg);
            border-color: var(--border) var(--border) var(--card-bg);
        }

/* =========================
   MODAL
========================= */
.modal-content {
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    background-color: var(--modal-bg);
}

.modal-header {
    border-bottom: 1px solid var(--border);
    background-color: var(--modal-header-bg);
}

.modal-footer {
    border-top: 1px solid var(--border);
    background-color: var(--modal-footer-bg);
}

.modal-title {
    font-weight: 600;
    color: var(--text-main);
}

/* =========================
   EMPTY STATE
========================= */
.text-empty {
    color: var(--text-muted);
    font-size: 14px;
}

/* =========================
   LOGIN
========================= */
.password-toggle {
    position: absolute;
    top: 38px;
    right: 12px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 14px;
    transition: color var(--transition-fast);
}

    .password-toggle:hover {
        color: var(--primary);
    }

.auth-bg {
    background: linear-gradient(135deg, var(--auth-bg-start), var(--auth-bg-end));
}

/* =========================
   ANSWERS / ASSESSMENT
========================= */
.question-box {
    transition: all var(--transition-base);
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card-bg);
}

    .question-box:hover {
        box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
        border-color: color-mix(in srgb, var(--primary) 20%, var(--border));
    }

html[data-theme="dark"] .question-box:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.saving-state {
    background-color: var(--saving-bg) !important;
}

.saved-state {
    background-color: var(--saved-bg) !important;
}

.toggle-icon {
    transition: transform 0.2s ease;
}

    .toggle-icon.rotate {
        transform: rotate(180deg);
    }

/* =========================
   PROGRESS / SCORE
========================= */
.progress {
    background-color: var(--progress-bg);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.progress-bar {
    border-radius: var(--radius-pill);
}

.score-low {
    color: var(--danger) !important;
}

.score-mid {
    color: var(--warning) !important;
}

.score-high {
    color: var(--success) !important;
}

/* =========================
   UTILITIES
========================= */
.border-soft {
    border: 1px solid var(--border) !important;
}

.bg-soft {
    background-color: var(--app-bg-soft) !important;
}

.bg-primary-soft {
    background-color: var(--primary-soft) !important;
}

.bg-success-soft {
    background-color: var(--success-soft) !important;
}

.rounded-xl {
    border-radius: 14px !important;
}

.shadow-soft {
    box-shadow: var(--shadow-sm) !important;
}

/* =========================
   BOOTSTRAP COLOR ALIGNMENT
========================= */
.text-primary {
    color: var(--primary) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

.border-primary {
    border-color: var(--primary) !important;
}

.text-success {
    color: var(--success) !important;
}

.bg-success {
    background-color: var(--success) !important;
}

.text-danger {
    color: var(--danger) !important;
}

.bg-danger {
    background-color: var(--danger) !important;
}

.text-warning {
    color: var(--warning) !important;
}

.bg-warning {
    background-color: var(--warning) !important;
    color: #111827 !important;
}

/* =========================
   TRANSITIONS
========================= */
.btn,
.table tbody tr,
.card,
.dropdown-menu {
    transition: all var(--transition-fast);
}

/* =========================
   SCROLLBAR (DESKTOP)
========================= */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: var(--radius-pill);
    border: 2px solid var(--scrollbar-track);
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--scrollbar-thumb-hover);
    }

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {
    h1,
    .h1 {
        font-size: 24px;
    }

    h2,
    .h2 {
        font-size: 20px;
    }

    h3,
    .h3 {
        font-size: 17px;
    }

    .navbar-nav .nav-link {
        padding: 10px 12px;
    }

    .card {
        border-radius: 12px;
    }

    .modal-content {
        border-radius: 14px;
    }
}

/* TABLE ROW BORDER KILL (kesin çözüm) */
.table tr,
.table td,
.table th {
    border: none !important;
}

html[data-theme="dark"] .bg-white {
    background-color: var(--card-bg) !important;
}

html[data-theme="dark"] .border,
html[data-theme="dark"] .border-top,
html[data-theme="dark"] .border-end {
    border-color: var(--border) !important;
}

html[data-theme="dark"] .shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

/* =========================
   CATEGORY SIDEBAR - DARK FIX
========================= */

.category-sidebar {
    position: sticky;
    top: 72px;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
}

/* mobile disable */
@media (max-width: 768px) {
    .category-sidebar {
        position: static;
        max-height: none;
    }
}

/* dark border */
html[data-theme="dark"] .category-sidebar {
    border-right: 1px solid var(--border);
}

html[data-theme="dark"] .col-md-3 {
    border-right: 1px solid var(--border) !important;
}

/* container hissi ver */
html[data-theme="dark"] #catList_0,
html[data-theme="dark"] [id^="catList_"] {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 6px;
}

/* item base */
html[data-theme="dark"] .list-group-item {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: all 0.15s ease;
}

    /* hover */
    html[data-theme="dark"] .list-group-item:hover {
        background: rgba(255,255,255,0.04);
        color: var(--text-main);
    }

    /* ACTIVE (en kritik) */
    html[data-theme="dark"] .list-group-item.active {
        background: var(--primary-soft);
        color: var(--primary);
        font-weight: 600;
    }

    /* progress bar contrast fix */
    html[data-theme="dark"] .list-group-item .progress {
        background: rgba(255,255,255,0.08);
    }

/* =========================
   DISABLED FIX - DARK MODE
========================= */

html[data-theme="dark"] .form-control:disabled,
html[data-theme="dark"] .form-control[readonly] {
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.6);
    border-color: rgba(255,255,255,0.06);
    opacity: 1; /* Bootstrap bozuyor bunu */
}

/* textarea da dahil */
html[data-theme="dark"] textarea:disabled {
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.6);
}

/* =========================
   STICKY FORM ACTIONS
========================= */

.form-actions-sticky {
    position: sticky;
    bottom: 0;
    z-index: 50;
    padding: 12px 0;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(6px);
}

    /* gölge */
    .form-actions-sticky::before {
        content: "";
        position: absolute;
        top: -10px;
        left: 0;
        right: 0;
        height: 10px;
        background: linear-gradient(to top, rgba(0,0,0,0.05), transparent);
    }

/* mobile */
@media (max-width: 768px) {
    .form-actions-sticky .container {
        padding: 0 12px;
    }

    .form-actions-sticky button,
    .form-actions-sticky a {
        flex: 1;
    }
}

.drawer {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 2000;
}

.drawer-panel {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 90%;
    max-width: 700px;
    background: var(--card-bg);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    will-change: transform;
}

/* DRAWER FIX */

.drawer.open {
    opacity: 1;
    visibility: visible;
}

.drawer-panel {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 90%;
    max-width: 500px;
    background: var(--card-bg);
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.drawer.open .drawer-panel {
    transform: translateX(0);
}

#drawerBody {
    flex: 1;
    overflow-y: auto;
}

#drawerFooter {
    border-top: 1px solid var(--border);
    background: var(--card-bg);
}

.modal {
    z-index: 3000 !important;
}

.modal-backdrop {
    z-index: 2990 !important;
}

.form-section {
    margin-bottom: 14px;
}

.form-section-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.form-control-sm {
    font-size: 13px;
    padding: 6px 10px;
}

.btn-primary:focus,
.btn-primary:active,
.btn-primary:focus-visible {
    color: #ffffff;
}

/* =========================
   FOOTER
========================= */

.footer {
    border-top: 1px solid var(--border);
    min-height: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
    background: var(--card-bg);
}

    .footer .container {
        max-width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

@media (max-width: 576px) {
    .footer .container {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }
}

.roadmap-timeline {
    position: relative;
    height: 6px;
    margin-top: 4px;
}

.roadmap-date {
    margin-top: 15px !important;
    font-size: 10px;
}

.timeline-bar {
    position: absolute;
    width: 100%;
    height: 4px;
    background: rgba(0,0,0,0.08);
    border-radius: 4px;
    z-index: 0;
}

.timeline-progress {
    position: absolute;
    height: 4px;
    background: linear-gradient(90deg, #6366f1, #4f46e5);
    border-radius: 4px;
    z-index: 1;
}

    .timeline-progress.late {
        background: #ef4444;
    }

.timeline-now {
    position: absolute;
    top: -3px;
    width: 10px;
    height: 10px;
    background: #111;
    border: 2px solid #fff;
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

    .timeline-now.bg-danger {
        background: #ef4444;
    }

/* WRAPPER */
.swot-wrapper {
    position: relative;
}

/* GRID POSITION FIX */
.swot-strengths {
    grid-column: 1;
}

.swot-weaknesses {
    grid-column: 3;
}

.swot-opportunities {
    grid-column: 1;
}

.swot-threats {
    grid-column: 3;
}

/* ROW */
.swot-strengths,
.swot-weaknesses {
    grid-row: 1;
}

.swot-opportunities,
.swot-threats {
    grid-row: 2;
}

/* =========================
   SWOT GRID LAYOUT
========================= */
.swot-grid {
    position: relative; /* ⬅️ KRİTİK */
    display: grid;
    grid-template-columns: 1fr 120px 1fr;
    gap: 20px;
    align-items: stretch;
}

/* MOBILE */
@media (max-width: 768px) {
    .swot-grid {
        display: block;
    }

    .swot-center-wrapper {
        display: none !important;
    }
}

/* =========================
   SWOT BOXES
========================= */
.swot-box {
    position: relative;
    z-index: 2; /* ⬅️ circle'ın üstünde */

    border-radius: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    background: var(--card-bg);
}

/* LEFT BORDER COLORS */
.swot-strengths {
    border-right: 3px solid #198754;
}

.swot-weaknesses {
    border-left: 3px solid #dc3545;
}

.swot-opportunities {
    border-right: 3px solid #0d6efd;
}

.swot-threats {
    border-left: 3px solid #ffc107;
}

/* =========================
   TITLE
========================= */
.swot-title {
    font-weight: 600;
    margin-bottom: 6px;
}

/* =========================
   TEXTAREA
========================= */
.swot-input {
    background: var(--surface-bg);
    border: 1px solid var(--border);
    color: var(--text-color);
    min-height: 100px;
    border-radius: 8px;
    resize: vertical;
}

/* =========================
   CENTER WRAPPER
========================= */
.swot-center-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0; /* ⬅️ ARKAYA */
    pointer-events: none; /* ⬅️ click sorununu çözer */

    display: flex;
    align-items: center;
    justify-content: center;
}

.swot-input:focus {
    border-color: var(--primary);
    box-shadow: none;
    background: var(--surface-bg);
    color: var(--text-color);
}

/* =========================
   SWOT CIRCLE
========================= */
.swot-center {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: conic-gradient( #198754 0deg 90deg, /* Strengths */
    #dc3545 90deg 180deg, /* Weaknesses */
    #ffc107 180deg 270deg, /* Threats */
    #0d6efd 270deg 360deg /* Opportunities */
    );
    transform: rotate(-90deg);
    position: relative;
}

    /* INNER WHITE */
    .swot-center::after {
        content: "SWOT";
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(90deg);
        width: 90px;
        height: 90px;
        background: var(--card-bg);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        font-size: 16px;
    }

/* =========================
   ASSESSMENT MODAL
========================= */

.assessment-modal {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
}

.assessment-modal-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 18px 22px;
}

    .assessment-modal-header .modal-title {
        color: var(--text-main);
        font-weight: 700;
    }

.assessment-modal .modal-body {
    padding: 22px;
}

.assessment-modal .form-label {
    color: var(--text-main);
    font-weight: 600;
    margin-bottom: 8px;
}

.assessment-modal .form-control,
.assessment-modal .form-select {
    background: var(--input-bg);
    border-color: var(--input-border);
    color: var(--input-text);
    min-height: 46px;
}

    .assessment-modal .form-control:focus,
    .assessment-modal .form-select:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 0.15rem rgba(59,130,246,.15);
    }

.assessment-company-name {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    border-radius: 12px;
    background: var(--app-bg-soft);
    border: 1px solid var(--border);
    color: var(--text-main);
    font-weight: 600;
}

.assessment-modal-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--app-bg-soft);
    border: 1px solid var(--border);
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 13px;
}

    .assessment-modal-info i {
        margin-top: 2px;
        color: var(--primary);
    }

.assessment-modal-footer {
    border-top: 1px solid var(--border);
    background: var(--card-bg);
    padding: 18px 22px;
}

/* DARK MODE */

html[data-theme="dark"] .assessment-modal-info {
    background: rgba(255,255,255,0.03);
}

html[data-theme="dark"] .assessment-company-name {
    background: rgba(255,255,255,0.03);
}

.drawer-panel {
    background: var(--card-bg);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.drawer-header {
    border-bottom: 1px solid var(--border);
    background: var(--card-bg);
}

.drawer-footer {
    border-top: 1px solid var(--border);
    background: var(--card-bg);
}

#drawerBody {
    flex: 1;
    overflow-y: auto;
}

/* =========================
   CONFIRM MODAL
========================= */

#confirmModal .modal-content {
    border: 1px solid var(--border);
    border-radius: 22px;
    overflow: hidden;
    background: var(--card-bg);
    box-shadow: 0 20px 50px rgba(0,0,0,.18);
}

#confirmModal .confirm-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 18px 24px;
}

#confirmModal .modal-title {
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

    #confirmModal .modal-title i {
        color: #f59e0b;
    }

#confirmModal .modal-body {
    padding: 28px 24px;
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
}

#confirmModal .modal-footer {
    border-top: 1px solid var(--border);
    background: var(--card-bg);
    padding: 18px 24px;
}

    #confirmModal .modal-footer .btn {
        min-width: 90px;
        border-radius: 12px;
        font-weight: 600;
    }

#confirmModal .btn-danger {
    background: #ef4444;
    border-color: #ef4444;
}

    #confirmModal .btn-danger:hover {
        background: #dc2626;
        border-color: #dc2626;
    }

/* =========================
   CATEGORY NAVIGATION
========================= */

.category-nav-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.category-status-icon {
    width: 18px;
    text-align: center;
    font-size: 11px;
    flex-shrink: 0;
}

.category-nav-meta {
    font-size: 11px;
    color: var(--text);
    margin-top: 2px;
    margin-left: 26px;
}

.category-nav-progress {
    height: 4px;
    margin-top: 6px;
    border-radius: 999px;
    overflow: hidden;
}

/* STATES */

.list-group-item.category-not-started .category-status-icon {
    color: #9ca3af;
}

.list-group-item.category-in-progress .category-status-icon {
    color: #f59e0b;
}

.list-group-item.category-completed .category-status-icon {
    color: #16a34a;
}

/* =========================
   AXIS TABS
========================= */

.axis-tab-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.axis-status-icon {
    width: 16px;
    text-align: center;
    font-size: 11px;
    flex-shrink: 0;
}

.axis-tab-meta {
    font-size: 11px;
    margin-top: 4px;
    color: #6b7280;
    margin-left: 24px;
}

.axis-tab-progress {
    height: 4px;
    border-radius: 999px;
    overflow: hidden;
}

/* STATES */

.nav-link.axis-not-started .axis-status-icon {
    color: #9ca3af;
}

.nav-link.axis-in-progress .axis-status-icon {
    color: #f59e0b;
}

.nav-link.axis-completed .axis-status-icon {
    color: #16a34a;
}

/* =========================
   NEXT TARGET
========================= */

.next-badge {
    margin-left: auto;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.2px;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--text);
    text-transform: uppercase;
}

/* =========================
   ACTIVE CATEGORY
========================= */

#assessmentSidebar .list-group-item.active,
.category-list .list-group-item.active {
    background: rgba(37, 99, 235, 0.08) !important;
    color: #111827 !important;
    border: 1px solid rgba(37, 99, 235, 0.22) !important;
    border-left: 4px solid #2563eb !important;
    box-shadow: none !important;
}

    /* TEXT COLORS */

    #assessmentSidebar .list-group-item.active .category-name,
    .category-list .list-group-item.active .category-name {
        color: #111827 !important;
    }

    #assessmentSidebar .list-group-item.active .category-nav-meta,
    .category-list .list-group-item.active .category-nav-meta {
        color: #4b5563 !important;
    }

/* DARK MODE */

[data-theme="dark"] #assessmentSidebar .list-group-item.active,
[data-theme="dark"] .category-list .list-group-item.active {
    background: rgba(59, 130, 246, 0.12) !important;
    color: #f3f4f6 !important;
    border: 1px solid rgba(59, 130, 246, 0.28) !important;
    border-left: 4px solid #60a5fa !important;
}

    [data-theme="dark"] #assessmentSidebar .list-group-item.active .category-name,
    [data-theme="dark"] .category-list .list-group-item.active .category-name {
        color: #f3f4f6 !important;
    }

    [data-theme="dark"] #assessmentSidebar .list-group-item.active .category-nav-meta,
    [data-theme="dark"] .category-list .list-group-item.active .category-nav-meta {
        color: #cbd5e1 !important;
    }

/* =========================
   ASSESSMENT COMPLETE
========================= */

.assessment-complete-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    margin-bottom: 20px;
    border-radius: 14px;
    background: linear-gradient( 135deg, rgba(22, 163, 74, 0.10), rgba(22, 163, 74, 0.04) );
    border: 1px solid rgba(22, 163, 74, 0.18);
}

.assessment-complete-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(22, 163, 74, 0.12);
    color: #16a34a;
    font-size: 22px;
    flex-shrink: 0;
}

.assessment-complete-content {
    flex: 1;
}

.assessment-complete-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.assessment-complete-subtitle {
    font-size: 13px;
    color: #6b7280;
    margin-top: 2px;
}

/* DARK MODE */

[data-theme="dark"] .assessment-complete-banner {
    background: linear-gradient( 135deg, rgba(22, 163, 74, 0.14), rgba(22, 163, 74, 0.05) );
    border-color: rgba(22, 163, 74, 0.25);
}

[data-theme="dark"] .assessment-complete-title {
    color: #f3f4f6;
}

[data-theme="dark"] .assessment-complete-subtitle {
    color: #cbd5e1;
}

/* =========================
   COMPLETION TRANSITION
========================= */

.assessment-complete-banner {
    opacity: 1;
    transform: translateY(0);
    max-height: 200px;
    overflow: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, max-height 0.25s ease, margin 0.25s ease, padding 0.25s ease;
}

    .assessment-complete-banner.banner-hidden {
        opacity: 0;
        transform: translateY(-8px);
        max-height: 0;
        margin: 0;
        padding-top: 0;
        padding-bottom: 0;
        overflow: hidden;
        pointer-events: none;
    }

#appDrawer .drawer-panel.drawer-report-info {
    width: min(820px, 88vw);
    max-width: 88vw;
}

.report-project-header-sticky {
    position: sticky;
    top: 55px;
    z-index: 1020;
    margin-bottom: 1rem;
    background: var(--bs-body-bg, #ffffff);
    transition: box-shadow .18s ease;
}

    .report-project-header-sticky.is-stuck {
        box-shadow: 0 10px 24px rgba(15, 23, 42, .10);
    }

[data-theme="dark"] .report-project-header-sticky {
    background: #0f172a;
}

@media (max-width: 767.98px) {
    .report-project-header-sticky {
        top: 72px;
    }
}

/* =========================================================
   PROJECT ASSIGNMENTS DRAWER
========================================================= */

#appDrawer .drawer-panel.drawer-project-assignments {
    width: min(620px, 92vw);
    max-width: 92vw;
}

.project-assignment-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.project-assignment-user-list {
    display: block;
    width: 100%;
    max-height: 520px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--card-bg);
}

.project-assignment-user {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    gap: 14px;
    padding: 14px 16px;
    margin: 0;
    border-bottom: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-secondary);
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color var(--transition-fast);
}

    .project-assignment-user:last-of-type {
        border-bottom: 0;
    }

    .project-assignment-user:hover {
        background: var(--card-bg-hover);
    }

    .project-assignment-user[hidden] {
        display: none !important;
    }

.project-assignment-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

    .project-assignment-checkbox .form-check-input {
        margin: 0;
    }

.project-assignment-details {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    flex-direction: column;
}

.project-assignment-name {
    display: block;
    overflow: hidden;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-assignment-email {
    display: block;
    overflow: hidden;
    margin-top: 2px;
    font-size: 12px;
    color: var(--text-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-assignment-role {
    flex: 0 0 auto;
}

.project-assignment-empty {
    display: flex;
    min-height: 150px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    padding: 28px;
    color: var(--text-muted);
    text-align: center;
}

    .project-assignment-empty[hidden] {
        display: none !important;
    }

@media (max-width: 576px) {
    .project-assignment-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

        .project-assignment-toolbar .d-flex {
            width: 100%;
        }

        .project-assignment-toolbar .btn {
            flex: 1;
        }

    .project-assignment-user {
        padding: 12px;
    }

    .project-assignment-role {
        max-width: 110px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* =========================================================
   LOCKED ASSESSMENT READ-ONLY
========================================================= */

.assessment-readonly-control {
    cursor: default !important;
    background-color: var(--app-bg-soft) !important;
    color: var(--text-secondary) !important;
    opacity: 1 !important;
}

.assessment-readonly-box {
    position: relative;
}

    .assessment-readonly-box .form-check-input:disabled {
        opacity: 0.75;
        cursor: not-allowed;
    }

    .assessment-readonly-box .form-check-label {
        cursor: default;
    }

#assessmentLockedAlert {
    border-color: color-mix( in srgb, var(--warning) 32%, var(--border) );
    background: var(--warning-soft);
    color: var(--text-main);
}

html[data-theme="dark"] .assessment-readonly-control {
    background-color: rgba(255, 255, 255, 0.035) !important;
    color: var(--text-muted) !important;
}

/* =========================================================
   LOCKED ROADMAP READ-ONLY
========================================================= */

.roadmap-card-readonly {
    cursor: default !important;
    user-select: text;
}

    .roadmap-card-readonly:hover {
        transform: none !important;
        box-shadow: inherit !important;
    }

    .roadmap-card-readonly .kanban-footer {
        display: none !important;
    }

.roadmap-empty-readonly {
    cursor: default !important;
    pointer-events: none;
    opacity: .65;
}

#roadmapLockedAlert {
    border-color: color-mix( in srgb, var(--warning) 32%, var(--border) );
    background: var(--warning-soft);
    color: var(--text-main);
}

html[data-theme="dark"] .roadmap-card-readonly {
    background-color: rgba(255, 255, 255, .025);
}

/* =========================================================
   LOCKED GANTT READ-ONLY
========================================================= */

.gantt-task-readonly {
    cursor: default !important;
    user-select: text;
}

    .gantt-task-readonly:hover {
        background: inherit !important;
    }

#ganttLockedAlert {
    border-color: color-mix( in srgb, var(--warning) 32%, var(--border) );
    background: var(--warning-soft);
    color: var(--text-main);
}

/* =========================================================
   LOCKED REPORT READ-ONLY
========================================================= */

.report-readonly-control {
    background-color: var(--app-bg-soft, #f8fafc) !important;
    cursor: default !important;
    resize: none;
    opacity: .92;
}

    .report-readonly-control:focus {
        box-shadow: none !important;
        border-color: var(--border, #dee2e6) !important;
    }

#reportLockedAlert {
    border-color: color-mix( in srgb, var(--warning) 32%, var(--border) );
    background: var(--warning-soft);
    color: var(--text-main);
}

html[data-theme="dark"] .report-readonly-control {
    background-color: rgba(255, 255, 255, .035) !important;
}

/* =========================================================
   COMPANY CREATE / EDIT DRAWER
========================================================= */

#appDrawer .drawer-panel.drawer-company {
    width: min(980px, 94vw);
    max-width: 94vw;
}

    #appDrawer .drawer-panel.drawer-company .drawer-header,
    #appDrawer .drawer-panel.drawer-company #drawerBody,
    #appDrawer .drawer-panel.drawer-company #drawerFooter {
        padding-left: 24px !important;
        padding-right: 24px !important;
    }

@media (max-width: 991.98px) {
    #appDrawer .drawer-panel.drawer-company {
        width: min(820px, 96vw);
        max-width: 96vw;
    }
}

@media (max-width: 767.98px) {
    #appDrawer .drawer-panel.drawer-company {
        width: 100%;
        max-width: 100%;
    }

        #appDrawer .drawer-panel.drawer-company .drawer-header,
        #appDrawer .drawer-panel.drawer-company #drawerBody,
        #appDrawer .drawer-panel.drawer-company #drawerFooter {
            padding-left: 16px !important;
            padding-right: 16px !important;
        }
}

/* =========================================================
   TEXTAREA SIZE FIX
========================================================= */

.drawer-company textarea.form-control-sm {
    height: auto !important;
    min-height: unset;
    padding: 10px 12px !important;
    line-height: 1.5;
    resize: vertical;
}

/* =========================================================
   COMPANY AUTOCOMPLETE
========================================================= */

.ui-autocomplete {
    z-index: 4100 !important;
    max-height: 260px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--card-bg);
    box-shadow: var(--shadow-md);
}

    .ui-autocomplete .ui-menu-item {
        margin: 0;
    }

    .ui-autocomplete .ui-menu-item-wrapper {
        padding: 8px 10px;
        border: 0 !important;
        border-radius: 7px;
        color: var(--text-secondary);
        font-size: 13px;
    }

        .ui-autocomplete .ui-menu-item-wrapper.ui-state-active {
            margin: 0;
            border: 0 !important;
            background: var(--primary-soft);
            color: var(--primary);
        }

html[data-theme="dark"] .ui-autocomplete {
    background: var(--card-bg);
    border-color: var(--border);
}

    html[data-theme="dark"]
    .ui-autocomplete
    .ui-menu-item-wrapper {
        color: var(--text-secondary);
    }

        html[data-theme="dark"]
        .ui-autocomplete
        .ui-menu-item-wrapper.ui-state-active {
            background: var(--primary-soft);
            color: var(--primary);
        }

/* =========================================================
   COMPANY LIST STATUS
========================================================= */

.company-list-filter .form-select,
.company-list-filter .form-control,
.company-list-filter .btn {
    min-height: 34px;
}

.company-stage-badge {
    --company-stage-color: #64748b;
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    gap: 7px;
    padding: 5px 10px;
    border: 1px solid color-mix( in srgb, var(--company-stage-color) 28%, var(--border) );
    border-radius: var(--radius-pill);
    background: color-mix( in srgb, var(--company-stage-color) 10%, var(--card-bg) );
    color: var(--text-main);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.company-stage-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: var(--company-stage-color);
    box-shadow: 0 0 0 3px color-mix( in srgb, var(--company-stage-color) 16%, transparent );
}

html[data-theme="dark"] .company-stage-badge {
    background: color-mix( in srgb, var(--company-stage-color) 14%, var(--card-bg) );
}

@media (max-width: 767.98px) {
    .company-list-filter .col-auto {
        width: 100%;
    }

        .company-list-filter .col-auto .btn {
            width: 100%;
        }
}

/* =========================================================
   PROJECT PERIOD
========================================================= */

.project-period {
    display: inline-flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    text-align: left;
}

    .project-period > div {
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .project-period strong {
        font-size: 12px;
        font-weight: 600;
    }

/* =========================================================
   PROJECT ACTIONS DROPDOWN
========================================================= */

.project-actions {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.project-actions-dropdown {
    position: relative;
}

.project-actions-toggle {
    display: inline-flex;
    width: 34px;
    height: 31px;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    border: 1px solid var(--border) !important;
    border-radius: 6px;
    background: var(--card-bg) !important;
    color: var(--text-secondary) !important;
}

    .project-actions-toggle:hover,
    .project-actions-toggle:focus,
    .project-actions-toggle.show {
        border-color: var(--border-strong) !important;
        background: var(--app-bg-soft) !important;
        color: var(--text-main) !important;
        box-shadow: none !important;
    }

    .project-actions-toggle i {
        margin: 0;
        font-size: 14px;
        line-height: 1;
    }

.project-actions-menu {
    min-width: 190px;
    margin: 0 !important;
    padding: 4px;
    border: 1px solid var(--dropdown-border);
    border-radius: 7px;
    background: var(--dropdown-bg);
    box-shadow: var(--dropdown-shadow);
    overflow: hidden;
    z-index: 1080;
    /*
       Global dropdown transition'ını kapatıyoruz.
       Popper'ın konum transform'una müdahale etmiyoruz.
    */
    transition: none !important;
    animation: none !important;
}

    .project-actions-menu.show {
        transition: none !important;
        animation: none !important;
    }

    .project-actions-menu .dropdown-item {
        display: flex;
        width: 100%;
        min-height: 34px;
        align-items: center;
        gap: 9px;
        padding: 7px 9px;
        border: 0;
        border-radius: 5px;
        background: transparent;
        color: var(--dropdown-text);
        font-size: 13px;
        font-weight: 400;
        line-height: 1.25;
        text-align: left;
        white-space: nowrap;
    }

    .project-actions-menu button.dropdown-item {
        cursor: pointer;
    }

    .project-actions-menu .dropdown-item:hover,
    .project-actions-menu .dropdown-item:focus {
        background: var(--dropdown-hover-bg);
        color: var(--text-main);
    }

    .project-actions-menu .dropdown-item i {
        width: 16px;
        flex: 0 0 16px;
        margin: 0;
        color: var(--text-muted);
        font-size: 14px;
        line-height: 1;
        text-align: center;
    }

    .project-actions-menu .dropdown-item.text-danger {
        color: var(--danger) !important;
    }

        .project-actions-menu .dropdown-item.text-danger i {
            color: var(--danger) !important;
        }

        .project-actions-menu .dropdown-item.text-danger:hover,
        .project-actions-menu .dropdown-item.text-danger:focus {
            background: var(--danger-soft);
            color: var(--danger-hover) !important;
        }

.project-actions-separator {
    height: 0;
    margin: 4px 3px;
    padding: 0;
    border: 0;
    border-top: 1px solid var(--border);
    background: transparent;
    list-style: none;
}

/*
   Sadece proje tablosunda dropdown kırpılmasını engeller.
   Tüm siteye overflow uygulamıyoruz.
*/
.projects-table-card,
.projects-table-card > .card-body,
.projects-table-card .table {
    overflow: visible !important;
}

html[data-theme="dark"] .project-actions-toggle {
    background: var(--card-bg) !important;
    color: var(--text-secondary) !important;
}

    html[data-theme="dark"] .project-actions-toggle:hover,
    html[data-theme="dark"] .project-actions-toggle:focus,
    html[data-theme="dark"] .project-actions-toggle.show {
        background: var(--app-bg-soft) !important;
        color: var(--text-main) !important;
    }

.axis-strengths,
.axis-weaknesses {
    width: 100%;
}

    .axis-strengths li,
    .axis-weaknesses li {
        width: 100%;
    }

    .axis-strengths .badge,
    .axis-weaknesses .badge {
        display: block;
        width: 100%;
        max-width: 100%;
        white-space: normal;
        text-align: left;
        line-height: 1.5;
        word-break: break-word;
        overflow-wrap: anywhere;
        padding: 0.5rem 0.75rem;
    }

/* =========================================================
   USER AVATAR & PROFILE PAGE
========================================================= */

/* ---------------------------------------------------------
   SHARED USER AVATAR
--------------------------------------------------------- */

.user-avatar {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--card-bg);
    color: var(--text-main);
    box-shadow: var(--shadow-xs);
}

.user-avatar-has-image {
    background: #ffffff;
}

.user-avatar-fallback {
    background: linear-gradient( 135deg, #e8efff 0%, #dce5ff 50%, #e5e7ff 100% );
}

.user-avatar-image {
    width: 100%;
    height: 100%;
    display: block;
    padding: 0;
    object-fit: cover;
    object-position: center;
    border-radius: inherit;
    background: transparent;
}

.user-avatar-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #172554;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
    user-select: none;
}

.user-avatar-sm {
    border-width: 1px;
}

.user-avatar-lg {
    border-width: 3px;
    box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] .user-avatar-fallback {
    background: linear-gradient( 135deg, #1e3a5f 0%, #253b67 50%, #312e5f 100% );
}

html[data-theme="dark"] .user-avatar-initials {
    color: #f8fafc;
}


/* ---------------------------------------------------------
   PROFILE PAGE
--------------------------------------------------------- */

.profile-page {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}


/* ---------------------------------------------------------
   PROFILE HEADER
--------------------------------------------------------- */

.profile-header-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--card-bg);
    box-shadow: var(--shadow-xs);
}

.profile-header-cover {
    position: relative;
    min-height: 148px;
    padding: 24px 30px 38px;
    overflow: hidden;
    background: linear-gradient( 120deg, #1d4ed8 0%, #4338ca 56%, #6d28d9 100% );
}

    .profile-header-cover::before {
        content: "";
        position: absolute;
        top: -115px;
        right: 38px;
        width: 280px;
        height: 280px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.07);
    }

    .profile-header-cover::after {
        content: "";
        position: absolute;
        right: -78px;
        bottom: -180px;
        width: 310px;
        height: 310px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.055);
    }

.profile-header-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
}

.profile-header-name {
    margin: 0 0 5px;
    color: #ffffff !important;
    font-size: 23px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.015em;
}

.profile-header-email {
    margin: 0;
    color: rgba(255, 255, 255, 0.86) !important;
    font-size: 13px;
    font-weight: 400;
}


/* ---------------------------------------------------------
   PROFILE IDENTITY ROW
--------------------------------------------------------- */

.profile-identity {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 82px;
    padding: 0 28px 18px;
    margin-top: -52px;
}

.profile-avatar-wrapper {
    position: relative;
    z-index: 4;
    width: 112px;
    height: 112px;
    flex: 0 0 112px;
    padding: 0;
    border: 4px solid var(--card-bg);
    border-radius: 50%;
    background: var(--card-bg);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
    box-sizing: border-box;
}

    .profile-avatar-wrapper .user-avatar {
        position: absolute;
        inset: 0;
        width: 100% !important;
        height: 100% !important;
        min-width: 0;
        flex: none;
        overflow: hidden;
        border: 0 !important;
        border-radius: 50% !important;
        background: transparent;
        box-shadow: none !important;
    }

    .profile-avatar-wrapper .user-avatar-initials {
        font-size: 42px !important;
        font-weight: 800;
    }

    .profile-avatar-wrapper .user-avatar-image {
        position: absolute;
        inset: 0;
        display: block;
        width: 100%;
        height: 100%;
        padding: 0;
        border-radius: 50% !important;
        object-fit: cover;
        object-position: center;
        background: transparent;
    }

.profile-avatar-action {
    position: absolute;
    right: -3px;
    bottom: 4px;
    z-index: 5;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 3px solid var(--card-bg);
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.22);
}

    .profile-avatar-action:hover,
    .profile-avatar-action:focus {
        background: var(--primary-hover);
        color: #ffffff;
    }


/* ---------------------------------------------------------
   PROFILE META
--------------------------------------------------------- */

.profile-identity-meta {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
    padding-top: 48px;
}

.profile-meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 6px 11px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-main);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

    .profile-meta-badge i {
        color: var(--text-muted);
    }

    .profile-meta-badge.is-active {
        border-color: rgba(22, 163, 74, 0.24);
        background: rgba(22, 163, 74, 0.08);
        color: #15803d;
    }

        .profile-meta-badge.is-active i {
            color: #16a34a;
            font-size: 9px;
        }

.profile-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 48px;
    margin-left: auto;
}


/* ---------------------------------------------------------
   PROFILE SECTION CARDS
--------------------------------------------------------- */

.profile-section-card {
    height: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--card-bg);
    box-shadow: var(--shadow-xs);
}

    .profile-section-card .card-body {
        padding: 22px;
    }

.profile-section-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}

.profile-section-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    font-size: 16px;
}

    .profile-section-icon.security {
        background: rgba(22, 163, 74, 0.1);
        color: #16a34a;
    }

.profile-section-title {
    margin-bottom: 3px;
    color: var(--text-main);
    font-size: 15px;
    font-weight: 700;
}

.profile-section-description {
    max-width: 580px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}


/* ---------------------------------------------------------
   PROFILE INFORMATION
--------------------------------------------------------- */

.profile-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.profile-info-item {
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--app-bg-soft);
}

.profile-info-label {
    margin-bottom: 4px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.055em;
}

.profile-info-value {
    color: var(--text-main);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.profile-readonly-note {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-top: 15px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.5;
}


/* ---------------------------------------------------------
   PROFILE PASSWORD
--------------------------------------------------------- */

.profile-password-field {
    position: relative;
}

    .profile-password-field .form-control {
        padding-right: 44px;
    }

.profile-password-toggle {
    position: absolute;
    right: 8px;
    bottom: 7px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text-muted);
}

    .profile-password-toggle:hover {
        background: var(--app-bg-soft);
        color: var(--text-main);
    }

.profile-security-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.profile-password-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 11px;
}


/* ---------------------------------------------------------
   PROFILE DARK MODE
--------------------------------------------------------- */

html[data-theme="dark"] .profile-header-card,
html[data-theme="dark"] .profile-section-card,
html[data-theme="dark"] .profile-avatar-wrapper {
    background: var(--card-bg);
}

html[data-theme="dark"] .profile-meta-badge {
    background: var(--card-bg);
}

html[data-theme="dark"] .profile-info-item {
    background: rgba(255, 255, 255, 0.03);
}


/* ---------------------------------------------------------
   PROFILE RESPONSIVE
--------------------------------------------------------- */

@media (max-width: 767.98px) {

    .profile-header-cover {
        min-height: 108px;
        padding: 20px 20px 36px;
    }

    .profile-header-name {
        font-size: 20px;
    }

    .profile-identity {
        display: flex;
        align-items: center;
        flex-direction: column;
        gap: 12px;
        min-height: auto;
        padding: 0 18px 20px;
        margin-top: -52px;
        text-align: center;
    }

    .profile-avatar-wrapper {
        width: 104px;
        height: 104px;
        flex-basis: 104px;
    }

    .profile-identity-meta {
        justify-content: center;
        padding-top: 0;
    }

    .profile-header-actions {
        justify-content: center;
        width: 100%;
        padding-top: 0;
        margin-left: 0;
    }

        .profile-header-actions .btn {
            flex: 1 1 auto;
        }

    .profile-section-card .card-body {
        padding: 18px;
    }

    .profile-security-footer {
        align-items: stretch;
    }

        .profile-security-footer .btn {
            width: 100%;
        }
}

.header-user-name {
    display: inline-block;
    max-width: 150px;
    overflow: hidden;
    color: var(--navbar-text-strong);
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.navbar-nav.align-items-center
.user-avatar {
    border-color: var(--border-strong);
    box-shadow: none;
}

@media (max-width: 991.98px) {
    .header-user-name {
        max-width: 110px;
    }
}

.header-user-avatar {
    border-radius: 10px;
}

    .header-user-avatar .user-avatar-image {
        border-radius: 8px;
    }

    .header-user-avatar .user-avatar-initials {
        border-radius: 8px;
    }

.navbar-nav.align-items-center > .nav-item.dropdown > .nav-link:has(.header-user-avatar) {
    padding-left: 7px;
}

.navbar .header-user-avatar {
    overflow: hidden;
    border-radius: 10px !important;
}

    .navbar .header-user-avatar .user-avatar-image {
        padding: 0;
        object-fit: cover;
        border-radius: inherit;
    }

/* =========================================================
   PROFILE IMAGE CROPPER
========================================================= */

.profile-crop-workspace {
    width: 100%;
    height: min(520px, 62vh);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: linear-gradient( 45deg, var(--app-bg-soft) 25%, transparent 25% ), linear-gradient( -45deg, var(--app-bg-soft) 25%, transparent 25% ), linear-gradient( 45deg, transparent 75%, var(--app-bg-soft) 75% ), linear-gradient( -45deg, transparent 75%, var(--app-bg-soft) 75% );
    background-position: 0 0, 0 10px, 10px -10px, -10px 0;
    background-size: 20px 20px;
}

    .profile-crop-workspace img {
        display: block;
        max-width: 100%;
    }

#profileImageCropModal .modal-dialog {
    max-width: 780px;
}

#profileImageCropModal .cropper-view-box,
#profileImageCropModal .cropper-face {
    border-radius: 50%;
}

#profileImageCropModal .cropper-view-box {
    outline: 2px solid rgba(255, 255, 255, 0.92);
    outline-color: rgba(255, 255, 255, 0.92);
}

html[data-theme="dark"] .profile-crop-workspace {
    background-color: #0b1220;
}

/* =========================================================
   USERS LIST AVATAR & PRESENCE
========================================================= */

.users-table-user {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.users-table-avatar {
    position: relative;
    display: inline-flex;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
}

.users-list-avatar {
    width: 40px !important;
    height: 40px !important;
    flex: 0 0 40px;
    border-radius: 10px !important;
    box-shadow: none;
}

    .users-list-avatar .user-avatar-image,
    .users-list-avatar .user-avatar-initials {
        border-radius: 9px !important;
    }

    .users-list-avatar .user-avatar-initials {
        font-size: 14px !important;
    }

.users-online-indicator {
    position: absolute;
    right: -2px;
    bottom: -2px;
    z-index: 2;
    width: 12px;
    height: 12px;
    border: 2px solid var(--card-bg);
    border-radius: 50%;
}

    .users-online-indicator.is-online {
        background: #16a34a;
    }

    .users-online-indicator.is-offline {
        background: #94a3b8;
    }

.users-table-user-content {
    min-width: 0;
}

.users-table-user-name {
    max-width: 180px;
    overflow: hidden;
    color: var(--text-main);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.users-table-presence {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 2px;
    font-size: 11px;
    line-height: 1.25;
}

.users-presence-text {
    font-weight: 600;
}

    .users-presence-text.is-online {
        color: #16a34a;
    }

    .users-presence-text.is-offline,
    .users-last-activity {
        color: var(--text-muted);
    }

html[data-theme="dark"] .users-online-indicator {
    border-color: var(--card-bg);
}

/* =========================================================
   COMPANY PROFILE
========================================================= */

.company-profile-page {
    padding-bottom: 24px;
}

.company-profile-back-button {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.company-profile-stage-badge {
    --company-stage-color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 10px;
    border-radius: 999px;
    background: color-mix( in srgb, var(--company-stage-color) 12%, transparent );
    color: var(--company-stage-color);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.company-profile-stage-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--company-stage-color);
    box-shadow: 0 0 0 3px color-mix( in srgb, var(--company-stage-color) 15%, transparent );
}

.company-profile-quick-bar {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bs-body-bg);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.company-profile-quick-item {
    min-height: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.company-profile-quick-label {
    margin-bottom: 4px;
    color: var(--bs-secondary-color);
    font-size: 12px;
}

.company-profile-quick-value {
    color: var(--bs-body-color);
    font-size: 14px;
    font-weight: 600;
}

.company-profile-stat-card {
    min-height: 92px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bs-body-bg);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

    .company-profile-stat-card:hover {
        transform: translateY(-2px);
        border-color: rgba(var(--bs-primary-rgb), 0.25);
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
    }

.company-profile-stat-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
    font-size: 20px;
}

.company-profile-stat-value {
    color: var(--bs-body-color);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.1;
}

.company-profile-stat-label {
    margin-top: 4px;
    color: var(--bs-secondary-color);
    font-size: 13px;
}

.company-profile-content-card {
    position: relative;
    overflow: visible;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bs-body-bg);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.company-profile-tabs {
    position: sticky;
    top: var(--header-height);
    z-index: 1020;
    gap: 2px;
    padding: 10px 12px 0;
    border-bottom: 1px solid var(--bs-border-color);
    border-radius: 14px 14px 0 0;
    background: var(--card-bg);
    box-shadow: 0 1px 0 var(--border), 0 6px 14px rgba(15, 23, 42, 0.06);
}

    .company-profile-tabs .nav-link {
        display: inline-flex;
        align-items: center;
        padding: 10px 14px;
        border: 0;
        border-bottom: 2px solid transparent;
        color: var(--bs-secondary-color);
        font-size: 13px;
        font-weight: 600;
    }

        .company-profile-tabs .nav-link:hover {
            color: var(--bs-primary);
        }

        .company-profile-tabs .nav-link.active {
            border-bottom-color: var(--bs-primary);
            background: transparent;
            color: var(--bs-primary);
        }

        .company-profile-tabs .nav-link .badge {
            min-width: 22px;
            border-radius: 999px;
            font-size: 10px;
        }

.company-profile-section {
    height: 100%;
    padding: 16px;
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    background: var(--bs-body-bg);
}

.company-profile-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--bs-border-color);
}

.company-profile-empty-state {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    text-align: center;
}

.company-profile-empty-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border-radius: 50%;
    background: rgba(var(--bs-secondary-rgb), 0.08);
    color: var(--bs-secondary-color);
    font-size: 21px;
}

.company-profile-detail-list {
    display: flex;
    flex-direction: column;
}

.company-profile-detail-row {
    display: grid;
    grid-template-columns: minmax(130px, 40%) minmax(0, 60%);
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--bs-border-color);
}

    .company-profile-detail-row:last-child {
        border-bottom: 0;
    }

.company-profile-detail-label {
    color: var(--bs-secondary-color);
    font-size: 13px;
}

.company-profile-detail-value {
    min-width: 0;
    color: var(--bs-body-color);
    font-size: 13px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

    .company-profile-detail-value a {
        text-decoration: none;
    }

        .company-profile-detail-value a:hover {
            text-decoration: underline;
        }

.company-profile-text-field {
    height: 100%;
    padding: 14px;
    border: 1px solid var(--bs-border-color);
    border-radius: 10px;
    background: rgba(var(--bs-secondary-rgb), 0.025);
}

.company-profile-text-label {
    margin-bottom: 8px;
    color: var(--bs-secondary-color);
    font-size: 12px;
    font-weight: 600;
}

.company-profile-text-value {
    color: var(--bs-body-color);
    font-size: 13px;
    line-height: 1.65;
    white-space: pre-line;
}

.company-profile-content-card .table > :not(caption) > * > * {
    padding: 12px;
}

.company-profile-content-card .table thead th {
    color: var(--bs-secondary-color);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.company-profile-content-card .table tbody td {
    font-size: 13px;
}

.company-profile-content-card .progress {
    overflow: hidden;
    border-radius: 999px;
    background: rgba(var(--bs-secondary-rgb), 0.1);
}

.company-profile-content-card .progress-bar {
    border-radius: 999px;
}

.company-profile-content-card > .tab-content {
    position: relative;
    border-radius: 0 0 14px 14px;
    background: var(--card-bg);
}

@media (max-width: 991.98px) {
    .company-profile-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
    }

        .company-profile-tabs .nav-link {
            white-space: nowrap;
        }
}

@media (max-width: 767.98px) {
    .company-profile-page > .d-flex:first-child {
        flex-direction: column;
    }

        .company-profile-page > .d-flex:first-child > div:last-child {
            width: 100%;
            justify-content: flex-start !important;
        }

    .company-profile-detail-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .company-profile-content-card .tab-content {
        padding: 12px !important;
    }
}

/* =========================================================
   COMPANY ACTIVITY TIMELINE
========================================================= */

.company-activity-timeline {
    position: relative;
    padding: 2px 0;
}

.company-activity-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 14px;
}

    .company-activity-item:last-child {
        padding-bottom: 0;
    }

/* ---------------------------------------------------------
   MARKER
--------------------------------------------------------- */

.company-activity-marker {
    position: relative;
    display: flex;
    flex: 0 0 28px;
    justify-content: center;
}

    .company-activity-marker::after {
        content: "";
        position: absolute;
        top: 28px;
        bottom: -14px;
        left: 50%;
        width: 1px;
        background: var(--border);
        transform: translateX(-50%);
    }

.company-activity-item:last-child
.company-activity-marker::after {
    display: none;
}

.company-activity-icon {
    position: relative;
    z-index: 1;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--card-bg);
    color: var(--text-muted);
    font-size: 11px;
    box-shadow: var(--shadow-xs);
}

/* ---------------------------------------------------------
   CONTENT
--------------------------------------------------------- */

.company-activity-content {
    min-width: 0;
    flex: 1;
    padding-top: 1px;
}

.company-activity-header {
    display: flex;
    align-items: center;
    min-height: 22px;
}

.company-activity-title {
    color: var(--text-main);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.35;
}

/* ---------------------------------------------------------
   META
--------------------------------------------------------- */

.company-activity-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 10.5px;
    line-height: 1.4;
}

.company-activity-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

    .company-activity-meta-item i {
        width: 12px;
        color: var(--text-soft);
        font-size: 10px;
        text-align: center;
    }

.company-activity-meta-separator {
    color: var(--text-soft);
    opacity: .75;
}

/* ---------------------------------------------------------
   DESCRIPTION
--------------------------------------------------------- */

.company-activity-description {
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 12.5px;
    line-height: 1.45;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

/* ---------------------------------------------------------
   VALUE CHANGE
--------------------------------------------------------- */

.company-activity-change {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    max-width: 100%;
    margin-top: 6px;
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--app-bg-soft);
    font-size: 11px;
    line-height: 1.35;
}

.company-activity-old-value {
    color: var(--text-muted);
    text-decoration: line-through;
}

.company-activity-change-arrow {
    color: var(--text-soft);
    font-size: 10px;
}

.company-activity-new-value {
    color: var(--success);
    font-weight: 600;
}

/* ---------------------------------------------------------
   TYPE COLORS
--------------------------------------------------------- */

.company-activity-created
.company-activity-icon {
    border-color: color-mix( in srgb, var(--success) 25%, var(--border) );
    background: var(--success-soft);
    color: var(--success);
}

.company-activity-updated
.company-activity-icon {
    border-color: color-mix( in srgb, var(--primary) 25%, var(--border) );
    background: var(--primary-soft);
    color: var(--primary);
}

.company-activity-stage
.company-activity-icon {
    border-color: color-mix( in srgb, var(--warning) 28%, var(--border) );
    background: var(--warning-soft);
    color: var(--warning);
}

.company-activity-assessment
.company-activity-icon {
    border-color: color-mix( in srgb, var(--info) 28%, var(--border) );
    background: var(--info-soft);
    color: var(--info);
}

.company-activity-report
.company-activity-icon {
    border-color: color-mix( in srgb, var(--danger) 25%, var(--border) );
    background: var(--danger-soft);
    color: var(--danger);
}

.company-activity-roadmap
.company-activity-icon {
    border-color: rgba(124, 58, 237, .22);
    background: rgba(124, 58, 237, .08);
    color: #7c3aed;
}

.company-activity-note
.company-activity-icon {
    background: var(--app-bg-soft);
    color: var(--text-muted);
}

/* ---------------------------------------------------------
   DARK MODE
--------------------------------------------------------- */

html[data-theme="dark"]
.company-activity-icon {
    background: var(--card-bg);
    border-color: var(--border);
    box-shadow: none;
}

html[data-theme="dark"]
.company-activity-created
.company-activity-icon {
    background: var(--success-soft);
    color: var(--success);
}

html[data-theme="dark"]
.company-activity-updated
.company-activity-icon {
    background: var(--primary-soft);
    color: var(--primary);
}

html[data-theme="dark"]
.company-activity-stage
.company-activity-icon {
    background: var(--warning-soft);
    color: var(--warning);
}

html[data-theme="dark"]
.company-activity-assessment
.company-activity-icon {
    background: var(--info-soft);
    color: var(--info);
}

html[data-theme="dark"]
.company-activity-report
.company-activity-icon {
    background: var(--danger-soft);
    color: var(--danger);
}

html[data-theme="dark"]
.company-activity-roadmap
.company-activity-icon {
    border-color: rgba(167, 139, 250, .24);
    background: rgba(139, 92, 246, .12);
    color: #a78bfa;
}

html[data-theme="dark"]
.company-activity-change {
    background: rgba(255, 255, 255, .025);
}

/* ---------------------------------------------------------
   RESPONSIVE
--------------------------------------------------------- */

@media (max-width: 576px) {

    .company-activity-item {
        gap: 10px;
        padding-bottom: 13px;
    }

    .company-activity-marker {
        flex-basis: 26px;
    }

    .company-activity-icon {
        width: 26px;
        height: 26px;
        flex-basis: 26px;
        font-size: 10px;
    }

    .company-activity-marker::after {
        top: 26px;
    }

    .company-activity-title {
        font-size: 12.5px;
    }

    .company-activity-meta {
        gap: 5px;
    }

    .company-activity-description {
        font-size: 12px;
    }
}

/* =========================================================
   COMPANY PROFILE - DARK MODE
========================================================= */

html[data-theme="dark"] .company-profile-page {
    color: var(--text-main);
}

html[data-theme="dark"] .company-profile-quick-bar,
html[data-theme="dark"] .company-profile-stat-card,
html[data-theme="dark"] .company-profile-content-card,
html[data-theme="dark"] .company-profile-section {
    background: var(--card-bg);
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] .company-profile-tabs {
    background: var(--card-bg);
    border-bottom-color: var(--border);
    box-shadow: 0 1px 0 var(--border), 0 8px 18px rgba(0, 0, 0, 0.24);
}

    html[data-theme="dark"] .company-profile-tabs .nav-link {
        color: var(--text-muted);
    }

        html[data-theme="dark"] .company-profile-tabs .nav-link:hover {
            color: var(--primary);
        }

        html[data-theme="dark"] .company-profile-tabs .nav-link.active {
            background: transparent;
            color: var(--primary);
            border-bottom-color: var(--primary);
        }

    html[data-theme="dark"] .company-profile-tabs .badge.bg-light {
        background: var(--app-bg-soft) !important;
        color: var(--text-secondary) !important;
    }

html[data-theme="dark"] .company-profile-quick-label,
html[data-theme="dark"] .company-profile-stat-label,
html[data-theme="dark"] .company-profile-detail-label,
html[data-theme="dark"] .company-profile-text-label {
    color: var(--text-muted);
}

html[data-theme="dark"] .company-profile-quick-value,
html[data-theme="dark"] .company-profile-stat-value,
html[data-theme="dark"] .company-profile-detail-value,
html[data-theme="dark"] .company-profile-text-value,
html[data-theme="dark"] .company-profile-section h6 {
    color: var(--text-main);
}

html[data-theme="dark"] .company-profile-text-field {
    background: rgba(255, 255, 255, 0.025);
    border-color: var(--border);
}

html[data-theme="dark"] .company-profile-detail-row {
    border-bottom-color: var(--border);
}

html[data-theme="dark"] .company-profile-empty-icon {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

html[data-theme="dark"] .company-profile-back-button,
html[data-theme="dark"] .company-profile-page .btn-light {
    background: var(--card-bg);
    border-color: var(--border) !important;
    color: var(--text-secondary);
}

    html[data-theme="dark"] .company-profile-back-button:hover,
    html[data-theme="dark"] .company-profile-page .btn-light:hover {
        background: var(--app-bg-soft);
        color: var(--text-main);
    }

html[data-theme="dark"] .company-profile-content-card .table {
    background: var(--card-bg);
    color: var(--text-secondary);
    box-shadow: none;
}

    html[data-theme="dark"] .company-profile-content-card .table thead th {
        background: var(--table-head-bg);
        color: var(--text-muted);
        border-bottom-color: var(--border) !important;
    }

    html[data-theme="dark"] .company-profile-content-card .table tbody tr {
        background: var(--card-bg);
    }

        html[data-theme="dark"] .company-profile-content-card .table tbody tr:nth-child(even) {
            background: var(--table-row-even);
        }

        html[data-theme="dark"] .company-profile-content-card .table tbody tr:hover {
            background: var(--table-row-hover);
        }

    html[data-theme="dark"] .company-profile-content-card .table tbody td {
        color: var(--text-secondary);
        border-bottom-color: var(--table-border) !important;
    }

html[data-theme="dark"] .company-profile-content-card .progress {
    background: var(--progress-bg);
}

html[data-theme="dark"] .company-profile-stage-badge {
    background: color-mix( in srgb, var(--company-stage-color) 18%, var(--card-bg) );
}

html[data-theme="dark"] .company-profile-stat-icon {
    background: var(--primary-soft);
    color: var(--primary);
}

html[data-theme="dark"] .company-profile-page .form-select {
    background-color: var(--input-bg);
    border-color: var(--input-border);
    color: var(--input-text);
}

/* =========================================================
   COMPANY COMMUNICATIONS
========================================================= */

.company-communication-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--border);
}

.company-communication-list {
    display: flex;
    flex-direction: column;
}

.company-communication-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 4px;
    border-bottom: 1px solid var(--border);
}

    .company-communication-item:last-child {
        border-bottom: 0;
    }

.company-communication-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--app-bg-soft);
    color: var(--text-muted);
    font-size: 14px;
}

.company-communication-content {
    flex: 1;
    min-width: 0;
}

.company-communication-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.company-communication-heading {
    min-width: 0;
}

.company-communication-type {
    margin-bottom: 2px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.company-communication-subject {
    color: var(--text-main);
    font-size: 13.5px;
    font-weight: 650;
    line-height: 1.4;
}

.company-communication-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 11px;
}

    .company-communication-meta span {
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }

    .company-communication-meta i {
        width: 12px;
        color: var(--text-soft);
        text-align: center;
    }

.company-communication-description {
    max-width: 850px;
    margin-top: 7px;
    color: var(--text-secondary);
    font-size: 12.5px;
    line-height: 1.55;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.company-communication-actions {
    flex: 0 0 auto;
}

.company-communication-delete {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: .45;
}

.company-communication-item:hover
.company-communication-delete {
    opacity: 1;
}

/* ---------------------------------------------------------
   TYPES
--------------------------------------------------------- */

.communication-email .company-communication-icon {
    border-color: color-mix( in srgb, var(--primary) 22%, var(--border) );
    background: var(--primary-soft);
    color: var(--primary);
}

.communication-phone .company-communication-icon {
    border-color: color-mix( in srgb, var(--success) 22%, var(--border) );
    background: var(--success-soft);
    color: var(--success);
}

.communication-meeting .company-communication-icon {
    border-color: color-mix( in srgb, var(--info) 24%, var(--border) );
    background: var(--info-soft);
    color: var(--info);
}

.communication-note .company-communication-icon {
    border-color: color-mix( in srgb, var(--warning) 24%, var(--border) );
    background: var(--warning-soft);
    color: var(--warning);
}

/* ---------------------------------------------------------
   MODAL
--------------------------------------------------------- */

.company-communication-modal .modal-header {
    align-items: flex-start;
    padding: 18px 20px;
}

.company-communication-modal .modal-body {
    padding: 20px;
}

.company-communication-modal .modal-footer {
    padding: 14px 20px;
}

.company-communication-modal textarea {
    min-height: 110px;
    resize: vertical;
}

/* ---------------------------------------------------------
   DARK MODE
--------------------------------------------------------- */

html[data-theme="dark"]
.company-communication-item {
    border-bottom-color: var(--border);
}

html[data-theme="dark"]
.company-communication-icon {
    background: var(--app-bg-soft);
    border-color: var(--border);
}

html[data-theme="dark"]
.company-communication-modal {
    background: var(--card-bg);
}

/* ---------------------------------------------------------
   RESPONSIVE
--------------------------------------------------------- */

@media (max-width: 767.98px) {

    .company-communication-header {
        flex-direction: column;
    }

        .company-communication-header .btn {
            width: 100%;
        }

    .company-communication-item {
        gap: 10px;
        padding: 14px 0;
    }

    .company-communication-icon {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .company-communication-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
    }
}

/* =========================================================
   OFFLINE CONNECTION OVERLAY
========================================================= */

.offline-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--transition-base), visibility var(--transition-base);
}

    .offline-overlay.is-visible {
        opacity: 1;
        visibility: visible;
        pointer-events: all;
    }

.offline-dialog {
    width: 100%;
    max-width: 420px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--card-bg);
    box-shadow: var(--shadow-md);
    text-align: center;
}

.offline-icon {
    width: 64px;
    height: 64px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    border-radius: 50%;
    background: var(--danger-soft);
    color: var(--danger);
    font-size: 26px;
}

.offline-title {
    margin-bottom: 8px;
    color: var(--text-main);
    font-size: 18px;
    font-weight: 700;
}

.offline-message {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
}

.offline-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--app-bg-soft);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
}

.offline-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--warning);
    animation: offlinePulse 1.2s ease-in-out infinite;
}

body.app-is-offline {
    overflow: hidden;
}

@keyframes offlinePulse {

    0%, 100% {
        opacity: 0.35;
        transform: scale(0.9);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

html[data-theme="dark"] .offline-overlay {
    background: rgba(2, 6, 23, 0.62);
}

html[data-theme="dark"] .offline-dialog {
    background: var(--card-bg);
    border-color: var(--border);
}

@media (max-width: 576px) {

    .offline-overlay {
        padding: 16px;
    }

    .offline-dialog {
        padding: 24px 20px;
        border-radius: 16px;
    }
}

/* =========================================================
   FORMS ACTION DROPDOWN
========================================================= */

.forms-table-card,
.forms-table-card > .card-body,
.forms-table-card .table {
    overflow: visible !important;
}

.forms-table-responsive {
    overflow-x: auto;
    overflow-y: visible !important;
}

.forms-table-card .project-actions-dropdown {
    position: relative;
}

.forms-table-card .project-actions-menu {
    z-index: 1200;
}

@media (max-width: 1199.98px) {
    .navbar-collapse > .navbar-nav:first-child {
        gap: 0;
    }

        .navbar-collapse > .navbar-nav:first-child > .nav-item > .nav-link {
            min-height: 38px;
            padding: 6px 12px;
        }

    .navbar-nav.align-items-center {
        margin-top: 6px;
        padding-top: 8px;
    }

        .navbar-nav.align-items-center > .nav-item.dropdown > .nav-link {
            min-height: 40px;
        }

            .navbar-nav.align-items-center > .nav-item.dropdown > .nav-link:has(.header-user-avatar) {
                max-width: 320px;
            }
}

.navbar-nav .nav-link {
    gap: 6px;
}

.nav-menu-icon {
    width: 16px;
    flex: 0 0 16px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1;
    text-align: center;
    opacity: .9;
}

.navbar-nav .nav-link:hover .nav-menu-icon,
.navbar-nav .nav-link.active .nav-menu-icon {
    color: var(--primary);
}