/* ============================================
   CUSTOM DASHBOARD CSS - BLACK & WHITE THEME WITH STATUS COLORS
   Save this as: /static/css/custom-styles.css
   ============================================ */

/* Font: Inter (closest to Helvetica Now Display aesthetic) - loaded via HTML link tags for better performance */

/* CSS Variables */
:root {
    --sidebar-width: 280px;
    --header-height: 60px;
    --border-color: #e5e5e5;
    --bg-hover: #f8f8f8;
    --bg-light: #fafafa;
    --text-primary: #000;
    --text-secondary: #333;  /* Darkened for better readability */
    --text-muted: #666;      /* Darkened for better readability */
    --border-radius: 6px;

    /* Status Colors */
    --status-active: #22c55e;      /* Green */
    --status-paused: #f59e0b;      /* Orange */
    --status-completed: #3b82f6;   /* Blue */
    --status-failed: #ef4444;      /* Red */
    --status-needs-human: #a855f7; /* Purple */
    --status-negotiating: #06b6d4; /* Cyan */
}

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Helvetica Neue', 'Helvetica', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: #fff;
    color: var(--text-primary);
    font-size: 16px;  /* Increased from 14px */
    line-height: 1.7;  /* Increased from 1.6 */
}

/* Remove all Bootstrap gradients and colors */
body, .navbar, .navbar-custom, .dashboard-card, .stats-card,
.btn-primary-custom, .mode-icon, .logo-icon, .reset-icon,
.status-badge-large, .metric-card, .campaign-header,
.conversation-header, .message-thread, .ai-analysis,
.action-panel, .form-card, .info-card, .bg-gradient,
.progress-bar, {
    background: #fff !important;
    background-image: none !important;
}

/* Remove animations */
@keyframes pulse { }
@keyframes float { }
@keyframes rotate { }
@keyframes slideUp { }
.bg-shape { display: none !important; }

/* Layout Structure */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: #fff;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease, width 0.3s ease;
}

/* Desktop collapsed sidebar */
.sidebar.collapsed {
    width: 60px !important;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-header {
    padding: 15px 10px;
}

.sidebar.collapsed .sidebar-brand img {
    display: none;
}

.sidebar.collapsed .sidebar-subtitle {
    display: none;
}

.sidebar.collapsed .nav-label {
    display: none;
}

.sidebar.collapsed .nav-item span {
    display: none;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 12px 10px;
}

.sidebar.collapsed .nav-item i {
    margin-right: 0;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.sidebar-toggle-btn {
    background: transparent !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
    padding: 6px 8px !important;
    border-radius: 4px !important;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
    background: var(--bg-hover) !important;
    border-color: var(--text-primary) !important;
    color: var(--text-primary) !important;
}

.sidebar.collapsed .sidebar-toggle-btn {
    margin: 0 auto;
}

.sidebar.collapsed .sidebar-header-content {
    justify-content: center;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 18px;  /* Increased from 16px */
}

.sidebar-brand:hover {
    color: var(--text-primary);
    text-decoration: none;
}

.sidebar-brand i {
    font-size: 24px;  /* Increased from 20px */
}

.sidebar-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    margin: 8px 0 0 0;
    padding: 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: 10px 0;
}

.nav-section {
    margin-bottom: 20px;
}

.nav-label {
    padding: 10px 20px 5px;
    font-size: 12px;  /* Increased from 11px */
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;  /* Increased padding */
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
    font-size: 15px;  /* Increased size */
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    text-decoration: none;
}

.nav-item.active {
    background: var(--bg-hover);
    color: var(--text-primary);
    font-weight: 600;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #000;
}

.nav-item i {
    font-size: 18px;  /* Increased from 16px */
    width: 20px;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    background: var(--bg-light);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.main-content.sidebar-collapsed {
    margin-left: 60px !important;
}

/* Header */
.main-header {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 0 30px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-title {
    font-size: 24px;  /* Increased from 20px */
    font-weight: 600;
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* Content Area */
.content-area {
    padding: 30px;
}

/* Override existing container styles */
.container, .container-main {
    max-width: 100%;
    padding: 0;
    margin: 0;
}

/* Cards */
.dashboard-card, .form-card, .campaign-header,
.conversation-header, .message-thread, .ai-analysis,
.action-panel, .stats-card, .metric-card, .welcome-section,
.mode-card, .ai-campaign-card, .email-account-card,
.conversation-card, .ai-insights-card {
    background: #fff !important;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Improved readability for card content */
.dashboard-card p, .dashboard-card li,
.form-card p, .form-card li {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.dashboard-card h4, .dashboard-card h5, .dashboard-card h6 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 15px;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    text-align: left;
}

.stat-value, .metric-value, .stats-card h3 {
    font-size: 36px;  /* Increased from 32px */
    font-weight: 600;
    line-height: 1;
    margin-bottom: 8px;
    color: var(--text-primary) !important;
    background: none !important;
    -webkit-text-fill-color: var(--text-primary) !important;
}

.stat-label, .metric-label, .stats-card p {
    color: var(--text-secondary);
    font-size: 14px;  /* Increased from 13px */
    margin: 0;
    opacity: 1;
}

/* Mode Selection Cards */
.mode-grid, .mode-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.mode-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    cursor: pointer;
}

.mode-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.mode-icon {
    width: 50px;
    height: 50px;
    background: #000 !important;
    color: #fff !important;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 24px;
    animation: none !important;
}

.mode-title {
    font-size: 20px;  /* Increased from 18px */
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
    text-align: center;
}

.mode-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
    text-align: center;
    font-size: 15px;  /* Added explicit size */
}

.mode-features {
    list-style: none;
    padding: 0;
}

.mode-features li {
    padding: 8px 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;  /* Added explicit size */
}

.mode-features i {
    color: #000;
    font-size: 14px;  /* Increased from 12px */
}

/* Tables */
.table, .custom-table table, .conversations-table,
.campaign-table {
    width: 100%;
    background: #fff;
    border-collapse: collapse;
}

.custom-table, .table-responsive {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.custom-table thead, .table thead,
.conversations-table thead, .campaign-table thead {
    background: var(--bg-light) !important;
    border-bottom: 1px solid var(--border-color);
}

.custom-table th, .table th {
    padding: 12px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;  /* Increased from 12px */
    text-transform: uppercase;
    color: var(--text-secondary) !important;
    letter-spacing: 0.5px;
    border: none !important;
}

.custom-table td, .table td {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0 !important;
    border-top: none !important;
    color: var(--text-primary);
    vertical-align: middle;
    font-size: 15px;  /* Added explicit size */
}

.table tbody tr:hover, .custom-table tbody tr:hover {
    background: var(--bg-hover);
}

/* Buttons */
.btn {
    border-radius: var(--border-radius) !important;
    font-weight: 500;
    transition: all 0.2s;
    padding: 10px 18px;  /* Increased padding */
    font-size: 15px;  /* Increased from 14px */
}

.btn-primary, .btn-primary-custom,
.btn-login, .btn-signup, .btn-reset,
.btn-select-mode, .btn-action.btn-success {
    background: #000 !important;
    color: #fff !important;
    border: 1px solid #000 !important;
}

.btn-primary:hover, .btn-primary-custom:hover,
.btn-login:hover, .btn-signup:hover, .btn-reset:hover {
    background: #333 !important;
    border-color: #333 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-secondary, .btn-light, .btn-outline-light,
.btn-secondary-custom, .btn-view, .btn-action {
    background: #fff !important;
    color: #000 !important;
    border: 1px solid var(--border-color) !important;
}

.btn-secondary:hover, .btn-light:hover,
.btn-view:hover, .btn-action:hover {
    background: var(--bg-hover) !important;
    border-color: #000 !important;
}

.btn-warning, .btn-pause {
    background: #fff !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-color) !important;
}

.btn-danger, .btn-danger-custom {
    background: #fff !important;
    color: #d32f2f !important;
    border: 1px solid #d32f2f !important;
}

.btn-sm {
    padding: 8px 14px;  /* Increased padding */
    font-size: 14px;  /* Increased from 13px */
}

/* Status Badges with Colors */
.status-badge, .conversation-status,
.status-badge-large, .badge {
    padding: 6px 12px;
    border-radius: 20px !important;  /* More rounded for modern look */
    font-size: 13px;  /* Increased from 12px */
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-transform: capitalize;
}

/* Status-specific colors */
.status-badge.status-active,
.conversation-status.active,
.status-active {
    background: var(--status-active) !important;
    color: #fff !important;
    border: 1px solid var(--status-active);
}

.status-badge.status-paused,
.conversation-status.paused,
.status-paused {
    background: var(--status-paused) !important;
    color: #fff !important;
    border: 1px solid var(--status-paused);
}

.status-badge.status-completed,
.conversation-status.completed,
.status-completed {
    background: var(--status-completed) !important;
    color: #fff !important;
    border: 1px solid var(--status-completed);
}

.status-badge.status-failed,
.conversation-status.failed,
.status-failed {
    background: var(--status-failed) !important;
    color: #fff !important;
    border: 1px solid var(--status-failed);
}

.status-badge.status-needs_human,
.status-badge.status-needs-human,
.conversation-status.needs_human,
.status-needs_human {
    background: var(--status-needs-human) !important;
    color: #fff !important;
    border: 1px solid var(--status-needs-human);
}

.status-badge.status-negotiating,
.conversation-status.negotiating,
.status-negotiating {
    background: var(--status-negotiating) !important;
    color: #fff !important;
    border: 1px solid var(--status-negotiating);
}

/* Email Outreach Specific Statuses */
.status-badge.status-initial_sent,
.conversation-status.initial_sent,
.status-initial_sent {
    background: #6c757d !important;  /* Gray - email sent, waiting */
    color: #fff !important;
    border: 1px solid #6c757d;
}

.status-badge.status-replied,
.conversation-status.replied,
.status-replied {
    background: #0dcaf0 !important;  /* Cyan - prospect replied */
    color: #000 !important;
    border: 1px solid #0dcaf0;
}

.status-badge.status-qualified,
.conversation-status.qualified,
.status-qualified {
    background: #198754 !important;  /* Green - qualified lead */
    color: #fff !important;
    border: 1px solid #198754;
}

.status-badge.status-auto_reply_received,
.conversation-status.auto_reply_received,
.status-auto_reply_received {
    background: #adb5bd !important;  /* Light gray - auto-reply */
    color: #000 !important;
    border: 1px solid #adb5bd;
}

.status-badge.status-bounced,
.conversation-status.bounced,
.status-bounced {
    background: #dc3545 !important;  /* Red - bounced */
    color: #fff !important;
    border: 1px solid #dc3545;
}

.status-badge.status-scheduled,
.conversation-status.scheduled,
.status-scheduled {
    background: #ffc107 !important;  /* Yellow - scheduled to send */
    color: #000 !important;
    border: 1px solid #ffc107;
}

.status-badge.status-pending,
.conversation-status.pending,
.status-pending {
    background: #fd7e14 !important;  /* Orange - pending processing */
    color: #fff !important;
    border: 1px solid #fd7e14;
}

.status-badge.status-processing,
.conversation-status.processing,
.status-processing {
    background: #0d6efd !important;  /* Blue - currently processing */
    color: #fff !important;
    border: 1px solid #0d6efd;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Default badge styles */
.badge-dark {
    background: #000 !important;
    color: #fff !important;
    border: 1px solid #000;
}

.badge-gray, .badge-secondary {
    background: #f0f0f0 !important;
    color: #333 !important;
    border: 1px solid var(--border-color);
}

/* Forms */
.form-control, .form-select, textarea, input[type="text"],
input[type="email"], input[type="password"], input[type="number"],
input[type="tel"], input[type="url"], input[type="search"] {
    background: #fff !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--border-radius) !important;
    padding: 12px 15px;  /* Increased padding */
    color: var(--text-primary);
    transition: all 0.2s;
    font-size: 15px;  /* Increased font size */
}

.form-control:focus, .form-select:focus,
textarea:focus, input[type="text"]:focus,
input[type="email"]:focus, input[type="password"]:focus {
    border-color: #000 !important;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.1) !important;
    outline: none;
}

/* Checkboxes and Radio buttons */
.form-check-input, input[type="checkbox"], input[type="radio"] {
    width: 20px !important;  /* Increased from 18px */
    height: 20px !important;  /* Increased from 18px */
    margin-top: 2px !important;
    margin-right: 10px !important;  /* Increased spacing */
    border: 2px solid var(--border-color) !important;
    background: #fff !important;
    cursor: pointer;
    flex-shrink: 0;
}

.form-check-input:checked, input[type="checkbox"]:checked, input[type="radio"]:checked {
    background-color: #000 !important;
    border-color: #000 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e") !important;
}

.form-check-input:focus, input[type="checkbox"]:focus, input[type="radio"]:focus {
    border-color: #000 !important;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.1) !important;
}

.form-check {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;  /* Increased spacing */
}

.form-check-label {
    margin-left: 5px;
    cursor: pointer;
    line-height: 1.6;
    font-size: 15px;  /* Added explicit size */
}

.form-label {
    color: var(--text-primary);
    font-weight: 600;  /* Increased from 500 */
    margin-bottom: 8px;
    font-size: 15px;  /* Added explicit size */
}

/* Alerts and Info Cards */
.alert, .info-card, .info-box {
    background: var(--bg-light) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--border-radius) !important;
    padding: 18px;  /* Increased padding */
    color: var(--text-primary) !important;
    font-size: 15px;  /* Added explicit size */
}

.alert-warning {
    border-left: 4px solid var(--status-paused) !important;
    background: #fef3c7 !important;
}

.alert-success {
    border-left: 4px solid var(--status-active) !important;
    background: #d1fae5 !important;
}

.alert-danger {
    border-left: 4px solid var(--status-failed) !important;
    background: #fee2e2 !important;
}

.alert-info {
    border-left: 4px solid var(--status-completed) !important;
    background: #dbeafe !important;
}

/* Hide old navbar */
.navbar, .navbar-custom {
    display: none !important;
}

/* Small text should still be readable */
small, .small {
    font-size: 14px !important;  /* Increased from default */
    color: var(--text-secondary) !important;
}

.text-muted {
    color: var(--text-muted) !important;
    font-size: 15px;  /* Ensure readable size */
}

/* Campaign Configuration and other info sections */
.border.rounded.p-3,
.border.rounded.p-2 {
    background: #fff !important;
    border: 1px solid var(--border-color) !important;
}

.border.rounded.p-3 h6,
.border.rounded.p-2 strong {
    color: var(--text-primary) !important;
    font-weight: 600 !important;
    font-size: 16px !important;
}

.border.rounded.p-3 p,
.border.rounded.p-2 small {
    color: var(--text-secondary) !important;
    font-size: 15px !important;
    line-height: 1.7 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
        z-index: 1050;
        position: fixed;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0 !important;
        width: 100%;
    }

    /* Mobile header adjustments - Sticky header for mobile */
    .main-header {
        padding: 10px 10px 10px 65px !important; /* More space for hamburger menu */
        position: sticky !important;
        top: 0 !important;
        z-index: 1049 !important; /* Below sidebar but above content */
        flex-direction: row;
        align-items: center;
        justify-content: space-between; /* Space between title and buttons */
        min-height: 50px !important;
        gap: 10px;
        overflow: hidden;
        background: #fff !important; /* Ensure solid background when sticky */
        box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important; /* Add shadow when sticky */
    }

    .page-title {
        font-size: 14px !important;
        margin: 0;
        flex: 1; /* Take available space */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 120px; /* Ensure minimum readability */
        line-height: 1.2;
        font-weight: 600;
        padding-right: 10px; /* Space from buttons */
    }

    .header-actions {
        display: flex;
        gap: 4px;
        flex-shrink: 0;
        align-items: center;
    }

    /* Ultra compact buttons - icons only */
    .header-actions .btn {
        padding: 4px 6px !important;
        font-size: 16px !important; /* Larger icons */
        min-width: 32px;
        border-radius: 4px;
    }

    .header-actions .btn span {
        display: none !important; /* Always hide text on mobile */
    }

    .header-actions .alert {
        display: none !important; /* Hide all alerts on mobile */
    }

    /* Show mobile-only elements */
    .header-actions .d-md-none {
        display: flex !important;
    }

    .mode-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .content-area {
        padding: 15px;
    }

    /* Mobile hamburger menu positioning - Always on top */
    .mobile-menu-toggle {
        position: fixed !important;
        top: 15px !important;
        left: 15px !important;
        z-index: 1052 !important; /* Higher than sidebar and header */
        background: #000 !important;
        color: #fff !important;
        border: none !important;
        border-radius: 4px !important;
        padding: 8px 12px !important;
        font-size: 18px !important;
        transition: opacity 0.3s ease;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important; /* Add shadow for visibility */
    }


    /* Overlay when sidebar is open */
    .sidebar.active::after {
        content: '';
        position: fixed;
        top: 0;
        left: var(--sidebar-width);
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: -1;
    }

    /* Slightly smaller text on mobile for space efficiency */
    body {
        font-size: 15px;
    }

    .btn {
        font-size: 14px;
    }

    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
    }

    .app-wrapper {
        overflow-x: hidden;
    }
}

/* Extra Small Devices - Additional mobile fixes */
@media (max-width: 480px) {
    .main-header {
        padding: 8px 8px 8px 55px !important; /* More space for hamburger */
        min-height: 45px !important;
        position: sticky !important; /* Ensure sticky on small devices too */
        top: 0 !important;
        z-index: 1049 !important;
        background: #fff !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    }

    .page-title {
        font-size: 12px !important;
        min-width: 100px;
        font-weight: 700; /* Bolder to maintain readability */
        padding-right: 8px;
    }

    .header-actions {
        gap: 2px;
    }

    .header-actions .btn {
        padding: 3px 5px !important;
        font-size: 14px !important;
        min-width: 28px;
    }

    .mobile-menu-toggle {
        padding: 5px 8px !important;
        font-size: 14px !important;
        z-index: 1052 !important; /* Ensure it stays on top */
        box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
    }
}


/* Utility overrides */
.text-muted {
    color: var(--text-muted) !important;
}

.text-primary {
    color: var(--text-primary) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.text-danger {
    color: var(--status-failed) !important;
}

.text-success {
    color: var(--status-active) !important;
}

.text-warning {
    color: var(--status-paused) !important;
}

.text-info {
    color: var(--status-completed) !important;
}

.bg-light {
    background: var(--bg-light) !important;
}

.bg-white {
    background: #fff !important;
}

/* Fix Bootstrap Icons display */
.bi, [class^="bi-"], [class*=" bi-"] {
    display: inline-block !important;
    vertical-align: middle !important;
}

.keyword-badge {
    display: inline-block;
    padding: 0.5em 0.75em;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 20px;
    background-color: #343a40 !important;
    color: #ffffff !important;
    cursor: pointer;
    transition: background-color 0.2s;
}

.keyword-badge:hover {
    background-color: #495057 !important;
}

/* Ensure proper checkbox alignment in forms */
.form-check {
    padding-left: 0 !important;
}

.form-check-input {
    float: none !important;
    margin-left: 0 !important;
}

/* Fix for inline forms */
input[type="checkbox"] + label,
input[type="radio"] + label {
    display: inline-block;
    margin-left: 5px;
}

/* Remove all box shadows except subtle ones */
.shadow, .shadow-sm, .shadow-lg {
    box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
}

/* Improve link visibility */
a {
    color: var(--status-completed);
    text-decoration: none;
}

a:hover {
    color: var(--status-negotiating);
    text-decoration: underline;
}

/* Make sure all headings are properly sized */
h1 { font-size: 32px !important; }
h2 { font-size: 28px !important; }
h3 { font-size: 24px !important; }
h4 { font-size: 20px !important; }
h5 { font-size: 18px !important; }
h6 { font-size: 16px !important; }

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary) !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
}