/* Minimal Eligibility Status Styles */
.eligibility-status {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    border: 1px solid #e5e7eb;
}

.eligibility-success-minimal {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #059669;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.eligibility-success-minimal i {
    color: #10b981;
}

.eligibility-missing-minimal {
    color: #dc2626;
    background: #fef2f2;
    border-color: #fecaca;
}

.eligibility-missing-minimal i {
    color: #ef4444;
    margin-left: 8px;
}

.missing-items {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.missing-item {
    background: #fee2e2;
    color: #991b1b;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    border: 1px solid #fca5a5;
}

.eligibility-error-minimal {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #b45309;
    background: #fffbeb;
    border-color: #fed7aa;
}

.eligibility-error-minimal i {
    color: #f59e0b;
}

/* Modern Loan Payment Container */
.loan-payment-container.modern {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Loan Overview Card */
.loan-overview-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 24px;
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

.loan-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.loan-icon {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.loan-info {
    flex: 1;
}

.loan-info h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 500;
    opacity: 0.9;
}

.loan-amount {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.status-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.active {
    background: rgba(76, 175, 80, 0.9);
}

/* Loan Progress */
.loan-progress {
    margin-top: 24px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

.progress-item {
    text-align: center;
}

.progress-item label {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-item .amount {
    font-size: 18px;
    font-weight: 600;
}

.progress-bar {
    background: rgba(255, 255, 255, 0.2);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    background: rgba(255, 255, 255, 0.9);
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    font-size: 14px;
    opacity: 0.9;
}

/* Payment Form Card */
.payment-form-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e1e8ed;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.form-header {
    margin-bottom: 24px;
    text-align: center;
}

.form-header h4 {
    color: #2c3e50;
    margin: 0 0 8px 0;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.form-header p {
    color: #6c757d;
    margin: 0;
    font-size: 14px;
}

/* Payment Form */
.payment-form {
    max-width: 400px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.amount-input-container {
    position: relative;
    display: flex;
    gap: 8px;
}

.amount-input-container input {
    flex: 1;
    font-size: 20px !important;
    font-weight: 600;
    text-align: center;
    padding: 16px 20px !important;
    border: 2px solid #e1e8ed !important;
    border-radius: 12px !important;
    transition: all 0.3s ease;
}

.amount-input-container input:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
    outline: none !important;
}

.btn-quick-fill {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-quick-fill:hover {
    background: #5a67d8;
    transform: translateY(-1px);
}

.form-help {
    margin-top: 8px;
    font-size: 12px;
    color: #6c757d;
    text-align: center;
}

.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    transition: all 0.3s ease;
}

.form-group textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.btn-large {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

/* Payment Info Card */
.payment-info-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e9ecef;
}

.info-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: #495057;
}

.info-header h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    padding: 8px 0;
    color: #6c757d;
    font-size: 14px;
    position: relative;
    padding-right: 20px;
}

.info-list li:before {
    content: "•";
    color: #667eea;
    font-weight: 600;
    position: absolute;
    right: 0;
}

/* Empty and Error States */
.empty-state.modern,
.error-state.modern {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 16px;
    border: 1px solid #e1e8ed;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.empty-state.modern .empty-icon,
.error-state.modern .error-icon {
    font-size: 48px;
    margin-bottom: 20px;
    display: block;
}

.empty-state.modern .empty-icon {
    color: #667eea;
}

.error-state.modern .error-icon {
    color: #dc3545;
}

.empty-state.modern h3,
.error-state.modern h3 {
    color: #2c3e50;
    margin: 0 0 12px 0;
    font-size: 24px;
}

.empty-state.modern p,
.error-state.modern p {
    color: #6c757d;
    margin: 0 0 24px 0;
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .loan-payment-container.modern {
        padding: 16px;
        gap: 16px;
    }
    
    .loan-header {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .progress-info {
        flex-direction: column;
        gap: 16px;
    }
    
    .payment-form-card {
        padding: 20px;
    }
    
    .amount-input-container {
        flex-direction: column;
        gap: 12px;
    }
    
    .btn-quick-fill {
        align-self: center;
        width: fit-content;
    }
}

/* Simple Payment Form */
.simple-payment,
.payment-form {
    text-align: center;
    padding: 20px;
}

.payment-header {
    margin-bottom: 25px;
}

.payment-icon {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 16px;
    display: block;
}

.payment-header h4 {
    color: #2c3e50;
    margin: 0;
    font-size: 20px;
}

/* Amount Input Group */
.amount-input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.amount-input {
    font-size: 24px !important;
    font-weight: 600;
    text-align: center;
    padding: 16px 20px !important;
    border: 2px solid #e1e8ed !important;
    border-radius: 12px !important;
    width: 200px;
    transition: all 0.3s ease;
}

.amount-input:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
    outline: none !important;
}

.currency-label {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    background: #f8f9fa;
    padding: 16px 12px;
    border-radius: 8px;
}

/* Quick Amount Buttons */
.quick-amounts {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Priority tab text rules completely rewritten below */

/* Force quick button styles */
.quick-actions .quick-buttons .quick-btn,
button.quick-btn {
    padding: 10px 20px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    border-radius: 12px !important;
    color: white !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2) !important;
    min-height: 40px !important;
    max-height: 40px !important;
    width: auto !important;
}

.quick-actions .quick-buttons .quick-btn:hover,
button.quick-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
    background: linear-gradient(135deg, #5a6fd8 0%, #6b4190 100%) !important;
}

.quick-actions .quick-buttons .quick-btn i,
button.quick-btn i {
    font-size: 16px !important;
}

.quick-actions .quick-buttons .quick-btn span,
button.quick-btn span {
    font-size: 14px !important;
    white-space: nowrap !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .quick-actions .quick-buttons .quick-btn,
    button.quick-btn {
        padding: 8px 16px !important;
        font-size: 13px !important;
        min-height: 36px !important;
        max-height: 36px !important;
        border-radius: 10px !important;
    }
    
    .quick-actions .quick-buttons .quick-btn i,
    button.quick-btn i {
        font-size: 14px !important;
    }
    
    .quick-actions .quick-buttons .quick-btn span,
    button.quick-btn span {
        font-size: 13px !important;
    }
    
    .quick-buttons {
        gap: 6px;
    }
    
    .amount-input-group {
        flex-direction: column;
        gap: 12px;
    }
    
    .amount-input {
        width: 100%;
        max-width: 250px;
    }
}

.payment-header i {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 10px;
}

.payment-header h3 {
    color: var(--text-primary);
    margin: 0;
    font-size: 20px;
}

.amount-input {
    margin-bottom: 25px;
}

.amount-input label {
    display: block;
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 15px;
    font-weight: 500;
}

.input-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 18px;
}

.input-container input {
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 20px;
    text-align: center;
    width: 120px;
    transition: all 0.3s ease;
}

.input-container input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-container span {
    font-weight: 600;
    color: var(--text-secondary);
}

.buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.buttons .btn {
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.buttons .btn-primary {
    background: var(--primary);
    color: white;
}

.buttons .btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.buttons .btn-secondary {
    background: #f5f5f5;
    color: var(--text-secondary);
}

.buttons .btn-secondary:hover {
    background: #e8e8e8;
}

/* Modern Transaction Controls */
.transactions-controls {
    margin-bottom: 20px;
}

.filters-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.modern-filter {
    display: flex;
    align-items: center;
}

.modern-select {
    background: white;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 14px;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 160px;
}

.modern-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modern-select:hover {
    border-color: #667eea;
}

/* Summary Cards Update */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.summary-card .card-icon {
    font-size: 32px;
    opacity: 0.8;
}

.summary-card.primary .card-icon {
    color: #667eea;
}

.summary-card.warning .card-icon {
    color: #f39c12;
}

/* Transaction Info for Empty State */
.transaction-info {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.help-text {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
}

/* Eligibility Tests Styles */
.eligibility-tests {
    margin: 20px 0;
}

.tests-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.eligibility-test {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 8px;
    border: 1px solid #e1e8ed;
    transition: all 0.3s ease;
}

.eligibility-test.test-pass {
    background: #f0f9f4;
    border-color: #22c55e;
}

.eligibility-test.test-fail {
    background: #fef2f2;
    border-color: #ef4444;
}

.test-icon {
    margin-left: 12px;
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.test-pass .test-icon {
    color: #22c55e;
}

.test-fail .test-icon {
    color: #ef4444;
}

.test-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.test-label {
    font-weight: 500;
    color: #2c3e50;
}

.test-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
}

.test-pass .test-status {
    color: #22c55e;
}

.test-fail .test-status {
    color: #ef4444;
}

.error-messages {
    margin-top: 20px;
    padding: 16px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
}

.error-messages h5 {
    color: #856404;
    margin: 0 0 12px 0;
    font-size: 16px;
}

.messages-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.messages-list li {
    padding: 6px 0;
    color: #856404;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.messages-list i {
    margin-top: 2px;
    flex-shrink: 0;
}

/* User Dashboard Priority Tabs - Completely Rewritten */

.priority-tabs-section {
    background: var(--white-alpha);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border: var(--border);
    border-radius: var(--radius);
    padding: var(--padding);
    margin-bottom: var(--padding);
    box-shadow: var(--shadow);
}

.priority-tabs-section h3 {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 14px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.9;
}

.priority-tabs-section h3 i {
    color: var(--primary);
    font-size: 16px;
    opacity: 0.8;
}

.priority-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--gap);
}

/* Old responsive rules removed - handled in new priority tab section */

/* =================== Family Management Styles =================== */

/* Family Member Cards */
.family-members-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.family-member-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.family-member-card:hover {
    background: #ffffff;
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.member-info h5 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-weight: 600;
}

.member-balance {
    color: #27ae60;
    font-weight: 600;
    margin: 4px 0;
}

.member-date {
    color: #7f8c8d;
    font-size: 14px;
    margin: 4px 0 0 0;
}

.member-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.action-btn.small {
    padding: 6px 12px;
    font-size: 12px;
    min-width: auto;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
    font-style: italic;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
}

.loading-state i {
    margin-right: 8px;
}

/* Error State */
.error-state {
    text-align: center;
    padding: 20px;
    color: #e74c3c;
}

.error-state i {
    margin-bottom: 8px;
    font-size: 24px;
}

/* Status Badge */
.status-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.active {
    background: #d4edda;
    color: #155724;
}

.status-badge.revoked {
    background: #f8d7da;
    color: #721c24;
}

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-header h4 {
    margin: 0;
    color: #2c3e50;
}

/* Info Box */
.info-box {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 8px;
    padding: 16px;
}

.info-box h5 {
    margin: 0 0 8px 0;
    color: #1976d2;
}

.info-box p {
    margin: 8px 0;
    color: #424242;
    line-height: 1.5;
}

/* Payment Interface Toggle */
.payment-interface {
    margin-top: 20px;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    background: #f8f9fa;
}

/* Family Container Variants */
.family-head-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.family-member-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.no-family-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

/* PRIORITY TAB BUTTONS - COMPLETE REWRITE */

/* Main priority tab button styling */
.priority-tab {
    /* Reset specific browser defaults without breaking display */
    -moz-appearance: none;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    margin: 0;
    outline: none;
    text-decoration: none;
    
    /* Button structure and layout */
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 16px !important;
    min-height: 70px !important;
    max-height: 70px !important;
    text-align: right !important;
    cursor: pointer !important;
    position: relative !important;
    overflow: hidden !important;
    width: 100% !important;
    
    /* Visual styling */
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    border: 1px solid rgba(102, 126, 234, 0.2) !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    
    /* Typography */
    font-family: inherit !important;
    font-size: inherit !important;
    color: #333333 !important;
    
    /* Animation */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Hover state */
.priority-tab:hover {
    border-color: #667eea !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%) !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2) !important;
    transform: translateY(-2px) !important;
}

/* Active/selected state */
.priority-tab.active {
    border-color: #667eea !important;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(102, 126, 234, 0.02) 100%) !important;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.25) !important;
}

/* Focus state for accessibility */
.priority-tab:focus {
    outline: 2px solid #667eea !important;
    outline-offset: 2px !important;
}

/* Icon styling */
.priority-tab .tab-icon {
    width: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    color: white !important;
    flex-shrink: 0 !important;
}

.priority-tab[data-tab="loan-payments"] .tab-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.priority-tab[data-tab="subscriptions"] .tab-icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
}

/* Content area */
.priority-tab .tab-content {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
}

/* Title text */
.priority-tab .tab-content .tab-title {
    display: block !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #333333 !important;
    margin-bottom: 3px !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Description text - targeting both class and element */
.priority-tab .tab-content .tab-desc,
.priority-tab .tab-content small,
.priority-tab small.tab-desc {
    display: block !important;
    font-size: 12px !important;
    color: #666666 !important;
    line-height: 1.2 !important;
    opacity: 0.9 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    visibility: visible !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Hover state text changes */
.priority-tab:hover .tab-content .tab-title {
    color: #2c3e50 !important;
}

.priority-tab:hover .tab-content .tab-desc,
.priority-tab:hover .tab-content small,
.priority-tab:hover small.tab-desc {
    color: #555555 !important;
    opacity: 1 !important;
    display: block !important;
}

/* Active state text changes */
.priority-tab.active .tab-content .tab-title {
    color: #1a202c !important;
}

.priority-tab.active .tab-content .tab-desc,
.priority-tab.active .tab-content small,
.priority-tab.active small.tab-desc {
    color: #4a5568 !important;
    opacity: 1 !important;
    display: block !important;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    .priority-tabs {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .priority-tab {
        min-height: 60px;
        max-height: 60px;
        padding: 12px;
        gap: 10px;
    }
    
    .priority-tab .tab-icon {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .priority-tab .tab-content .tab-title {
        font-size: 14px;
        margin-bottom: 2px;
    }
    
    .priority-tab .tab-content .tab-desc,
    .priority-tab .tab-content small,
    .priority-tab small.tab-desc {
        font-size: 11px !important;
        display: block !important;
        visibility: visible !important;
    }
}

/* FINAL DEBUGGING RULE - Maximum specificity to force descriptions to show */
button.priority-tab .tab-content small.tab-desc,
button.user-tab.priority-tab .tab-content small.tab-desc {
    display: block !important;
    visibility: visible !important;
    opacity: 0.9 !important;
    height: auto !important;
    width: auto !important;
    position: static !important;
    color: #666666 !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
}

/* =================== MODERN ACTION CARDS - COMPLETELY NEW DESIGN =================== */

/* Main container */
.action-cards-section {
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
}

.action-cards-section h3 {
    color: #2d3748;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-cards-section h3 i {
    color: #667eea;
    font-size: 18px;
    opacity: 0.8;
}

/* Grid container */
.action-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

/* Modern card button */
.modern-action-card {
    background: linear-gradient(145deg, #ffffff 0%, #f7fafc 100%);
    border: 1px solid rgba(102, 126, 234, 0.15);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
    min-height: 80px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    
    /* Reset button styles */
    -moz-appearance: none;
    -webkit-appearance: none;
    appearance: none;
    border: 1px solid rgba(102, 126, 234, 0.15);
    outline: none;
    text-decoration: none;
    font-family: inherit;
}

/* Hover effect */
.modern-action-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: #667eea;
    background: linear-gradient(145deg, #ffffff 0%, #f0f4ff 100%);
}

/* Active state */
.modern-action-card.active {
    border-color: #667eea;
    background: linear-gradient(145deg, rgba(102, 126, 234, 0.05) 0%, rgba(102, 126, 234, 0.02) 100%);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Card icon */
.modern-action-card .card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.modern-action-card[data-tab="loan-payments"] .card-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.modern-action-card[data-tab="subscriptions"] .card-icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Card content */
.modern-action-card .card-content {
    flex: 1;
    text-align: center;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modern-action-card .card-title {
    font-size: 17px;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
    line-height: 1.3;
}

/* Hover animations */
.modern-action-card:hover .card-icon {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.modern-action-card:hover .card-title {
    color: #1a202c;
}

/* Responsive design */
@media (max-width: 768px) {
    .action-cards-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .modern-action-card {
        padding: 16px;
        min-height: 70px;
        gap: 12px;
    }
    
    .modern-action-card .card-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .modern-action-card .card-title {
        font-size: 15px;
    }
}

/* Focus states for accessibility */
.modern-action-card:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Animation keyframes */
@keyframes cardPulse {
    0%, 100% {
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    }
    50% {
        box-shadow: 0 8px 16px -4px rgba(102, 126, 234, 0.2), 0 4px 8px -2px rgba(102, 126, 234, 0.1);
    }
}

/* Special effects on active state */
.modern-action-card.active {
    animation: cardPulse 2s infinite;
}

/* Transaction Balance Column Styling */
.balance-cell {
    text-align: center;
    font-weight: 600;
    background: rgba(34, 197, 94, 0.05);
    padding: 12px 8px !important;
    border-right: 3px solid #22c55e;
}

.balance-cell .balance {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    font-size: 14px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    box-shadow: 0 2px 4px rgba(34, 197, 94, 0.2);
}

/* Enhanced table header for balance column */
.transactions-table th:nth-child(4),
table th:nth-child(5):contains("الرصيد المحدث") {
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    color: white !important;
    font-weight: 700;
    text-align: center;
}

/* Responsive balance column */
@media (max-width: 768px) {
    .balance-cell {
        padding: 8px 4px !important;
    }
    
    .balance-cell .balance {
        font-size: 12px;
        padding: 2px 6px;
    }
}
