/* Custom styles for Aastha Invoice Service */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --dark-color: #212529;
    --light-color: #f8f9fa;
}

/* Custom gradient backgrounds */
.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Custom text shadows */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

/* Custom animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Custom glass effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Custom hover effects */
.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

/* Custom shadow utilities */
.shadow-custom {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Logo styling */
.logo-text {
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* Dashboard specific styles */
.page-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.page-header-title {
    font-weight: 700;
    color: #495057;
    margin-bottom: 0.5rem;
}

.page-header-content p {
    color: #6c757d;
    margin-bottom: 0;
}

.card {
    border-radius: 15px;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.avatar-lg {
    width: 60px;
    height: 60px;
    font-size: 24px;
}

/* Stats card animations */
.stats-card {
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: scale(1.02);
}

/* Chart container styling */
.chart-container {
    position: relative;
    height: 300px;
    margin-top: 1rem;
}

/* Quick action buttons */
.btn-lg {
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    border-radius: 10px;
}

/* Table styling */
.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.04);
}

/* Badge styling */
.badge {
    font-size: 0.75em;
    padding: 0.5em 0.75em;
    border-radius: 6px;
}

/* Invoice page specific styles */
.btn-soft-info {
    background-color: rgba(13, 202, 240, 0.1);
    border: 1px solid rgba(13, 202, 240, 0.2);
    color: #0dcaf0;
}

.btn-soft-info:hover {
    background-color: rgba(13, 202, 240, 0.2);
    border-color: #0dcaf0;
    color: #0dcaf0;
}

.btn-soft-primary {
    background-color: rgba(13, 110, 253, 0.1);
    border: 1px solid rgba(13, 110, 253, 0.2);
    color: #0d6efd;
}

.btn-soft-primary:hover {
    background-color: rgba(13, 110, 253, 0.2);
    border-color: #0d6efd;
    color: #0d6efd;
}

.btn-soft-warning {
    background-color: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.btn-soft-warning:hover {
    background-color: rgba(255, 193, 7, 0.2);
    border-color: #ffc107;
    color: #ffc107;
}

.btn-soft-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

.btn-soft-danger:hover {
    background-color: rgba(220, 53, 69, 0.2);
    border-color: #dc3545;
    color: #dc3545;
}

.btn-soft-success {
    background-color: rgba(25, 135, 84, 0.1);
    border: 1px solid rgba(25, 135, 84, 0.2);
    color: #198754;
}

.btn-soft-success:hover {
    background-color: rgba(25, 135, 84, 0.2);
    border-color: #198754;
    color: #198754;
}

/* Badge styles */
.bg-primary-subtle {
    background-color: rgba(13, 110, 253, 0.1) !important;
}

.bg-success-subtle {
    background-color: rgba(25, 135, 84, 0.1) !important;
}

.bg-danger-subtle {
    background-color: rgba(220, 53, 69, 0.1) !important;
}

/* Table improvements */
.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.table th {
    font-weight: 600;
    font-size: 0.875rem;
    padding: 1rem 0.75rem;
}

.table td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
}

/* Search input improvements */
.input-group .form-control {
    border-radius: 0.375rem;
}

.input-group .input-group-text {
    border-radius: 0.375rem 0 0 0.375rem;
}

.input-group .form-control {
    border-radius: 0 0.375rem 0.375rem 0;
}

/* Filter section animation */
#filtersSection {
    transition: all 0.3s ease;
}

/* Pagination improvements */
.page-link {
    border-radius: 0.375rem;
    margin: 0 2px;
    border: 1px solid #dee2e6;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Pagination styling improvements */
.pagination {
    margin-bottom: 0;
}

.pagination .page-link {
    color: #6c757d;
    border-color: #dee2e6;
    padding: 0.5rem 0.75rem;
    margin: 0 2px;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    color: #0d6efd;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.pagination .page-item.disabled .page-link {
    color: #adb5bd;
    background-color: #fff;
    border-color: #dee2e6;
}

/* Empty state styling */
.text-center.py-5 {
    padding: 3rem 1rem !important;
}

/* Card header improvements */
.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    background-color: #f8f9fa;
}

/* Page header improvements for invoices */
.page-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.page-header-title {
    font-weight: 700;
    color: #495057;
    margin-bottom: 0.5rem;
}

.page-header-content p {
    color: #6c757d;
    margin-bottom: 0;
}

/* Invoice specific improvements */
.btn-group .btn {
    border-radius: 0.375rem;
    margin: 0 1px;
}

.btn-group .btn:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.btn-group .btn:last-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.btn-group .btn:not(:first-child):not(:last-child) {
    border-radius: 0;
}

/* Table responsiveness improvements */
@media (max-width: 991.98px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
    }
    
    .btn-group .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Card improvements */
.card {
    border: 1px solid rgba(0, 0, 0, 0.125);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

/* Form improvements */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.input-group-text {
    background-color: #f8f9fa;
    border-color: #ced4da;
}

/* Table hover effects */
.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Badge improvements */
.badge {
    font-size: 0.8em;
    font-weight: 500;
}

/* Button soft styles enhancement */
.btn-soft-info:focus,
.btn-soft-primary:focus,
.btn-soft-warning:focus,
.btn-soft-danger:focus,
.btn-soft-success:focus {
    box-shadow: none;
    outline: none;
}

/* Responsive utilities */
@media (max-width: 767.98px) {
    .d-sm-flex {
        flex-direction: column;
        align-items: stretch !important;
    }
    
    .d-sm-flex .btn-group {
        margin-top: 1rem;
        width: 100%;
    }
    
    .d-sm-flex .btn-group .btn {
        flex: 1;
    }
}

/* Pagination improvements */
.pagination .page-link {
    padding: 0.5rem 0.75rem;
    margin: 0 0.125rem;
    color: #6c757d;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

.pagination .page-link:hover {
    color: #0d6efd;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

/* Loading states */
.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Sortable column highlighting */
.sortable.active {
    background-color: var(--bs-primary) !important;
    color: white !important;
}

.sortable.active a {
    color: white !important;
}

/* Debug info styling */
.alert-info {
    background-color: #cff4fc;
    border-color: #b8daff;
    color: #055160;
}

/* Empty state improvements */
.text-center.py-5 i {
    opacity: 0.5;
}

/* Filter toggle animation */
#filtersSection {
    transition: all 0.3s ease-in-out;
    overflow: hidden;
}

/* Text utilities */
.text-gray-800 {
    color: #343a40 !important;
}

/* Header spacing */
.h3 {
    font-size: 1.75rem;
    font-weight: 600;
}

/* Status badge improvements */
.bg-primary-subtle {
    background-color: rgba(13, 110, 253, 0.1) !important;
    color: #0d6efd !important;
}

.bg-success-subtle {
    background-color: rgba(25, 135, 84, 0.1) !important;
    color: #198754 !important;
}

.bg-danger-subtle {
    background-color: rgba(220, 53, 69, 0.1) !important;
    color: #dc3545 !important;
}

/* Button group spacing */
.btn-group .btn + .btn {
    margin-left: 0;
}

/* Table cell alignment */
.table td {
    vertical-align: middle;
}

/* Search input focus */
.form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Card footer styling */
.card-footer {
    background-color: #f8f9fa;
    border-top: 1px solid rgba(0, 0, 0, 0.125);
}

/* Theme layout improvements */
.content-area-header .page-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-header-title h5 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #6c757d;
}

.page-header-right-items-wrapper {
    gap: 0.5rem;
}

/* Content area improvements */
.content-area-body {
    padding: 0;
}

.nxl-content {
    padding: 1.5rem;
}

.main-content {
    background: #f8f9fa;
    min-height: calc(100vh - 120px);
}

/* Card layout improvements within theme */
.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 1.25rem;
}

.card-body {
    background: #fff;
}

.card-footer {
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

/* Table within theme improvements */
.table-responsive {
    border-radius: 0 0 10px 10px;
    overflow: hidden;
}

.table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    padding: 1rem 0.75rem;
}

.table tbody td {
    padding: 1rem 0.75rem;
    border-bottom: 1px solid #f0f0f0;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Button improvements within theme */
.btn {
    border-radius: 6px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-outline-primary {
    border: 2px solid #667eea;
    color: #667eea;
    background: transparent;
}

.btn-outline-primary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
}

/* Filter section theme integration */
#filtersSection {
    background: #f8f9fa;
    border-radius: 10px 10px 0 0;
    border-bottom: 2px solid #eee;
}

/* Responsive improvements for theme */
@media (max-width: 768px) {
    .page-header {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .page-header-left {
        margin-bottom: 1rem;
    }
    
    .page-header-right-items-wrapper {
        flex-direction: column;
        width: 100%;
    }
    
    .page-header-right-items-wrapper .btn {
        width: 100%;
        justify-content: center;
    }
    
    .nxl-content {
        padding: 1rem;
    }
    
    .content-area-header .page-header {
        margin-bottom: 1rem;
    }
}

/* Loading states within theme */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Animation improvements */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Theme color integration */
.text-primary {
    color: #667eea !important;
}

.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

/* Status indicators within theme */
.badge {
    font-size: 0.8em;
    padding: 0.5em 0.8em;
    border-radius: 50px;
    font-weight: 500;
}

/* Table sorting indicators */
.sortable a {
    color: #495057;
    text-decoration: none;
    transition: all 0.2s ease;
}

.sortable a:hover {
    color: #667eea;
}

.sortable.active a {
    color: white !important;
}

/* Empty state improvements */
.py-5 {
    padding: 3rem 2rem !important;
}

.py-5 i {
    opacity: 0.6;
    margin-bottom: 1rem;
}

/* Debug info styling within theme */
.alert-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 1px solid #90caf9;
    color: #1565c0;
}

/* Form improvements within theme */
.form-control {
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 0.75rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-select {
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 0.75rem;
}

.input-group-text {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-right: none;
}

.input-group .form-control {
    border-left: none;
}

/* Pagination within theme */
.pagination .page-link {
    color: #667eea;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin: 0 2px;
    padding: 0.6rem 1rem;
    transition: all 0.2s ease;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.pagination .page-link:hover {
    color: #667eea;
    background: #f8f9fa;
    border-color: #667eea;
    transform: translateY(-1px);
}

/* Trial Card Specific Styles */
.trial-card-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.trial-card-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    animation: shimmer 3s infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.trial-card-shadow {
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.trial-card-shadow:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.trial-btn-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.feature-check-icon {
    animation: checkmark 0.6s ease-in-out;
}

@keyframes checkmark {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Responsive adjustments for trial card */
@media (max-width: 768px) {
    .trial-card-gradient .display-5 {
        font-size: 2rem !important;
    }
    
    .trial-card-gradient .lead {
        font-size: 1rem !important;
    }
}

/* ===== SweetAlert2 Custom Styles ===== */
.swal2-popup {
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.swal2-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.swal2-content {
    font-size: 1rem;
    color: var(--secondary-color);
    line-height: 1.6;
}

.swal2-icon {
    border-width: 3px;
    margin: 2rem auto 1rem;
}

.swal2-icon.swal2-success {
    border-color: var(--success-color);
}

.swal2-icon.swal2-error {
    border-color: var(--danger-color);
}

.swal2-icon.swal2-warning {
    border-color: var(--warning-color);
}

.swal2-icon.swal2-info {
    border-color: var(--info-color);
}

.swal2-icon.swal2-question {
    border-color: var(--primary-color);
}

/* Custom button styles */
.swal2-styled.swal2-confirm {
    background-color: var(--primary-color);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.swal2-styled.swal2-confirm:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

.swal2-styled.swal2-cancel {
    background-color: var(--secondary-color);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.swal2-styled.swal2-cancel:hover {
    background-color: #545b62;
    transform: translateY(-1px);
}

/* Toast styles */
.swal2-toast {
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.swal2-toast .swal2-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.swal2-toast .swal2-content {
    font-size: 0.9rem;
    margin: 0;
}

/* Colored toast variants */
.colored-toast.swal2-icon-success {
    background-color: var(--success-color) !important;
}

.colored-toast.swal2-icon-error {
    background-color: var(--danger-color) !important;
}

.colored-toast.swal2-icon-warning {
    background-color: var(--warning-color) !important;
}

.colored-toast.swal2-icon-info {
    background-color: var(--info-color) !important;
}

.colored-toast .swal2-title,
.colored-toast .swal2-content {
    color: white !important;
}

/* Loading spinner customization */
.swal2-loading .swal2-styled.swal2-confirm {
    background-color: var(--primary-color);
}

.swal2-loading .swal2-styled.swal2-cancel {
    background-color: var(--secondary-color);
}

/* Animation enhancements */
.swal2-show {
    animation: swal2-show 0.3s ease-out;
}

.swal2-hide {
    animation: swal2-hide 0.15s ease-in;
}

@keyframes swal2-show {
    0% {
        opacity: 0;
        transform: scale(0.7);
    }
    45% {
        opacity: 1;
        transform: scale(1.05);
    }
    80% {
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes swal2-hide {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.5);
    }
}

/* Progress bar customization */
.swal2-timer-progress-bar {
    background-color: rgba(255, 255, 255, 0.6);
}

/* Input field styles in SweetAlert2 */
.swal2-input {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.swal2-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .swal2-popup {
        background-color: #2d3748;
        color: #e2e8f0;
    }
    
    .swal2-title {
        color: #e2e8f0;
    }
    
    .swal2-content {
        color: #cbd5e0;
    }
    
    .swal2-input {
        background-color: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .swal2-input:focus {
        border-color: var(--primary-color);
    }
}

/* Company layout styling */
.company-details-column {
    min-width: 250px;
    vertical-align: top;
}

.company-name {
    font-size: 1.1rem;
    color: var(--dark-color);
}

.company-details {
    color: var(--secondary-color);
    line-height: 1.4;
}

.company-details .mb-1 {
    margin-bottom: 0.25rem !important;
}

.company-details i {
    width: 16px;
    text-align: center;
}

/* Address Column Styling */
.company-address {
    vertical-align: top;
}

.company-address-line {
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    line-height: 1.4;
}

/* Table responsive improvements */
@media (max-width: 768px) {
    .company-details-column {
        min-width: 200px;
    }
    
    .company-details {
        font-size: 0.85rem;
    }
}
