/* ============================================================
   Page-Specific Styles
   Extracted from embedded <style> blocks in templates
   ============================================================ */


/* === Organization Onboarding === */

    .onboarding-container {
        max-width: 1200px;
        margin: 0 auto;
    }
    
    .progress-container {
        background-color: var(--bg-primary);
        border: 1px solid var(--border-primary);
        border-radius: var(--radius-md);
        padding: 1.5rem;
        margin-bottom: 2rem;
        box-shadow: var(--shadow-card);
    }
    
    .progress {
        height: 24px;
        border-radius: 12px;
        background-color: var(--bg-tertiary);
    }
    
    .progress-bar {
        background: linear-gradient(90deg, var(--sbbmi-green) 0%, var(--sbbmi-green-light) 100%);
        border-radius: 12px;
        font-weight: 600;
        font-size: 0.875rem;
        transition: width 0.3s ease;
    }
    
    .breadcrumb {
        background-color: transparent;
        padding: 0;
        margin-bottom: 1.5rem;
    }
    
    .breadcrumb-item + .breadcrumb-item::before {
        content: "›";
        color: var(--text-tertiary);
    }
    
    .breadcrumb-item a {
        color: var(--sbbmi-green);
        text-decoration: none;
    }
    
    .breadcrumb-item a:hover {
        color: var(--sbbmi-green-dark);
        text-decoration: underline;
    }
    
    .breadcrumb-item.active {
        color: var(--text-secondary);
    }
    
    .nav-tabs {
        border-bottom: 2px solid var(--border-primary);
        margin-bottom: 2rem;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-tabs .nav-link {
        border: none;
        color: var(--text-tertiary);
        padding: 0.6rem 1.25rem;
        font-weight: 500;
        border-bottom: 3px solid transparent;
        transition: all 0.2s ease;
        white-space: nowrap;
    }
    
    .nav-tabs .nav-link:hover {
        color: var(--text-primary);
        border-bottom-color: var(--sbbmi-green-light);
    }
    
    .nav-tabs .nav-link.active {
        color: var(--sbbmi-green);
        border-bottom-color: var(--sbbmi-green);
        background-color: transparent;
    }
    
    .form-section {
        background-color: var(--bg-primary);
        border: 1px solid var(--border-primary);
        border-radius: var(--radius-card);
        padding: 2rem;
        box-shadow: var(--shadow-card);
    }
    
    .form-label {
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 0.5rem;
        font-size: 0.875rem;
    }
    
    .form-control,
    .form-select {
        border: 1px solid var(--border-primary);
        border-radius: var(--radius-sm);
        padding: 0.75rem 1rem;
        font-size: 0.938rem;
        transition: all 0.15s ease;
        background-color: var(--bg-secondary);
        color: var(--text-primary);
    }
    
    .form-control:focus,
    .form-select:focus {
        border-color: var(--sbbmi-green);
        box-shadow: 0 0 0 0.2rem rgba(90, 125, 111, 0.15);
        background-color: var(--bg-primary);
    }
    
    .form-control::placeholder {
        color: var(--text-muted);
    }
    
    @media (max-width: 768px) {
        .form-control,
        .form-select,
        .btn {
            min-height: 44px;
            font-size: 16px;
        }
    }
    
    .form-check {
        padding-left: 1.75rem;
        margin-bottom: 0.75rem;
    }
    
    .form-check-input {
        width: 1.25rem;
        height: 1.25rem;
        margin-top: 0.125rem;
        border: 2px solid var(--border-primary);
        cursor: pointer;
    }
    
    .form-check-input:checked {
        background-color: var(--sbbmi-green);
        border-color: var(--sbbmi-green);
    }
    
    .form-check-input:focus {
        border-color: var(--sbbmi-green);
        box-shadow: 0 0 0 0.2rem rgba(90, 125, 111, 0.15);
    }
    
    .form-check-label {
        color: var(--text-secondary);
        cursor: pointer;
        font-size: 0.938rem;
    }
    
    .section-header {
        font-size: 1.125rem;
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 1.5rem;
        padding-bottom: 0.75rem;
        border-bottom: 2px solid var(--border-primary);
    }
    
    .subsection-header {
        font-size: 1rem;
        font-weight: 600;
        color: var(--sbbmi-green);
        margin-top: 2rem;
        margin-bottom: 1rem;
    }
    
    .contact-group {
        background-color: var(--bg-secondary);
        border: 1px solid var(--border-secondary);
        border-radius: var(--radius-md);
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .save-button-container {
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        background: linear-gradient(to bottom, transparent, var(--bg-secondary) 30%);
        padding: 1.5rem 0 1rem 0;
        margin-top: 2rem;
        z-index: 100;
    }
    
    @media (max-width: 768px) {
        .save-button-container {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background-color: var(--bg-primary);
            border-top: 1px solid var(--border-primary);
            padding: 1rem;
            box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
        }
        
        .save-button-container .btn {
            width: 100%;
        }
    }
    
    @media (max-width: 768px) {
        .nav-tabs {
            font-size: 0.875rem;
        }
        
        .nav-tabs .nav-link {
            padding: 0.75rem 1rem;
        }
        
        .form-section {
            padding: 1.25rem;
        }
        
        .onboarding-container {
            padding-bottom: 80px;
        }
    }
    
    .form-text {
        color: var(--text-tertiary);
        font-size: 0.813rem;
        margin-top: 0.25rem;
    }
    
    .required-indicator {
        color: #dc3545;
        margin-left: 0.25rem;
    }


/* === Organization View === */

    /* ========== Account Health Panel ========== */
    .health-panel {
        background: linear-gradient(135deg, #f7f5f0 0%, #ede9e0 100%);
        border: 1px solid #d4cfc5;
        border-radius: var(--radius-lg, 12px);
        padding: 0;
        overflow: hidden;
    }
    
    [data-bs-theme="dark"] .health-panel {
        background: linear-gradient(135deg, #1e2a24 0%, #1a2420 100%);
        border-color: #2d3a33;
    }
    
    .health-panel-grid {
        display: flex;
        align-items: stretch;
        min-height: 80px;
    }
    
    .health-cell {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 14px 10px;
        gap: 8px;
    }
    
    .health-cell-divider {
        width: 1px;
        background: linear-gradient(180deg, transparent 15%, #c8c0b4 50%, transparent 85%);
        flex-shrink: 0;
    }
    
    [data-bs-theme="dark"] .health-cell-divider {
        background: linear-gradient(180deg, transparent 15%, #3a4a40 50%, transparent 85%);
    }
    
    .health-cell-label {
        font-size: 0.78rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.6px;
        color: #5a5040;
        white-space: nowrap;
    }
    
    [data-bs-theme="dark"] .health-cell-label {
        color: #a0b0a6;
    }
    
    /* Traffic Light Component */
    .traffic-light-housing {
        background: #ddd9d0;
        padding: 4px 8px;
        border: 1px solid #c8c0b4;
    }
    
    [data-bs-theme="dark"] .traffic-light-housing {
        background: #161c18;
        border-color: #2d3a33;
    }
    
    .health-traffic-btn, .health-traffic-light {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        border: 2px solid rgba(0,0,0,0.12);
        display: inline-block;
        padding: 0;
    }

    .health-traffic-btn {
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    [data-bs-theme="dark"] .health-traffic-btn,
    [data-bs-theme="dark"] .health-traffic-light {
        border-color: rgba(255,255,255,0.08);
    }
    
    .health-traffic-btn[data-level="GREEN"],
    .health-traffic-light[data-level="GREEN"] {
        background: #c5cfc8;
        box-shadow: inset 0 1px 3px rgba(0,0,0,0.12);
    }
    .health-traffic-btn[data-level="YELLOW"],
    .health-traffic-light[data-level="YELLOW"] {
        background: #d4cfc5;
        box-shadow: inset 0 1px 3px rgba(0,0,0,0.12);
    }
    .health-traffic-btn[data-level="RED"],
    .health-traffic-light[data-level="RED"] {
        background: #d4c5c5;
        box-shadow: inset 0 1px 3px rgba(0,0,0,0.12);
    }
    
    [data-bs-theme="dark"] .health-traffic-btn[data-level="GREEN"],
    [data-bs-theme="dark"] .health-traffic-btn[data-level="YELLOW"],
    [data-bs-theme="dark"] .health-traffic-btn[data-level="RED"],
    [data-bs-theme="dark"] .health-traffic-light[data-level="GREEN"],
    [data-bs-theme="dark"] .health-traffic-light[data-level="YELLOW"],
    [data-bs-theme="dark"] .health-traffic-light[data-level="RED"] {
        background: #252c28;
        box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
    }
    
    .health-traffic-btn.lit[data-level="GREEN"],
    .health-traffic-light.lit[data-level="GREEN"] {
        background: #4caf50 !important;
        box-shadow: 0 0 6px #4caf50, 0 0 12px rgba(76,175,80,0.3) !important;
    }
    .health-traffic-btn.lit[data-level="YELLOW"],
    .health-traffic-light.lit[data-level="YELLOW"] {
        background: #ff9800 !important;
        box-shadow: 0 0 6px #ff9800, 0 0 12px rgba(255,152,0,0.3) !important;
    }
    .health-traffic-btn.lit[data-level="RED"],
    .health-traffic-light.lit[data-level="RED"] {
        background: #f44336 !important;
        box-shadow: 0 0 6px #f44336, 0 0 12px rgba(244,67,54,0.3) !important;
    }
    
    .health-traffic-btn:hover {
        transform: scale(1.12);
    }
    
    /* Single Indicator Light (on/off toggle) */
    .health-indicator {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        border: 2px solid rgba(0,0,0,0.1);
        cursor: pointer;
        transition: all 0.25s ease;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #d4cfc5;
        color: #a09888;
        font-size: 0.85rem;
        box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    }
    
    [data-bs-theme="dark"] .health-indicator {
        background: #252c28;
        border-color: rgba(255,255,255,0.06);
        color: #4a5550;
        box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
    }
    
    .health-indicator.lit {
        background: #4caf50 !important;
        color: #fff !important;
        border-color: rgba(76,175,80,0.3) !important;
        box-shadow: 0 0 8px rgba(76,175,80,0.4), 0 0 16px rgba(76,175,80,0.2) !important;
    }
    
    .health-indicator:hover {
        transform: scale(1.12);
    }

    .health-indicator-pill {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 4px 12px;
        border-radius: 999px;
        border: 1.5px solid rgba(0,0,0,0.1);
        background: #d4cfc5;
        color: #8a8070;
        font-size: 0.8rem;
        box-shadow: inset 0 1px 2px rgba(0,0,0,0.08);
    }

    .health-indicator-pill i {
        font-size: 0.8rem;
    }

    [data-bs-theme="dark"] .health-indicator-pill {
        background: #252c28;
        border-color: rgba(255,255,255,0.06);
        color: #4a5550;
        box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
    }

    .health-indicator-pill.lit {
        background: #4caf50 !important;
        color: #fff !important;
        border-color: rgba(76,175,80,0.3) !important;
        box-shadow: 0 0 8px rgba(76,175,80,0.4), 0 0 16px rgba(76,175,80,0.2) !important;
    }

    
    .health-proximity-badge {
        font-size: 0.65rem;
        font-weight: 700;
        padding: 2px 6px;
        border-radius: 8px;
        letter-spacing: 0.3px;
    }
    .health-proximity-badge.danger {
        background: rgba(244,67,54,0.12);
        color: #e05545;
    }
    .health-proximity-badge.warning {
        background: rgba(255,152,0,0.12);
        color: #d4860a;
    }
    
    [data-bs-theme="dark"] .health-proximity-badge.danger {
        background: rgba(244,67,54,0.2);
        color: #f08070;
    }
    [data-bs-theme="dark"] .health-proximity-badge.warning {
        background: rgba(255,152,0,0.2);
        color: #e0a458;
    }
    
    /* Activity Badge */
    .health-activity-badge {
        font-size: 0.78rem;
        font-weight: 600;
        padding: 3px 10px;
        border-radius: 10px;
        letter-spacing: 0.3px;
    }
    .health-activity-badge.success {
        background: rgba(76,175,80,0.12);
        color: #3a8a3e;
    }
    .health-activity-badge.warning {
        background: rgba(255,152,0,0.12);
        color: #c47a00;
    }
    .health-activity-badge.danger {
        background: rgba(244,67,54,0.12);
        color: #d44030;
    }
    .health-activity-badge.neutral {
        background: rgba(0,0,0,0.06);
        color: #8a8070;
    }
    
    [data-bs-theme="dark"] .health-activity-badge.success {
        background: rgba(76,175,80,0.18);
        color: #6dbf8b;
    }
    [data-bs-theme="dark"] .health-activity-badge.warning {
        background: rgba(255,152,0,0.18);
        color: #e0a458;
    }
    [data-bs-theme="dark"] .health-activity-badge.danger {
        background: rgba(244,67,54,0.18);
        color: #f08070;
    }
    [data-bs-theme="dark"] .health-activity-badge.neutral {
        background: rgba(255,255,255,0.06);
        color: #6a7a70;
    }
    
    @media (max-width: 768px) {
        .health-panel-grid {
            flex-wrap: wrap;
        }
        .health-cell {
            flex: 0 0 33.33%;
            min-width: 0;
        }
        .health-cell-divider {
            display: none;
        }
    }

    .info-label {
        color: var(--nexus-charcoal);
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 0.25rem;
    }
    .info-value {
        color: var(--text-primary);
        margin-bottom: 1rem;
    }
    .info-card {
        background-color: var(--nexus-card-white, #FEFDFB) !important;
        border: 1px solid var(--nexus-pale-sage) !important;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-md);
        overflow: hidden;
    }
    .info-card .card-header {
        background-color: var(--nexus-card-white, #FEFDFB) !important;
        border-bottom: 1px solid var(--nexus-pale-sage) !important;
        padding: 1rem 1.25rem;
        min-height: 70px !important;
        display: flex !important;
        align-items: center !important;
    }
    .info-card .card-body {
        padding: 1.25rem;
    }
    .section-title {
        color: var(--text-primary);
        font-weight: 600;
        margin-bottom: 0 !important;
        flex: 1;
    }
    .status-badge {
        font-size: 0.85rem;
        padding: 0.35rem 0.7rem;
        border-radius: 1rem;
    }
    .contact-info i, .address-info i, .business-info i, .targeting-info i, .owner-info i {
        width: 20px;
        color: var(--nexus-charcoal);
        text-align: center;
        margin-right: 0.5rem;
    }
    .info-label {
        color: var(--text-primary);
        font-weight: 700;
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    .placeholder-link {
        color: var(--text-muted) !important;
        text-decoration: none;
    }
    .placeholder-link:hover {
        color: var(--text-secondary) !important;
        text-decoration: underline;
    }
    .info-sublabel {
        color: var(--nexus-charcoal);
        font-size: 0.85rem;
        margin-right: 0.5rem;
    }
    .targeting-info .badge {
        padding: 0.4rem 0.8rem;
    }
    .contact-item {
        margin-bottom: 0.5rem;
        display: flex;
        align-items: center;
    }
    .list-group {
        border-radius: 0.5rem;
        overflow: hidden;
    }
    .list-group-item {
        padding: 1rem;
        background-color: var(--bg-primary);
        border-color: var(--border-primary);
    }
    .list-group-item:hover {
        background-color: var(--bg-secondary);
    }
    .contact-name {
        font-weight: 600;
        color: var(--text-primary);
    }
    .contact-position {
        color: var(--nexus-charcoal);
        font-size: 0.85rem;
    }
    .content-actions {
        gap: 0.5rem;
    }
    .note-content {
        white-space: pre-wrap;
        word-wrap: break-word;
        line-height: 1.5;
    }
    .note-preview {
        max-height: 80px;
        overflow: hidden;
        position: relative;
    }
    .note-preview.expanded {
        max-height: none;
    }
    .note-expand-btn {
        color: var(--bs-info);
        cursor: pointer;
        font-size: 0.85rem;
        text-decoration: none;
        border: none;
        background: none;
        padding: 0;
        margin-top: 0.5rem;
    }
    .note-expand-btn:hover {
        color: var(--bs-info);
        text-decoration: underline;
    }
    .note-title {
        font-weight: 600;
        color: var(--bs-white);
        margin-bottom: 0.5rem;
        font-size: 0.95rem;
    }
    .timeline-section {
        background-color: var(--nexus-card-white);
        border-radius: 0.5rem;
        padding: 1.25rem;
    }
    .timeline-container {
        border-left: 2px solid var(--bs-gray-600);
        padding-left: 1rem;
        margin-left: 0.5rem;
    }
    .timeline-item {
        position: relative;
    }
    .timeline-item::before {
        content: '';
        position: absolute;
        left: -1.625rem;
        top: 0.25rem;
        width: 8px;
        height: 8px;
        background-color: var(--bs-gray-500);
        border-radius: 50%;
        border: 2px solid var(--bs-gray-800);
    }
    .timeline-icon {
        width: 24px;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .timeline-content {
        background-color: rgba(255, 255, 255, 0.02);
        border-radius: 0.375rem;
        padding: 0.75rem;
        border: 1px solid var(--bs-gray-700);
    }
    .timeline-note, .timeline-activity {
        line-height: 1.4;
    }
    
    .tab-notes,
    .tab-activities,
    .tab-onboarding {
        border-left: none !important;
    }
    .tab-notes.active,
    .tab-activities.active,
    .tab-onboarding.active {
        color: var(--nexus-forest) !important;
        border-bottom-color: var(--nexus-forest) !important;
        background-color: transparent !important;
    }
    .tab-notes:hover,
    .tab-activities:hover,
    .tab-onboarding:hover {
        color: var(--nexus-forest) !important;
        background-color: transparent !important;
    }
    .tab-notes i,
    .tab-activities i,
    .tab-onboarding i {
        color: inherit;
    }


/* === Admin Activity Feed === */

    .activity-table {
        background-color: var(--bs-gray-900);
        border-radius: 0.5rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
        margin-bottom: 1.5rem;
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
        overflow: hidden;
    }
    .activity-table thead {
        background-color: var(--bs-gray-800);
    }
    .activity-table th {
        font-weight: 600;
        color: var(--bs-gray-300);
        padding: 0.85rem 1rem;
        border-bottom: 2px solid var(--bs-gray-700);
        text-transform: uppercase;
        font-size: 0.75rem;
        letter-spacing: 0.5px;
    }
    .activity-table td {
        padding: 0.75rem 1rem;
        border-top: 1px solid var(--bs-gray-800);
        vertical-align: middle;
        color: var(--bs-gray-300);
    }
    .activity-table tbody tr {
        transition: background-color 0.15s ease;
    }
    .activity-table tbody tr:hover {
        background-color: var(--bs-gray-800);
    }
    .activity-user {
        font-weight: 600;
        color: var(--sbbmi-green);
    }
    .activity-action {
        font-weight: 500;
        color: var(--bs-info);
        border-radius: 4px;
        display: inline-block;
    }
    .activity-related {
        color: var(--bs-success);
    }
    .activity-timestamp {
        color: var(--bs-gray-500);
        font-size: 0.85rem;
    }
    .activity-details {
        max-width: 300px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        transition: all 0.2s ease;
    }
    .activity-details:hover {
        white-space: normal;
        overflow: visible;
        background-color: var(--bs-gray-800);
        border-radius: 4px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        position: relative;
        z-index: 1;
    }
    
    .metrics-row {
        margin-bottom: 2rem;
    }
    .metric-card {
        height: 100%;
    }
    .metric-header {
        display: flex;
        align-items: center;
        margin-bottom: 1rem;
    }
    .metric-icon-wrapper {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 1rem;
    }
    .metric-icon {
        font-size: 1.5rem;
    }
    .metric-value {
        font-size: 2.5rem;
        font-weight: 700;
        margin-bottom: 0.25rem;
        color: var(--bs-white);
        line-height: 1.1;
    }
    .metric-label {
        font-size: 0.9rem;
        color: var(--bs-gray-400);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 0.5rem;
    }
    .metric-info {
        font-size: 0.8rem;
        color: var(--bs-gray-500);
        display: flex;
        align-items: center;
    }
    .metric-info i {
        margin-right: 0.25rem;
    }
    .icon-login {
        background-color: rgba(13, 202, 240, 0.15);
        color: var(--bs-info);
    }
    .icon-deals {
        background-color: rgba(25, 135, 84, 0.15);
        color: var(--bs-success);
    }
    .icon-orgs {
        background-color: rgba(90, 125, 111, 0.15);
        color: var(--sbbmi-green);
    }
    .icon-user {
        background-color: rgba(255, 193, 7, 0.15);
        color: var(--bs-warning);
    }
    .icon-personal-revenue {
        background-color: rgba(25, 135, 84, 0.15);
        color: var(--bs-success);
    }
    .icon-override-revenue {
        background-color: rgba(13, 202, 240, 0.15);
        color: var(--bs-info);
    }
    .icon-total-revenue {
        background-color: rgba(255, 193, 7, 0.15);
        color: var(--bs-warning);
    }
    
    .page-header {
        margin-bottom: 2rem;
        border-bottom: 1px solid var(--bs-gray-700);
        padding-bottom: 1rem;
    }
    .page-header .title {
        font-weight: 700;
        color: var(--bs-white);
    }
    .page-header .description {
        color: var(--bs-gray-400);
    }


/* === Admin View User === */

    :root {
        --craft-lightest: var(--nexus-natural-white);
        --craft-light: var(--nexus-natural-white);
        --craft-medium: var(--nexus-pale-sage);
        --craft-border: var(--nexus-pale-sage);
        --craft-text: #3f342d;
        --craft-border-muted: #cabbb0;
    }
    
    .profile-header {
        background-color: var(--craft-lightest);
        border-radius: 8px;
        padding: 1.5rem;
        margin-bottom: 2rem;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
        border: 1px solid var(--craft-border);
    }
    
    .profile-picture {
        width: 150px;
        height: 150px;
        object-fit: cover;
        border-radius: 50%;
        border: 4px solid var(--craft-border-muted);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    }

    .profile-picture-placeholder {
        width: 150px;
        height: 150px;
        border-radius: 50%;
        background-color: #d2c2b8;
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 64px;
        font-weight: bold;
        border: 4px solid var(--craft-border-muted);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    }

    .profile-section {
        background-color: var(--craft-lightest);
        border-radius: 8px;
        padding: 1.5rem;
        margin-bottom: 1.5rem;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
        border: 1px solid var(--craft-border);
    }

    .profile-section h4 {
        margin-bottom: 1.25rem;
        border-bottom: 1px solid var(--craft-border);
        padding-bottom: 0.75rem;
        font-weight: 600;
        color: var(--craft-text);
    }

    .profile-label {
        font-weight: 600;
        color: var(--bs-gray-500);
        font-size: 0.875rem;
    }

    .profile-value {
        font-weight: 400;
        color: var(--bs-body-color);
    }

    .badge-role {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }

    .social-link {
        display: inline-flex;
        align-items: center;
        margin-right: 1rem;
        padding: 0.5rem 1rem;
        border-radius: 50px;
        text-decoration: none;
        transition: all 0.2s;
    }

    .social-link i {
        margin-right: 0.5rem;
        font-size: 1.2rem;
    }

    .social-link.linkedin {
        background-color: var(--craft-medium);
        color: var(--craft-text);
        border: 1px solid var(--craft-border);
    }
    
    .social-link.linkedin i {
        color: #0077B5;
    }

    .social-link.twitter {
        background-color: var(--craft-medium);
        color: var(--craft-text);
        border: 1px solid var(--craft-border);
    }
    
    .social-link.twitter i {
        color: #1DA1F2;
    }
    
    .social-link:hover {
        background-color: var(--craft-border);
    }
    
    .badge-role {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
        border: 1px solid var(--craft-border-muted);
    }
    
    .admin-badge-role {
        background-color: #d2c2b8;
        color: var(--craft-text);
    }
    
    .manager-badge-role {
        background-color: #c9bbaf;
        color: var(--craft-text);
    }
    
    .agent-badge-role {
        background-color: #E8EBE4;
        color: var(--craft-text);
    }
    
    .account-manager-badge-role {
        background-color: #e0d2c6;
        color: var(--craft-text);
    }
    
    .active-badge-role {
        background-color: #c8d3c1;
        color: var(--craft-text);
    }
    
    .inactive-badge-role {
        background-color: #d9cec4;
        color: var(--craft-text);
    }


/* === Admin Edit User === */

    .edit-user-container {
        width: 100%;
        padding: 0 2rem;
    }

    .form-section {
        background-color: var(--craft-lightest);
        border: 1px solid var(--craft-border);
        border-radius: 8px;
        padding: 1.5rem;
        margin-bottom: 1.5rem;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    }

    .form-section h4 {
        margin-bottom: 1.25rem;
        border-bottom: 1px solid var(--craft-border);
        padding-bottom: 0.75rem;
        font-weight: 600;
        color: var(--craft-text);
    }

    .profile-info-grid {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 2rem;
        align-items: start;
    }

    @media (max-width: 1600px) {
        .edit-user-container {
            max-width: 90%;
        }
    }

    @media (max-width: 1200px) {
        .edit-user-container {
            max-width: 85%;
        }
    }

    @media (max-width: 992px) {
        .edit-user-container {
            max-width: 95%;
            padding: 0 1rem;
        }
    }

    @media (max-width: 768px) {
        .profile-info-grid {
            grid-template-columns: 1fr;
            gap: 1rem;
            text-align: center;
        }
        
        .edit-user-container {
            max-width: 100%;
            margin: 0;
            padding: 0;
        }
    }

    .profile-picture-preview {
        width: 150px;
        height: 150px;
        object-fit: cover;
        border-radius: 50%;
        border: 4px solid var(--craft-border-muted);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
        margin-bottom: 1rem;
    }

    .profile-picture-placeholder {
        width: 150px;
        height: 150px;
        border-radius: 50%;
        background-color: #d2c2b8;
        color: white;
        border: 4px solid var(--craft-border-muted);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 64px;
        font-weight: bold;
        margin-bottom: 1rem;
    }

    .form-label {
        font-weight: 500;
        margin-bottom: 0.5rem;
    }

    .required::after {
        content: "*";
        color: var(--bs-danger);
        margin-left: 4px;
    }
    
    .account-manager-badge {
        background-color: #e0d2c6;
        color: var(--craft-text);
        border: 1px solid var(--craft-border-muted);
        padding: 0.35rem 0.65rem;
        border-radius: 0.25rem;
        font-size: 0.875rem;
        font-weight: 500;
    }


/* === Management Dashboard Card Headers === */

.mgmt-dashboard .card .card-header {
    background-color: transparent;
    border-color: rgba(122, 146, 130, 0.2);
    color: var(--nexus-charcoal, #2D2D2D);
}

.mgmt-dashboard .card .card-header span {
    color: var(--nexus-charcoal, #2D2D2D) !important;
    font-weight: 600;
}


/* === Agency Policies Table Column Widths === */

#groupPoliciesTable td,
#policiesTable td {
    font-size: 0.85rem;
    vertical-align: middle;
}

#groupPoliciesTable th:nth-child(1),
#policiesTable th:nth-child(1) {
    min-width: 120px;
}

#groupPoliciesTable th:nth-child(2),
#policiesTable th:nth-child(2) {
    min-width: 160px;
}

#groupPoliciesTable th:nth-child(3),
#policiesTable th:nth-child(3) {
    min-width: 110px;
}

#groupPoliciesTable th:nth-child(4),
#policiesTable th:nth-child(4) {
    min-width: 140px;
}

#groupPoliciesTable th:nth-child(6),
#policiesTable th:nth-child(6) {
    min-width: 100px;
}

#groupPoliciesTable th:nth-child(8),
#groupPoliciesTable th:nth-child(9),
#policiesTable th:nth-child(8),
#policiesTable th:nth-child(9) {
    min-width: 110px;
}

#groupPoliciesTable th:nth-child(10),
#groupPoliciesTable th:nth-child(11),
#groupPoliciesTable th:nth-child(12),
#policiesTable th:nth-child(10),
#policiesTable th:nth-child(11),
#policiesTable th:nth-child(12) {
    min-width: 120px;
}

/* ===== Nexus Clean Table Style ===== */
.nexus-table {
    border-collapse: collapse !important;
    background-color: transparent !important;
}
.nexus-table > :not(caption) > * > * {
    box-shadow: none !important;
    background-color: inherit !important;
    --bs-table-bg-type: transparent !important;
    --bs-table-bg-state: transparent !important;
    --bs-table-accent-bg: transparent !important;
}
.nexus-table thead th {
    border-top: none !important;
    padding: 0.75rem 0.5rem !important;
    font-weight: 600 !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: var(--nexus-sage) !important;
    background-color: rgba(232, 235, 228, 0.35) !important;
    border-bottom: 1px solid rgba(122, 146, 130, 0.2) !important;
}
.nexus-table thead th *,
.nexus-table thead th a,
.nexus-table thead th i {
    color: var(--nexus-sage) !important;
    font-size: inherit !important;
}

.deal-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.deal-status-pill i {
    font-size: 0.65rem;
}
.deal-status-active {
    background-color: rgba(122, 146, 130, 0.12);
    color: var(--nexus-forest);
    border: 1px solid rgba(122, 146, 130, 0.25);
}
.deal-status-implementation {
    background-color: rgba(31, 61, 46, 0.1);
    color: var(--nexus-forest);
    border: 1px solid rgba(31, 61, 46, 0.25);
}
.deal-status-won {
    background-color: rgba(25, 135, 84, 0.1);
    color: #198754;
    border: 1px solid rgba(25, 135, 84, 0.25);
}
.deal-status-lost {
    background-color: rgba(220, 53, 69, 0.08);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}
.deal-action-btn {
    padding: 0.35rem 0.85rem !important;
    font-size: 0.8rem !important;
    font-weight: 500;
    border-radius: var(--radius-sm);
}
.deal-action-lost {
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.35);
    background: transparent;
}
.deal-action-lost:hover {
    background-color: rgba(220, 53, 69, 0.08);
    color: #dc3545;
}
.deal-action-edit {
    color: var(--nexus-charcoal);
    border: 1px solid rgba(45, 45, 45, 0.25);
    background: transparent;
}
.deal-action-edit:hover {
    background-color: rgba(45, 45, 45, 0.06);
}
.deal-action-close-impl {
    color: var(--nexus-forest);
    border: 1px solid rgba(31, 61, 46, 0.3);
    background: transparent;
}
.deal-action-close-impl:hover {
    background-color: rgba(31, 61, 46, 0.08);
    color: var(--nexus-forest);
}
.nexus-table thead th::before,
.nexus-table thead th::after {
    content: none !important;
    display: none !important;
}

.nexus-section-header {
    background-color: #ffffff !important;
    border-color: rgba(122, 146, 130, 0.15) !important;
    border-bottom: 1px solid rgba(122, 146, 130, 0.2) !important;
    color: var(--nexus-charcoal) !important;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
}
.nexus-section-header *,
.nexus-section-header h5,
.nexus-section-header h6,
.nexus-section-header .mb-0 {
    color: var(--nexus-charcoal) !important;
}
.nexus-section-header .text-muted {
    color: var(--nexus-sage) !important;
}
.nexus-section-header .btn-outline-secondary {
    color: var(--nexus-charcoal) !important;
    border-color: rgba(45, 45, 45, 0.3) !important;
}
.nexus-section-header .btn-outline-secondary:hover,
.nexus-section-header .btn-outline-secondary.active {
    background-color: rgba(45, 45, 45, 0.1) !important;
}
.nexus-section-header .collapse-indicator {
    color: var(--nexus-charcoal) !important;
    font-size: 0.85rem;
}
.nexus-section-header .claude-badge,
.nexus-section-header .claude-badge-info {
    color: var(--nexus-charcoal) !important;
}
.nexus-table tbody tr {
    background-color: var(--nexus-card-white) !important;
}
.nexus-table tbody tr:nth-of-type(even) {
    background-color: rgba(232, 235, 228, 0.4) !important;
}
.nexus-table tbody tr:hover {
    background-color: #f0f0ee !important;
}
.nexus-table tbody td {
    padding: 0.6rem 0.5rem !important;
    border-top: none !important;
    border-bottom: 1px solid rgba(232, 235, 228, 0.6) !important;
    vertical-align: middle !important;
}

/* Policy status badge - readable green for ACTIVE */
.policy-status-active {
    background-color: #e6f4ea;
    color: #1a6b3c;
    font-weight: 600;
}

/* Policy Detail - sidebar action buttons */
.policy-action-btn {
    text-align: left;
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 500;
    background: rgba(232, 235, 228, 0.35);
    border: none;
    border-radius: var(--radius-xs, 3px);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: background 0.12s ease;
}
.policy-action-btn:hover {
    background: var(--nexus-pale-sage, #E8EBE4);
}
.policy-action-btn i {
    width: 1rem;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.8;
}
[data-bs-theme="dark"] .policy-status-active {
    background-color: #1a3d2a;
    color: #8fd4a4;
}
[data-bs-theme="dark"] .policy-action-btn {
    background: rgba(255, 255, 255, 0.06);
}

/* === Dark Mode Overrides for Page-Specific Components === */

[data-bs-theme="dark"] .admin-badge-role,
[data-bs-theme="dark"] .manager-badge-role,
[data-bs-theme="dark"] .account-manager-badge-role {
    background-color: #3a2e28;
    color: #d4c2b8;
}

[data-bs-theme="dark"] .agent-badge-role {
    background-color: #2a3a33;
    color: #c8d4cc;
}

[data-bs-theme="dark"] .active-badge-role {
    background-color: #1e3028;
    color: #a8c8a8;
}

[data-bs-theme="dark"] .craft-card {
    background-color: var(--bg-primary, #1e2a24) !important;
    border-color: var(--border-primary, #2d3a33) !important;
}

[data-bs-theme="dark"] .craft-card-header,
[data-bs-theme="dark"] .craft-card .card-header {
    background-color: var(--bg-tertiary, #141817) !important;
    border-color: var(--border-primary, #2d3a33) !important;
    color: var(--text-primary, #FAFAF8) !important;
}


/* ============================================================
   Utility Classes — Extracted from inline styles
   ============================================================ */

/* --- Brand Color Text --- */
.text-forest { color: var(--nexus-forest, #1F3D2E) !important; }
.text-sage { color: var(--nexus-sage, #6B8F71) !important; }
.text-rust { color: var(--nexus-rust, #C45D3E) !important; }
.text-charcoal { color: var(--nexus-charcoal, #2C2C2C) !important; }

/* --- Border-Left Accents --- */
.border-left-forest { border-left: 3px solid var(--nexus-forest) !important; }
.border-left-sage { border-left: 3px solid var(--nexus-sage) !important; }
.border-left-rust { border-left: 3px solid var(--nexus-rust) !important; }
.border-left-charcoal { border-left: 3px solid var(--nexus-charcoal) !important; }
.border-bottom-pale { border-bottom: 1px solid var(--nexus-pale-sage); }

/* --- Font Sizes --- */
.text-hero { font-size: 3rem; }
.text-label-xs { font-size: 0.7rem; letter-spacing: 0.5px; }
.text-label-white { font-size: 0.85rem; letter-spacing: 0.3px; color: #ffffff; }
.text-sm-app { font-size: 0.9rem; }
.text-xs-app { font-size: 0.8rem; }
.text-2xs { font-size: 0.75rem; }

/* --- Layout Utilities --- */
.cursor-pointer { cursor: pointer; }
.grid-stat-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0 3px;
    align-items: center;
    margin-bottom: 1px;
}

/* --- Card / Container --- */
.card-nexus {
    background: var(--nexus-card-white, #FEFDFB);
    border: 1px solid rgba(31, 61, 46, 0.12);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.bg-card { background-color: var(--nexus-card-white, #FEFDFB); }

/* --- Section Labels --- */
.section-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--nexus-charcoal);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.section-label-sage {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--nexus-sage);
    font-weight: 600;
}

/* --- Badges --- */
.badge-compact { font-size: 0.75rem; padding: 0.2rem 0.6rem; }
.badge-sm { font-size: 0.75rem; padding: 0.25rem 0.5rem; }

/* --- Callout --- */
.callout-sage {
    color: var(--nexus-forest);
    border-left: 3px solid var(--nexus-sage);
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
}

/* --- Flex Helpers --- */
.flex-between-baseline {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
}

/* --- Icon Sizes --- */
.icon-sm { width: 0.875rem; height: 0.875rem; }
