
/* Login Page */
.login-wrapper {
  background: linear-gradient(135deg, #667eea, #764ba2);
}

/* logo */ 

.logo img{
    width: 70%;
}
.logo-mini img{
    width: 40px;
}

.left-panel {
    width: 220px;
}

.content{
    padding: 25px 30px 30px;
}
/* rows centered on lg */

@media only screen and (min-width: 768px) {
    .centered-lg{
        width: 600px;
    }
}

/* dashboard */ 

.stat-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 15px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
}

.stat-icon.customers { background: linear-gradient(135deg, #667eea, #764ba2);}
.stat-icon.invoices { background: linear-gradient(135deg, #43e97b, #38f9d7);}
.stat-icon.payments { background: linear-gradient(135deg, #4facfe, #00f2fe);}
.stat-icon.reports { background: linear-gradient(135deg, #f093fb, #f5576c)}

/* custom btn */ 

.btn-primary-custom {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.btn-success-custom {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
}


.action-btn{
    color: white;
    padding: 5px 8px;
    margin: 2px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-edit {
    background: #17a2b8;
}

.btn-cancel {
    background: #dc3545;  
}

.btn-preview {
    background: #667eea;
}

.btn-receipt {
    background: #28a745;
}

/* Alert Auto-Dismiss Progress Bars */

.alert-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #0dcaf0, #0a9ec7);
    width: 100%;
    animation: progressShrink 5s linear forwards;
}

@keyframes progressShrink {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

.alert-progress-bar-danger {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #dc3545, #b02a37);
    width: 100%;
    animation: progressShrink 5s linear forwards;
}

/* Sortable Table Styles */

.sortable-header {
    user-select: none;
    position: relative;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.sortable-header:hover {
    background-color: #e9ecef;
}

.sortable-header.active-sort {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    font-weight: 600;
    color: #667eea;
}

.sort-indicator {
    display: inline-block;
    margin-left: 5px;
    opacity: 0.3;
    transition: all 0.3s ease;
    font-size: 0.8em;
}

.sortable-header:hover .sort-indicator {
    opacity: 0.6;
}

.sortable-header.active-sort .sort-indicator {
    opacity: 1;
    color: #667eea;
}

/* No Data Found Message */

.no-data-found {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.no-data-found .py-5 {
    padding: 3rem 1rem !important;
}

.no-data-found i {
    opacity: 0.3;
    animation: fadeInOut 2s infinite ease-in-out;
}

.no-data-found h5 {
    font-weight: 600;
    margin-top: 1rem;
}

.no-data-found p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
}

/* Select2 Dropdown Customization - Floating Label Style */

.select2-floating-wrapper {
    position: relative;
}

.select2-floating-wrapper .select2-container {
    width: 100% !important;
}

.select2-floating-wrapper .select2-container--default .select2-selection--single {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    height: calc(3.5rem + 2px);
    padding: 1rem 0.75rem;
    background: white;
    transition: all 0.3s ease;
}

.select2-floating-wrapper .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 1.5;
    color: #495057;
    padding: 0;
    font-size: 1rem;
}

/* Style placeholder to match floating label */
.select2-floating-wrapper .select2-container--default .select2-selection--single .select2-selection__placeholder {
    display: none;
}


.select2-container--default .select2-selection--single .select2-selection__arrow {
    padding-top: 8%;
}

/* Customer Autocomplete Suggestions */
.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #667eea;
    border-top: none;
    border-radius: 0 0 10px 10px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-top: -2px;
}

.autocomplete-suggestions.active {
    display: block;
}

.suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
    color: #495057;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.selected {
    background-color: #667eea;
    color: white;
}

.suggestion-id {
    font-weight: 600;
    color: #667eea;
    margin-right: 8px;
}

.suggestion-item:hover .suggestion-id,
.suggestion-item.selected .suggestion-id {
    color: white;
}

/* Scrollbar for suggestions */
.autocomplete-suggestions::-webkit-scrollbar {
    width: 8px;
}

.autocomplete-suggestions::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.autocomplete-suggestions::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.autocomplete-suggestions::-webkit-scrollbar-thumb:hover {
    background: #5568d3;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .autocomplete-suggestions {
        max-height: 350px;
    }
    
    .suggestion-item {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
}

@media (max-width: 576px) {
    .autocomplete-suggestions {
        max-height: 300px;
    }
    
    .suggestion-item {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}

/* Bulk Upload Styling */
.upload-area {
    border: 2px dashed #667eea;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    background-color: #f8f9ff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #5568d3;
    background-color: #e8eaff;
}

.upload-area.drag-over {
    border-color: #667eea;
    background-color: #e0e3ff;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.upload-content {
    pointer-events: none;
}

.upload-icon-large {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 15px;
}

.upload-area h6 {
    color: #333;
    font-weight: 600;
}

#select-file-btn {
    pointer-events: all;
}

.btn-upload-submit {
    background-color: #667eea;
    border-color: #667eea;
    color: white;
}

.btn-upload-submit:hover:not(:disabled) {
    background-color: #5568d3;
    border-color: #5568d3;
}

.btn-upload-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.stat-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.stat-card.stat-success {
    border-color: #28a745;
    background-color: #f0f9f6;
}

.stat-card.stat-warning {
    border-color: #ffc107;
    background-color: #fffaf0;
}

.stat-card.stat-danger {
    border-color: #dc3545;
    background-color: #fff5f6;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
}

.stat-card.stat-success .stat-value {
    color: #28a745;
}

.stat-card.stat-warning .stat-value {
    color: #ffc107;
}

.stat-card.stat-danger .stat-value {
    color: #dc3545;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
    margin-top: 5px;
}

.error-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.error-list li {
    padding: 3px 0;
    color: #dc3545;
    font-size: 0.85rem;
}

.error-list li:before {
    content: "• ";
    margin-right: 5px;
}

@media (max-width: 768px) {
    .upload-area {
        padding: 30px 15px;
    }
    
    .upload-icon-large {
        font-size: 2.5rem;
    }
}

/* Invoice Search Enhancements */
#invoice-search-form .form-floating > .form-select {
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    padding: 1.5rem 0.75rem 0.5rem 0.75rem;
    height: calc(3.5rem + 2px);
    transition: all 0.3s ease;
    background: white;
}

#invoice-search-form .form-floating > .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
    background: white;
}

#invoice-search-form .form-floating > label {
    padding: 1rem 0.75rem;
    color: #6c757d;
    font-weight: 500;
}

#invoice-search-form .form-floating > .form-select:focus ~ label,
#invoice-search-form .form-floating > .form-select:not([value=""]) ~ label {
    color: #667eea;
}

/* Date input validation styles */
#invdt_date_from.date-error,
#invdt_date_to.date-error,
#vdt_date_from.date-error,
#vdt_date_to.date-error,
#mrdt_date_from.date-error,
#mrdt_date_to.date-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15) !important;
}

.date-error-message,
.date-error-msg {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.date-error-message.show,
.date-error-msg.show {
    display: block;
}

/* Force Light Mode - Override Bootstrap Dark Theme */
/* This ensures the application always uses light mode regardless of device/browser settings */

:root,
[data-bs-theme=light],
[data-bs-theme=dark] {
    color-scheme: light !important;
    --bs-body-color: #212529 !important;
    --bs-body-color-rgb: 33, 37, 41 !important;
    --bs-body-bg: #fff !important;
    --bs-body-bg-rgb: 255, 255, 255 !important;
}

/* Force light backgrounds and dark text on all elements */
body,
html {
    background-color: #fff !important;
    color: #212529 !important;
}

/* Ensure content areas have white backgrounds */
.content,
.main-content,
.wrapper,
.page-wrapper {
    background-color: #fff !important;
    color: #212529 !important;
}

/* Force light backgrounds on cards and panels */
.card,
.panel,
.box {
    background-color: #fff !important;
    color: #212529 !important;
}

/* Ensure tables are readable */
.table {
    background-color: #fff !important;
    color: #212529 !important;
}

.table thead th {
    background-color: #f8f9fa !important;
    color: #212529 !important;
}

/* Form elements */
.form-control,
.form-select,
input,
textarea,
select {
    background-color: #fff !important;
    color: #212529 !important;
    border-color: #ced4da !important;
}

.form-control:focus,
.form-select:focus,
input:focus,
textarea:focus,
select:focus {
    background-color: #fff !important;
    color: #212529 !important;
}

/* Mobile-specific overrides */
@media (max-width: 768px) {
    body,
    html {
        background-color: #ffffff !important;
        color: #212529 !important;
    }
    
    .left-panel,
    .page-header,
    .content,
    .main-content {
        background-color: #fff !important;
        color: #212529 !important;
    }
    
    /* Ensure all text is dark on mobile */
    * {
        color: #212529 !important;
    }
    
    /* Override for elements that should keep their colors */
    .text-white,
    .btn-primary,
    .btn-success,
    .btn-danger,
    .btn-warning,
    .btn-info,
    .badge,
    .alert-success,
    .alert-danger,
    .alert-warning,
    .alert-info,
    .btn-filter-search {
        color: white !important;
    }
    
    /* Keep gradient backgrounds on special elements */
    .stat-icon,
    .btn-primary-custom,
    .btn-success-custom,
    .btn-filter-search,
    .login-wrapper {
        color: white !important;
    }
}

/* ===== Invoice Filter Card Styles (Matching Reference Design) ===== */

.invoice-filter-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    margin-bottom: 30px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.invoice-filter-header {
    display: flex;
    align-items: center;
    padding: 24px 28px 20px;
    gap: 14px;
}

.invoice-filter-header .accent-bar {
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, #e91e63, #9c27b0);
    border-radius: 4px;
    flex-shrink: 0;
}

.invoice-filter-header .filter-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a2e;
    letter-spacing: 0.2px;
}

.invoice-filter-body {
    padding: 0 28px 28px;
}

/* Filter Field Styles */
.filter-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 0;
}

.filter-input {
    height: 48px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    padding: 12px 16px !important;
    font-size: 0.9375rem !important;
    color: #374151 !important;
    background-color: #f9fafb !important;
    transition: all 0.2s ease;
}

.filter-input::placeholder {
    color: #9ca3af !important;
    font-weight: 400;
}

.filter-input:focus {
    border-color: #a855f7 !important;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1) !important;
    background-color: #ffffff !important;
    outline: none;
}

/* Select dropdown specific styling */
select.filter-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
    background-position: right 12px center !important;
    background-repeat: no-repeat !important;
    background-size: 20px !important;
    padding-right: 40px !important;
}

/* Date input specific styling */
input[type="date"].filter-input {
    cursor: pointer;
}

input[type="date"].filter-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

input[type="date"].filter-input::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Filter Buttons */
.filter-buttons {
    flex-wrap: wrap;
}

.btn-filter-reset {
    background: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    min-width: 140px;
}

.btn-filter-reset:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #1f2937;
}

.btn-filter-search {
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    color: #ffffff;
    border: none;
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
    min-width: 160px;
    box-shadow: 0 4px 14px rgba(168, 85, 247, 0.35);
}

.btn-filter-search:hover {
    background: linear-gradient(135deg, #9333ea 0%, #db2777 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.45);
    color: #ffffff;
}

.btn-filter-search:active {
    transform: translateY(0);
}

/* Responsive adjustments for Invoice Filter Card */
@media (max-width: 1199.98px) {
    .invoice-filter-body .row > div {
        margin-bottom: 8px;
    }
}

@media (max-width: 767.98px) {
    .invoice-filter-header {
        padding: 20px 20px 16px;
    }
    
    .invoice-filter-body {
        padding: 0 20px 24px;
    }
    
    .filter-field {
        margin-bottom: 4px;
    }
    
    .filter-buttons {
        flex-direction: column;
        gap: 12px !important;
    }
    
    .btn-filter-reset,
    .btn-filter-search {
        width: 100%;
        min-width: unset;
    }
    
    .filter-buttons .btn-filter-reset {
        order: 2;
    }
    
    .filter-buttons .btn-filter-search {
        order: 1;
    }
}

/* ============================================
   OTP Verification Page Styles
   ============================================ */

.otp-input-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.otp-input {
    width: 50px;
    height: 55px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.otp-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.25);
    outline: none;
}

.otp-input.filled {
    border-color: #667eea;
    background-color: #f8f9ff;
}

.timer-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    display: inline-block;
}

.timer-badge.expired {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.resend-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.resend-link:hover {
    text-decoration: underline;
}

.resend-link.disabled {
    color: #999;
    pointer-events: none;
}

.security-notice {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 12px 15px;
    border-radius: 4px;
    font-size: 13px;
    color: #856404;
}

.email-badge {
    background-color: #e9ecef;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    color: #495057;
}

/* OTP Page Alert Progress Bars (5 second animation) */
.otp-alert-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #198754, #20c997);
    animation: otpAlertProgress 5s linear forwards;
}

.otp-alert-progress-danger {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #dc3545, #ff6b6b);
    animation: otpAlertProgress 5s linear forwards;
}

@keyframes otpAlertProgress {
    from { width: 100%; }
    to { width: 0%; }
}

