body {
    font-family: "Inter", sans-serif;
    background-color: #000000;
    padding-top: 4.5rem;
    font-size: 0.95rem;
    color: #fff;
}

.card {
    background-color: #111111;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.4);
    border-radius: 20px;
    margin-bottom: 2rem;
}

.table-hover tbody tr:hover {
    background-color: rgba(255,255,255,0.05);
}

table {
    color: #e0e0e0;
}

.btn-primary {
    --bs-btn-bg: #ffffff;
    --bs-btn-border-color: #ffffff;
    --bs-btn-color: #000000;
    --bs-btn-hover-bg: #e0e0e0;
    --bs-btn-hover-border-color: #e0e0e0;
    --bs-btn-hover-color: #000000;
    --bs-btn-active-bg: #cccccc;
    --bs-btn-active-border-color: #cccccc;
    --bs-btn-active-color: #000000;
    font-weight: 600;
}

.navbar {
    background-color: #000000 !important;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.15rem;
}

/* Form improvements */
.form-control, .form-select {
    background-color: #111111;
    border-color: rgba(255,255,255,0.15);
    color: #e0e0e0;
}

.form-control:focus, .form-select:focus {
    background-color: #111111;
    border-color: #ffffff;
    color: #e0e0e0;
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.15);
}

.form-label {
    color: #e0e0e0;
    margin-bottom: 0.5rem;
}

/* Card improvements */
.card-header {
    background-color: #0a0a0a;
    border-bottom-color: rgba(255,255,255,0.1);
    border-radius: 20px 20px 0 0 !important;
}

/* Progress bar improvements */
.progress {
    background-color: #1a1a1a;
}

/* Mobile tweaks */
@media (max-width: 576px) {
    h1, h2, h3 {
        font-size: 1.25rem;
    }
    .btn {
        font-size: 0.9rem;
        padding: 0.5rem 0.9rem;
    }
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .card-body {
        padding: 1rem;
    }
    .card-header {
        padding: 0.75rem 1rem;
    }
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* Tablet tweaks */
@media (min-width: 577px) and (max-width: 768px) {
    .card-body {
        padding: 1.25rem;
    }
}

/* Flatpickr mobile-friendly styles */
.datetimepicker {
    cursor: pointer;
    touch-action: manipulation;
}

/* =====================================================
   Recipient List Selection Cards - Mobile-Friendly
   ===================================================== */
.recipient-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
    max-height: 350px;
    overflow-y: auto;
    padding: 0.5rem;
    background-color: #0a0a0a;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0.5rem;
}

.recipient-list-card {
    background-color: #111111;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 0.75rem;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 60px;
    display: flex;
    align-items: center;
}

.recipient-list-card:hover {
    background-color: #1a1a1a;
    border-color: rgba(255,255,255,0.2);
}

.recipient-list-card:active {
    transform: scale(0.98);
    background-color: #1a1a1a;
}

.recipient-list-card.selected {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
}

.recipient-list-card.selected:hover {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: #ffffff;
}

.recipient-list-card-content {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 0.75rem;
}

.recipient-list-check-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 1.1rem;
}

.recipient-list-check-icon i {
    opacity: 0;
    color: #000000;
    transition: opacity 0.2s ease;
}

.recipient-list-card.selected .recipient-list-check-icon {
    background-color: #ffffff;
}

.recipient-list-card.selected .recipient-list-check-icon i {
    opacity: 1;
}

.recipient-list-info {
    flex: 1;
    overflow: hidden;
}

.recipient-list-name {
    display: block;
    font-weight: 500;
    color: #e0e0e0;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recipient-list-card.selected .recipient-list-name {
    color: #ffffff;
}

/* Mobile optimizations for recipient list */
@media (max-width: 576px) {
    .recipient-list-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        max-height: 300px;
        padding: 0.375rem;
    }
    
    .recipient-list-card {
        padding: 0.875rem 1rem;
        min-height: 56px;
        border-radius: 0.625rem;
    }
    
    .recipient-list-check-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 1.25rem;
    }
    
    .recipient-list-name {
        font-size: 1rem;
    }
}

/* Tablet optimizations */
@media (min-width: 577px) and (max-width: 768px) {
    .recipient-list-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile-specific flatpickr calendar styles */
@media (max-width: 768px) {
    .datetimepicker {
        font-size: 16px !important; /* Prevents zoom on iOS when focused */
    }
    
    .flatpickr-calendar {
        font-size: 16px !important; /* Prevents zoom on iOS */
        max-width: calc(100vw - 2rem);
        width: auto !important;
    }
    
    .flatpickr-months {
        padding: 0.75rem;
    }
    
    .flatpickr-weekdays {
        padding: 0.5rem 0;
    }
    
    .flatpickr-day {
        height: 2.5rem;
        line-height: 2.5rem;
        font-size: 0.95rem;
        min-width: 2.5rem;
        margin: 0.15rem;
    }
    
    .flatpickr-time {
        padding: 0.5rem;
    }
    
    .flatpickr-time input {
        font-size: 16px !important; /* Prevents zoom on iOS */
        height: 2.5rem;
        min-width: 3rem;
    }
    
    /* Make calendar buttons larger for touch */
    .flatpickr-prev-month,
    .flatpickr-next-month {
        padding: 0.75rem;
        height: 2.5rem;
        width: 2.5rem;
        min-width: 2.5rem;
    }
    
    /* Ensure calendar has high z-index and is visible */
    .flatpickr-calendar.open {
        z-index: 9999 !important;
    }
    
    /* When appended to body, center it on mobile view */
    body > .flatpickr-calendar.open {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%);
        max-height: 90vh;
        overflow-y: auto;
        box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.8);
    }
    
    /* Ensure calendar is clickable and visible */
    .flatpickr-calendar.open .flatpickr-day,
    .flatpickr-calendar.open .flatpickr-time input {
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(13, 110, 253, 0.3);
    }
}
