/* ═══════════════════════════════════════════
   AIM - Enterprise Project Management
   Main Stylesheet
   ═══════════════════════════════════════════ */

:root {
    /* Brand Colors - AIMatric (#FF6B00 from aimatric.com) */
    --aim-primary: #FF6B00;
    --aim-primary-hover: #E85D00;
    --aim-primary-light: #FFF4EB;
    --aim-secondary: #0F2B3C;
    --aim-secondary-light: #1A3D52;
    --aim-teal: #1A7A7A;
    --aim-teal-light: #E6F5F5;

    /* Sidebar (logo color #115884) */
    --aim-sidebar-bg: #115884;
    --aim-sidebar-hover: #1A6A9E;
    --aim-sidebar-active: #FF6B00;
    --aim-sidebar-text: rgba(255,255,255,0.8);
    --aim-sidebar-text-active: #FFFFFF;
    --aim-sidebar-width: 250px;
    --aim-sidebar-collapsed: 64px;

    /* Topbar */
    --aim-topbar-bg: #FFFFFF;
    --aim-topbar-height: 56px;
    --aim-topbar-border: #E2E8F0;

    /* Backgrounds */
    --aim-bg: #F1F5F9;
    --aim-bg-card: #FFFFFF;
    --aim-bg-hover: #F8FAFC;

    /* Text */
    --aim-text: #1E293B;
    --aim-text-secondary: #64748B;
    --aim-text-muted: #94A3B8;

    /* Borders */
    --aim-border: #E2E8F0;
    --aim-border-light: #F1F5F9;

    /* Status Colors (brand-aligned) */
    --aim-success: #FF6B00;
    --aim-warning: #FFB574;
    --aim-danger: #CC4E00;
    --aim-info: #E85D00;

    /* Priority Colors (brand-aligned orange scale) */
    --aim-critical: #CC4E00;
    --aim-high: #E85D00;
    --aim-medium: #FF6B00;
    --aim-low: #FFB574;

    /* Aliases */
    --aim-orange: #FF6B00;
    --aim-text-primary: #1E293B;

    /* Shadows */
    --aim-shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --aim-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --aim-shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --aim-shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);

    /* Radius */
    --aim-radius: 8px;
    --aim-radius-sm: 4px;
    --aim-radius-lg: 12px;
}

/* ── Global Reset ── */
* { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--aim-bg);
    color: var(--aim-text);
    margin: 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--aim-primary); text-decoration: none; }
a:hover { color: var(--aim-primary-hover); }

/* ── Layout ── */
.aim-wrapper {
    display: flex;
    min-height: 100vh;
}

.aim-sidebar {
    width: var(--aim-sidebar-width);
    background: var(--aim-sidebar-bg);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: width 0.2s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

.aim-sidebar::-webkit-scrollbar { width: 4px; }
.aim-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 2px; }

.aim-main {
    flex: 1;
    margin-left: var(--aim-sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.2s ease;
}

.aim-topbar {
    height: var(--aim-topbar-height);
    background: var(--aim-topbar-bg);
    border-bottom: 1px solid var(--aim-topbar-border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: var(--aim-shadow-sm);
}

.aim-content {
    flex: 1;
    padding: 24px;
}

/* ── Sidebar Logo ── */
.aim-sidebar-logo {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    min-height: 56px;
}

.aim-sidebar-logo img {
    height: 28px;
}

.aim-sidebar-logo .logo-text {
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
}

.aim-sidebar-logo .logo-icon {
    width: 32px;
    height: 32px;
    background: #FF6B00;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFF;
    font-weight: 700;
    font-size: 14px;
}

/* ── Sidebar Navigation ── */
.aim-sidebar-section {
    padding: 12px 0 4px;
}

.aim-sidebar-section-title {
    padding: 0 20px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,0.55);
    margin-bottom: 4px;
}

.aim-nav-item {
    display: flex;
    align-items: center;
    padding: 8px 20px;
    color: var(--aim-sidebar-text);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s ease;
    cursor: pointer;
    border-left: 3px solid transparent;
}

.aim-nav-item:hover {
    background: var(--aim-sidebar-hover);
    color: var(--aim-sidebar-text-active);
}

.aim-nav-item.active {
    background: rgba(255,255,255,0.12);
    color: var(--aim-sidebar-text-active);
    border-left-color: #FF6B00;
}

.aim-nav-item i {
    width: 20px;
    margin-right: 12px;
    font-size: 15px;
    text-align: center;
    opacity: 0.8;
}

.aim-nav-item.active i { opacity: 1; }

.aim-nav-item .badge {
    margin-left: auto;
    font-size: 10px;
    padding: 2px 6px;
}

.aim-nav-submenu {
    display: none;
}

.aim-nav-submenu.show {
    display: block;
}

.aim-nav-submenu .aim-nav-item {
    padding-left: 52px;
    font-size: 12.5px;
}

/* ── Topbar ── */
.aim-topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.aim-topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

.aim-search-box {
    position: relative;
    width: 320px;
}

.aim-search-box input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--aim-border);
    border-radius: var(--aim-radius);
    background: var(--aim-bg);
    font-size: 13px;
    color: var(--aim-text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.aim-search-box input:focus {
    outline: none;
    border-color: var(--aim-teal);
    box-shadow: 0 0 0 3px rgba(26, 122, 122, 0.1);
}

.aim-search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--aim-text-muted);
    font-size: 14px;
}

.aim-topbar-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--aim-text-secondary);
    transition: all 0.15s ease;
    position: relative;
    cursor: pointer;
}

.aim-topbar-icon:hover {
    background: var(--aim-bg);
    color: var(--aim-text);
}

.aim-topbar-icon .notification-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--aim-primary);
    border-radius: 50%;
    border: 2px solid var(--aim-topbar-bg);
}

.aim-user-dropdown {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--aim-radius);
    transition: background 0.15s;
}

.aim-user-dropdown:hover {
    background: var(--aim-bg);
}

.aim-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #FFF;
}

.aim-avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.aim-avatar-lg { width: 40px; height: 40px; font-size: 16px; }
.aim-avatar-xl { width: 56px; height: 56px; font-size: 20px; }

.aim-avatar.bg-primary { background: var(--aim-primary); }
.aim-avatar.bg-teal { background: var(--aim-teal); }
.aim-avatar.bg-info { background: var(--aim-info); }

/* ── Cards ── */
.aim-card {
    background: var(--aim-bg-card);
    border-radius: var(--aim-radius-lg);
    box-shadow: var(--aim-shadow);
    border: 1px solid var(--aim-border-light);
}

.aim-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--aim-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.aim-card-header h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    color: var(--aim-text);
}

.aim-card-body {
    padding: 20px;
}

/* ── Page Header ── */
.aim-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.aim-page-header h1 {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    color: var(--aim-text);
}

.aim-page-header .subtitle {
    color: var(--aim-text-secondary);
    font-size: 13px;
    margin-top: 2px;
}

.aim-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--aim-text-muted);
    margin-bottom: 8px;
}

.aim-breadcrumb a {
    color: var(--aim-text-secondary);
}

.aim-breadcrumb a:hover {
    color: var(--aim-primary);
}

.aim-breadcrumb .separator {
    color: var(--aim-text-muted);
}

/* ── Buttons ── */
.btn-aim-primary {
    background: var(--aim-primary);
    color: #FFF;
    border: none;
    padding: 8px 20px;
    border-radius: var(--aim-radius);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.15s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-aim-primary:hover {
    background: var(--aim-primary-hover);
    color: #FFF;
    box-shadow: var(--aim-shadow-md);
}

.btn-aim-secondary {
    background: var(--aim-secondary);
    color: #FFF;
    border: none;
    padding: 8px 20px;
    border-radius: var(--aim-radius);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.15s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-aim-secondary:hover {
    background: var(--aim-secondary-light);
    color: #FFF;
}

.btn-aim-outline {
    background: transparent;
    color: var(--aim-text-secondary);
    border: 1px solid var(--aim-border);
    padding: 8px 20px;
    border-radius: var(--aim-radius);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-aim-outline:hover {
    border-color: var(--aim-primary);
    color: var(--aim-primary);
    background: var(--aim-primary-light);
}

/* ── Stat Cards ── */
.aim-stat-card {
    background: var(--aim-bg-card);
    border-radius: var(--aim-radius-lg);
    padding: 20px;
    box-shadow: var(--aim-shadow);
    border: 1px solid var(--aim-border-light);
}

.aim-stat-card .stat-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--aim-text-muted);
    margin-bottom: 8px;
}

.aim-stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--aim-text);
    line-height: 1.2;
}

.aim-stat-card .stat-sub {
    font-size: 12px;
    color: var(--aim-text-secondary);
    margin-top: 4px;
}

.aim-stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

/* Clickable stat cards */
a.aim-stat-clickable {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    position: relative;
    cursor: pointer;
}
a.aim-stat-clickable:hover {
    transform: translateY(-2px);
    box-shadow: var(--aim-shadow-md);
    border-color: var(--aim-primary);
}
a.aim-stat-clickable .stat-link {
    font-size: 11px;
    font-weight: 600;
    color: var(--aim-primary);
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}
a.aim-stat-clickable:hover .stat-link {
    opacity: 1;
}
a.aim-stat-clickable .stat-link i {
    font-size: 10px;
    margin-left: 2px;
}

/* Clickable table rows */
.aim-row-clickable {
    cursor: pointer;
    transition: background 0.15s ease;
}
.aim-row-clickable:hover {
    background: var(--aim-primary-light) !important;
}

/* Clickable notification rows */
.aim-notification-row:hover {
    background: var(--aim-bg-hover);
}

/* ── Tables ── */
.aim-table {
    width: 100%;
    border-collapse: collapse;
}

.aim-table thead th {
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--aim-text-muted);
    border-bottom: 2px solid var(--aim-border);
    text-align: left;
    white-space: nowrap;
}

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

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

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

/* ── Badges / Status ── */
.aim-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.aim-badge-success { background: #FFF4EB; color: #FF6B00; }
.aim-badge-warning { background: #FFE0C2; color: #E85D00; }
.aim-badge-danger { background: #FEECD6; color: #CC4E00; }
.aim-badge-info { background: #FFF8F0; color: #FF6B00; }
.aim-badge-muted { background: #F1F5F9; color: #475569; }
.aim-badge-primary { background: var(--aim-primary-light); color: var(--aim-primary); }
.aim-badge-teal { background: var(--aim-teal-light); color: var(--aim-teal); }

/* Priority badges */
.aim-priority-critical { color: var(--aim-critical); }
.aim-priority-high { color: var(--aim-high); }
.aim-priority-medium { color: var(--aim-medium); }
.aim-priority-low { color: var(--aim-low); }

.aim-priority-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.aim-priority-dot.critical { background: var(--aim-critical); }
.aim-priority-dot.high { background: var(--aim-high); }
.aim-priority-dot.medium { background: var(--aim-medium); }
.aim-priority-dot.low { background: var(--aim-low); }

/* ── Kanban Board ── */
.aim-board {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 16px;
    min-height: calc(100vh - 200px);
}

.aim-board-column {
    min-width: 280px;
    max-width: 320px;
    flex-shrink: 0;
    background: var(--aim-bg);
    border-radius: var(--aim-radius-lg);
    display: flex;
    flex-direction: column;
}

.aim-board-column-header {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: var(--aim-text);
}

.aim-board-column-header .count {
    background: var(--aim-border);
    color: var(--aim-text-secondary);
    padding: 1px 8px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
}

.aim-board-cards {
    flex: 1;
    padding: 0 8px 8px;
    overflow-y: auto;
    min-height: 100px;
}

.aim-task-card {
    background: var(--aim-bg-card);
    border-radius: var(--aim-radius);
    padding: 12px;
    margin-bottom: 8px;
    box-shadow: var(--aim-shadow-sm);
    border: 1px solid var(--aim-border-light);
    cursor: pointer;
    transition: box-shadow 0.15s, transform 0.1s;
}

.aim-task-card:hover {
    box-shadow: var(--aim-shadow-md);
    transform: translateY(-1px);
}

.aim-task-card .task-id {
    font-size: 11px;
    color: var(--aim-text-muted);
    font-weight: 600;
}

.aim-task-card .task-title {
    font-size: 13px;
    font-weight: 500;
    margin: 4px 0 8px;
    color: var(--aim-text);
    line-height: 1.4;
}

.aim-task-card .task-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--aim-text-muted);
}

/* ── Progress Bars ── */
.aim-progress {
    height: 8px;
    background: #EEE;
    border-radius: 4px;
    overflow: hidden;
}

.aim-progress-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
    background: var(--aim-teal);
}

.aim-progress-bar.success { background: var(--aim-success); }
.aim-progress-bar.warning { background: var(--aim-warning); }
.aim-progress-bar.danger { background: var(--aim-danger); }
.aim-progress-bar.primary { background: var(--aim-primary); }
.aim-progress-bar.teal { background: var(--aim-teal); }

/* Allocation-specific progress (color changes by %) */
.aim-progress.aim-alloc-progress {
    height: 10px;
    background: #E8E8E8;
    border-radius: 5px;
    min-width: 70px;
}
.aim-alloc-progress .aim-progress-bar.alloc-low {
    background: linear-gradient(90deg, #FF9D4D, #FFB574);
}
.aim-alloc-progress .aim-progress-bar.alloc-medium {
    background: linear-gradient(90deg, #FF6B00, #FF8534);
}
.aim-alloc-progress .aim-progress-bar.alloc-high {
    background: linear-gradient(90deg, #E85D00, #FF6B00);
}
.aim-alloc-progress .aim-progress-bar.alloc-full {
    background: linear-gradient(90deg, #CC4E00, #E85D00);
}

/* ── Forms ── */
.aim-form-group {
    margin-bottom: 16px;
}

.aim-form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--aim-text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.aim-form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--aim-border);
    border-radius: var(--aim-radius);
    font-size: 13px;
    color: var(--aim-text);
    background: #FFF;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.aim-form-control:focus {
    outline: none;
    border-color: var(--aim-teal);
    box-shadow: 0 0 0 3px rgba(26, 122, 122, 0.1);
}

/* ── Timer ── */
.aim-timer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: var(--aim-radius);
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.aim-timer.running {
    background: #FFF4EB;
    color: var(--aim-primary);
    animation: timer-pulse 2s infinite;
}

.aim-timer.stopped {
    background: var(--aim-bg);
    color: var(--aim-text-secondary);
}

@keyframes timer-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ── Gantt ── */
.aim-gantt-container {
    overflow-x: auto;
    background: var(--aim-bg-card);
    border-radius: var(--aim-radius-lg);
    box-shadow: var(--aim-shadow);
}

.aim-gantt-row {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--aim-border-light);
    min-height: 40px;
}

.aim-gantt-label {
    width: 260px;
    min-width: 260px;
    padding: 8px 16px;
    font-size: 13px;
    border-right: 1px solid var(--aim-border);
}

.aim-gantt-bar {
    height: 24px;
    border-radius: 4px;
    position: relative;
}

.aim-gantt-bar.completed { background: var(--aim-primary); }
.aim-gantt-bar.in-progress { background: var(--aim-info); }
.aim-gantt-bar.remaining { background: var(--aim-border); }
.aim-gantt-bar.overdue { background: var(--aim-danger); }

/* ── Empty States ── */
.aim-empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--aim-text-muted);
}

.aim-empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.aim-empty-state h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--aim-text-secondary);
    margin-bottom: 4px;
}

.aim-empty-state p {
    font-size: 13px;
    margin-bottom: 16px;
}

/* ── Heatmap ── */
.aim-heatmap-cell {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
}

.aim-heatmap-low { background: #FFF4EB; color: #FF6B00; }
.aim-heatmap-medium { background: #FFE0C2; color: #E85D00; }
.aim-heatmap-high { background: #FFD0A0; color: #CC4E00; }
.aim-heatmap-critical { background: #FEECD6; color: #993A00; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .aim-sidebar {
        transform: translateX(-100%);
    }
    .aim-sidebar.show {
        transform: translateX(0);
    }
    .aim-main {
        margin-left: 0;
    }
    .aim-content {
        padding: 16px;
    }
    .aim-search-box {
        width: 200px;
    }
}

/* ── Auth Pages (login, register) ── */
.aim-auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0F2B3C 0%, #1A3D52 50%, #FF6B00 150%);
}

.aim-auth-card {
    width: 100%;
    max-width: 420px;
    background: #FFF;
    border-radius: var(--aim-radius-lg);
    box-shadow: var(--aim-shadow-lg);
    padding: 40px;
}

.aim-auth-card .auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.aim-auth-card .auth-logo h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--aim-secondary);
    margin: 8px 0 4px;
}

.aim-auth-card .auth-logo p {
    color: var(--aim-text-muted);
    font-size: 13px;
}

/* ── Utility ── */
.text-aim-primary { color: var(--aim-primary) !important; }
.text-aim-teal { color: var(--aim-teal) !important; }
.text-aim-muted { color: var(--aim-text-muted) !important; }
.bg-aim-primary { background: var(--aim-primary) !important; }
.bg-aim-teal { background: var(--aim-teal) !important; }
.bg-aim-light { background: var(--aim-bg) !important; }

.cursor-pointer { cursor: pointer; }
.font-mono { font-family: 'SF Mono', 'Fira Code', monospace; }

/* ═══════════════════════════════════════════
   Select2 — AIM Theme Overrides
   ═══════════════════════════════════════════ */

/* Single select container */
.select2-container--bootstrap-5 .select2-selection--single {
    border: 1px solid var(--aim-border);
    border-radius: var(--aim-radius);
    min-height: 36px;
    padding: 4px 12px;
    font-size: 13px;
    color: var(--aim-text);
    background: #FFF;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.select2-container--bootstrap-5 .select2-selection--single:focus,
.select2-container--bootstrap-5.select2-container--focus .select2-selection--single,
.select2-container--bootstrap-5.select2-container--open .select2-selection--single {
    border-color: var(--aim-teal);
    box-shadow: 0 0 0 3px rgba(26, 122, 122, 0.1);
    outline: none;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    color: var(--aim-text);
    font-size: 13px;
    padding: 0;
    line-height: 26px;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__placeholder {
    color: var(--aim-text-muted);
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
    height: 34px;
    right: 8px;
}

/* Multiple select container */
.select2-container--bootstrap-5 .select2-selection--multiple {
    border: 1px solid var(--aim-border);
    border-radius: var(--aim-radius);
    min-height: 36px;
    padding: 2px 8px;
    font-size: 13px;
    background: #FFF;
}

.select2-container--bootstrap-5 .select2-selection--multiple:focus,
.select2-container--bootstrap-5.select2-container--focus .select2-selection--multiple,
.select2-container--bootstrap-5.select2-container--open .select2-selection--multiple {
    border-color: var(--aim-teal);
    box-shadow: 0 0 0 3px rgba(26, 122, 122, 0.1);
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
    background: var(--aim-teal-light);
    color: var(--aim-teal);
    border: 1px solid rgba(26, 122, 122, 0.2);
    border-radius: var(--aim-radius-sm);
    font-size: 12px;
    font-weight: 500;
    padding: 1px 8px;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove {
    color: var(--aim-teal);
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: var(--aim-danger);
}

/* Dropdown panel */
.select2-container--bootstrap-5 .select2-dropdown {
    border: 1px solid var(--aim-border);
    border-radius: var(--aim-radius);
    box-shadow: var(--aim-shadow-lg);
    overflow: hidden;
}

.select2-container--bootstrap-5 .select2-dropdown--below {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    margin-top: -1px;
}

.select2-container--bootstrap-5 .select2-dropdown--above {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    margin-bottom: -1px;
}

/* Search input inside dropdown */
.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field {
    border: 1px solid var(--aim-border);
    border-radius: var(--aim-radius-sm);
    font-size: 13px;
    padding: 6px 10px;
    color: var(--aim-text);
}

.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--aim-teal);
    box-shadow: 0 0 0 2px rgba(26, 122, 122, 0.1);
    outline: none;
}

/* Results list */
.select2-container--bootstrap-5 .select2-results__option {
    font-size: 13px;
    padding: 8px 12px;
    color: var(--aim-text);
}

.select2-container--bootstrap-5 .select2-results__option--highlighted.select2-results__option--selectable {
    background: var(--aim-teal-light);
    color: var(--aim-teal);
}

.select2-container--bootstrap-5 .select2-results__option--selected {
    background: var(--aim-bg);
    color: var(--aim-text);
}

.select2-container--bootstrap-5 .select2-results__option[aria-selected=true] {
    background: var(--aim-teal-light);
    color: var(--aim-teal);
}

/* Clear button */
.select2-container--bootstrap-5 .select2-selection__clear {
    color: var(--aim-text-muted);
    font-size: 16px;
}

.select2-container--bootstrap-5 .select2-selection__clear:hover {
    color: var(--aim-danger);
}

/* Loading indicator */
.select2-container--bootstrap-5 .select2-results__option--load-more,
.select2-container--bootstrap-5 .select2-results__message {
    color: var(--aim-text-muted);
    font-size: 12px;
    padding: 8px 12px;
}

/* Make sure Select2 works in modals */
.modal .select2-container {
    z-index: 1056;
}

/* Compact Select2 for filter bars */
.aim-form-control-sm + .select2-container--bootstrap-5 .select2-selection--single,
select.aim-form-control-sm + .select2-container--bootstrap-5 .select2-selection--single {
    min-height: 32px;
    font-size: 12px;
}

/* Full-width inside form groups */
.aim-form-group .select2-container {
    width: 100% !important;
}
