/* assets/css/style.css - Global Stylesheet for WFG KMU-Check CRM */

:root {
    --wfg-primary: #00685E;
    --wfg-primary-dark: #004e46;
    --wfg-primary-light: #e6f2ef;
    --bg-main: #f4f7f6;
    --bg-card: #ffffff;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    
    /* Centralized colors */
    --bg-sidebar: #202232;
    --bg-sidebar-dark: #171825;
    --bg-light: #f8fafc;
    --border-light: #cbd5e1;
    --border-hover: #c8ddd8;
    
    --danger-color: #ef4444;
    --danger-color-dark: #dc2626;
    --danger-bg-light: #fef2f2;
    --danger-border-light: #fee2e2;
    
    --success-color: #10b981;
    --success-color-dark: #15803d;
    --success-bg-light: #f0fdf4;
    --success-border-light: #dcfce7;
    
    --info-color: #3b82f6;
    --info-bg-light: #dbeafe;
    
    --text-light: #94a3b8;

    --badge-superadmin-bg: #fee2e2;
    --badge-superadmin-color: #ef4444;
    --badge-admin-bg: #dbeafe;
    --badge-admin-color: #3b82f6;
    --badge-user-bg: #d1fae5;
    --badge-user-color: #10b981;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --transition: all 0.25s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-color);
    line-height: 1.5;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

/* --- LOGIN PAGE --- */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(circle at top left, var(--wfg-primary-light), var(--bg-main) 70%);
}

.login-wrapper {
    width: 100%;
    max-width: 440px;
    padding: 20px;
}

.login-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    padding: 40px 32px;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    max-height: 60px;
    margin-bottom: 16px;
    width: auto;
}

.login-header h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--wfg-primary);
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.login-header p {
    font-size: 14px;
    color: var(--text-muted);
}

/* Spezifische Login-Stile für Premium-Optik */
.login-card .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.login-card label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 6px;
    display: block;
}

.login-card .form-control {
    background-color: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 15px;
    color: var(--text-color);
    transition: var(--transition);
}

.login-card .form-control:focus {
    border-color: var(--wfg-primary);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 123, 94, 0.15);
}

.login-card .btn-primary {
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 700;
    border-radius: var(--radius-md);
    margin-top: 10px;
    box-shadow: 0 4px 6px -1px rgba(0, 123, 94, 0.2), 0 2px 4px -1px rgba(0, 123, 94, 0.1);
}

/* --- PASSWORD REVEAL & TOGGLE --- */
.password-toggle-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-toggle-group .form-control {
    padding-right: 44px !important;
    width: 100%;
}

.password-toggle-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    z-index: 5;
}

.password-toggle-btn:hover {
    color: var(--wfg-primary);
    background-color: #f1f5f9;
}

.password-toggle-btn svg,
.password-toggle-btn i {
    width: 18px;
    height: 18px;
    pointer-events: none;
}

/* --- APP LAYOUT (SIDEBAR + MAIN CONTENT) --- */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.app-sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    color: var(--bg-light);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    min-height: 100vh;
    height: 100%;
    height: 100dvh;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

.sidebar-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 30px;
    padding: 0 10px;
}

.sidebar-logo {
    max-height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
}

.sidebar-brand-text {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sidebar-brand-text h1 {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #ffffff;
    margin: 0;
}

.sidebar-version {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-light);
    background-color: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

.sidebar-copyright {
    font-size: 10px;
    color: var(--text-light);
    opacity: 0.5;
    text-align: center;
    padding-top: 12px;
    margin-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-brand-text p {
    font-size: 11px;
    color: #4ade80;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* Pre-allocate icon dimensions before Lucide JS loads to prevent layout shifts (CLS) */
i[data-lucide],
[data-lucide] {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.sidebar-menu [data-lucide],
.sidebar-menu i[data-lucide],
.sidebar-menu svg.lucide {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
}

.sidebar-submenu [data-lucide],
.sidebar-submenu i[data-lucide],
.sidebar-submenu svg.lucide {
    width: 14px;
    height: 14px;
    min-width: 14px;
    min-height: 14px;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-menu > li > a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}

.sidebar-menu > li > a:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

.sidebar-menu > li.active > a {
    color: #ffffff;
    background-color: var(--wfg-primary);
}

/* Submenu layout styles */
.sidebar-submenu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    font-size: 13.5px;
    transition: var(--transition);
}

.sidebar-submenu li a:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
}

.sidebar-submenu li.active a {
    color: #ffffff;
    background-color: var(--wfg-primary);
}

/* Sidebar User Dropdown */
.sidebar-user-dropdown {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.sidebar-user-trigger {
    display: flex;
    align-items: center;
    width: 100%;
    background: transparent;
    border: none;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
    gap: 12px;
    transition: var(--transition);
}

.sidebar-user-trigger:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--wfg-primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-meta {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-grow: 1;
}

.user-name {
    font-weight: 700;
    font-size: 14px;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.dropdown-chevron {
    color: #64748b;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
}

.dropdown-chevron svg {
    width: 14px !important;
    height: 14px !important;
}

.sidebar-user-menu {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-sidebar-dark);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    margin-bottom: 8px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 -10px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.sidebar-user-menu.show {
    display: flex;
    animation: slideUpFade 0.2s ease;
}

.sidebar-user-menu a {
    padding: 12px 16px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.sidebar-user-menu a:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Main Content Area */
.app-content {
    flex: 1;
    margin-left: 280px;
    padding: 40px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.content-title h2 {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-color);
    letter-spacing: -0.02em;
}

.content-title p {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
}

/* --- COMPONENTS & CARDS --- */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    padding: 24px;
    margin-bottom: 24px;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
    text-align: left;
}

.table th {
    background-color: var(--bg-main);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    color: var(--text-color);
    font-size: 14px;
}

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

.table tbody tr:hover {
    background-color: var(--bg-light);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.badge-superadmin {
    background-color: var(--badge-superadmin-bg);
    color: var(--badge-superadmin-color);
}

.badge-admin {
    background-color: var(--badge-admin-bg);
    color: var(--badge-admin-color);
}

.badge-user {
    background-color: var(--badge-user-bg);
    color: var(--badge-user-color);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-color);
}

.form-control, select, textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: var(--bg-light);
    font-family: inherit;
    font-size: 14px;
    color: var(--text-color);
    transition: var(--transition);
    outline: none;
}

.form-control:focus, select:focus, textarea:focus {
    border-color: var(--wfg-primary);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 123, 94, 0.1);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    text-decoration: none;
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed !important;
    pointer-events: none;
    box-shadow: none;
}

.btn-primary {
    background-color: var(--wfg-primary);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--wfg-primary-dark);
}

.btn-secondary {
    background-color: #f1f5f9;
    color: var(--text-color);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background-color: #e2e8f0;
}

.btn-danger {
    background-color: #ef4444;
    color: #ffffff;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-ghost {
    background: transparent;
    color: var(--text-color);
    border-color: var(--border-color);
}

.btn-ghost:hover {
    background-color: #f1f5f9;
}

/* Icon Button Helper */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0 !important;
    border-radius: 4px;
    flex-shrink: 0;
}

/* Placeholder/Future Buttons */
.btn-placeholder {
    opacity: 0.6;
    cursor: pointer;
}

.btn-placeholder:hover {
    opacity: 0.85;
}

/* Lucide Icon sizes */
.sidebar-menu li a svg,
.sidebar-user-menu a svg {
    width: 18px;
    height: 18px;
    stroke-width: 2px;
    flex-shrink: 0;
}

.btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 2px;
    display: inline-block;
}

/* Grid helper */
.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .grid-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Alerts and error boxes */
.error-box {
    background-color: #fef2f2;
    border: 1px solid #fee2e2;
    color: #ef4444;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 20px;
}

.success-box {
    background-color: var(--success-bg-light);
    border: 1px solid var(--success-border-light);
    color: var(--success-color-dark);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 20px;
}

/* Tool allocation grid */
.tool-allocation-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tool-allocation-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-light);
}

.tool-allocation-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--wfg-primary);
}

/* Dashboard statistics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.stat-title {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-color);
    margin-top: 6px;
    letter-spacing: -0.02em;
}

/* Actions in tables - right-aligned */
.actions-cell {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* --- WFG MODAL SYSTEM --- */
.wfg-modal-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.wfg-modal-backdrop.show {
    opacity: 1;
}

.wfg-modal-card {
    background: var(--bg-card);
    border-radius: .3rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 480px;
    padding: 28px;
    transform: scale(0.92);
    transition: transform 0.2s ease;
}

.wfg-modal-backdrop.show .wfg-modal-card {
    transform: scale(1);
}

.wfg-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 14px;
    position: relative;
}

.wfg-modal-header h3 {
    font-size: 17.5px;
    font-weight: 800;
    color: var(--wfg-primary-dark);
    margin: 0;
    line-height: 1.35;
    padding-right: 40px;
    flex-grow: 1;
}

.wfg-modal-close {
    position: absolute !important;
    top: -2px;
    right: 0;
    background: #f1f5f9 !important;
    border: 1px solid var(--border-color) !important;
    font-size: 18px !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    color: var(--text-muted) !important;
    line-height: 1 !important;
    padding: 0 !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    box-sizing: border-box !important;
}

.wfg-modal-close:hover {
    color: #ffffff !important;
    background-color: #ef4444 !important;
    border-color: #ef4444 !important;
    transform: scale(1.08);
}

.wfg-modal-body {
    font-size: 14.5px;
    color: var(--text-color);
    margin-bottom: 0;
    line-height: 1.6;
}

.wfg-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

/* --- TOOL CARD (tools.php) --- */
.tool-card {
    display: flex;
    flex-direction: row;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.tool-card:hover {
    box-shadow: var(--shadow-md);
    border-color: #c8ddd8;
}

/* Left gradient accent bar - matches the prototype .kmu-slider-row::before style */
.tool-card-accent {
    width: 6px;
    flex-shrink: 0;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.tool-card-accent--active {
    background: linear-gradient(to bottom, var(--wfg-primary), transparent);
}

.tool-card-accent--inactive {
    background: linear-gradient(to bottom, #cbd5e1, #e2e8f0);
}

/* Card body */
.tool-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
}

/* --- PREMIUM STYLED FILE UPLOAD --- */
.premium-upload-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.premium-upload-box {
    position: relative;
    cursor: pointer;
    background: var(--bg-light);
    border: 2px dashed var(--border-light);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    box-sizing: border-box;
}

.premium-upload-box:hover {
    border-color: var(--wfg-primary);
    background: var(--wfg-primary-light);
}

/* Avatar-style circular upload box */
.premium-upload-box--avatar {
    width: 130px;
    height: 130px;
    border-radius: 50%;
}

/* Logo-style landscape upload box */
.premium-upload-box--logo {
    width: 100%;
    max-width: 220px;
    height: 100px;
    border-radius: var(--radius-sm);
    padding: 8px;
}

.premium-upload-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.premium-upload-box--logo img {
    object-fit: contain;
}

.premium-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    width: 100%;
    height: 100%;
    padding: 10px;
    box-sizing: border-box;
}

.premium-upload-placeholder svg {
    color: var(--wfg-primary);
    width: 24px;
    height: 24px;
    margin-bottom: 2px;
}

.premium-upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.2s ease;
    font-size: 11px;
    font-weight: 600;
}

.premium-upload-box:hover .premium-upload-overlay {
    opacity: 1;
}

.premium-upload-box:hover .premium-upload-overlay svg {
    animation: uploadBounce 0.4s ease alternate infinite;
}

@keyframes uploadBounce {
    from { transform: translateY(0); }
    to { transform: translateY(-3px); }
}

/* Modern Custom Checkbox System */
input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    border: 2px solid var(--border-light, #cbd5e1);
    border-radius: 5px;
    background-color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    vertical-align: middle;
    position: relative;
    outline: none;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

input[type="checkbox"]:hover {
    border-color: var(--wfg-primary);
    background-color: var(--wfg-primary-light);
}

input[type="checkbox"]:checked {
    background-color: var(--wfg-primary);
    border-color: var(--wfg-primary);
    box-shadow: 0 2px 5px rgba(0, 104, 94, 0.25);
}

input[type="checkbox"]:checked::after {
    content: "";
    width: 5px;
    height: 10px;
    border: solid #ffffff;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg) translate(0px, -1px);
    display: block;
}

input[type="checkbox"]:focus-visible {
    box-shadow: 0 0 0 3px rgba(0, 104, 94, 0.2);
    border-color: var(--wfg-primary);
}

input[type="checkbox"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f1f5f9;
}

/* Tool allocation cards (Screenshot 1) */
.tool-allocation-item {
    transition: all 0.2s ease !important;
    border: 1.5px solid var(--border-color) !important;
    border-radius: var(--radius-sm, 8px) !important;
    background: #ffffff !important;
    box-shadow: var(--shadow-sm);
}

.tool-allocation-item:hover {
    border-color: var(--border-hover, #c8ddd8) !important;
    background: #fafcfb !important;
    box-shadow: var(--shadow-md);
}

.tool-allocation-item:has(input[type="checkbox"]:checked),
.tool-allocation-item.is-selected {
    border-color: var(--wfg-primary) !important;
    background: var(--wfg-primary-light, #e6f2ef) !important;
    box-shadow: 0 2px 8px rgba(0, 104, 94, 0.12) !important;
}

.tool-allocation-item input[type="checkbox"] {
    margin-top: 2px !important;
}

/* --- SPLIT LOGIN PAGE --- */
.login-split-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: #ffffff;
    font-family: 'Inter', sans-serif;
}
.login-split-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}
.login-split-wrapper.row-reverse {
    flex-direction: row-reverse;
}
.login-form-side {
    flex: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 40px 60px 40px;
    background-color: #ffffff;
    position: relative;
}
.login-logo-wrap {
    position: absolute;
    top: 40px;
    left: 40px;
}
.login-logo {
    max-height: 56px;
    width: auto;
    display: block;
}
.login-header {
    text-align: left;
    margin-bottom: 28px;
}
.login-header h2 {
    font-size: 26px;
    font-weight: 800;
    color: var(--wfg-primary);
    margin: 0 0 6px 0;
}
.login-header p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}
.login-form-container {
    width: 100%;
    max-width: 420px;
}
.login-hero-side {
    flex: 6;
    background-image: url('/ressources/img/wfg-hero.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
}
.login-hero-side::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(160deg, rgba(0, 104, 94, 0.30) 0%, rgba(0, 0, 0, 0.52) 100%);
    pointer-events: none;
}
@media (max-width: 992px) {
    .login-split-wrapper {
        flex-direction: column;
    }
    .login-split-wrapper.row-reverse {
        flex-direction: column;
    }
    .login-form-side {
        padding: 100px 24px 60px 24px;
    }
    .login-logo-wrap {
        top: 24px;
        left: 24px;
    }
    .login-hero-side {
        display: none;
    }
}

/* Legal links footer inside the login form side */
.login-legal-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 16px 40px;
    border-top: 1px solid var(--border-color);
}
.login-legal-footer a {
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}
.login-legal-footer a:hover {
    color: var(--wfg-primary);
}

/* --- GLOBAL CRM PRELOADER COMPONENT --- */
.crm-preloader {
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.crm-spinner,
.media-spinner {
    width: 38px;
    height: 38px;
    border: 3px solid rgba(0, 104, 94, 0.15);
    border-top-color: var(--wfg-primary, #00685E);
    border-radius: 50%;
    animation: crm-spin 0.8s linear infinite;
    margin: 0 auto;
}
.crm-spinner.sm {
    width: 24px;
    height: 24px;
    border-width: 2px;
}
.crm-spinner.lg {
    width: 52px;
    height: 52px;
    border-width: 4px;
}
@keyframes crm-spin {
    to { transform: rotate(360deg); }
}
@keyframes media-spin {
    to { transform: rotate(360deg); }
}
.crm-preloader-title {
    margin-top: 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color, #1e293b);
}
.crm-preloader-subtitle {
    font-size: 12px;
    color: var(--text-muted, #64748b);
    margin-top: 4px;
}
