/**
 * Loan Dashboard public styles
 */

/* Base styles */
.loan-dashboard-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #727272;
    line-height: 1.5;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px;
    --primary-color: #1e5aa0; /* Starlight Ventures primary blue */
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --info-color: #3498db;
    --border-color: #e0e0e0;
    --card-bg: #ffffff;
    --text-color: #333333;
    --light-text: #666666;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --scrollbar-width: 0px; /* Will be set by JS for browsers with visible scrollbars */
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}




/* Full-width template styles */
.loan-dashboard-fullwidth-page {
    background-color: #f5f8fc;
    margin: 0;
    padding: 0;
    height: 100%;
}

.loan-dashboard-fullwidth-container {
    padding: 0;
    margin: 0;
    min-height: 100vh;
}

.loan-dashboard-fullwidth-container .loan-dashboard-container {
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    min-height: 100vh;
}

/* Standalone dashboard specific styles */
#standalone-dashboard .loan-dashboard-container {
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 30px;
}

#standalone-dashboard .loan-dashboard-header {
    max-width: 1400px;
    margin: 0 auto 30px;
    padding-bottom: 25px;
}

#standalone-dashboard .loan-dashboard-content {
    max-width: 1400px;
    margin: 0 auto;
}

/* Fixed Layout Container */
.loan-dashboard-wrapper {
    display: flex;
    flex-direction: column;
    height: auto;
}

.loan-dashboard-fixed-layout {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.loan-dashboard-content-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Fixed position for admin bar placeholder */
#standalone-dashboard .admin-bar-placeholder {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    transition: none; /* Prevent any transition on the admin bar */
}

#standalone-dashboard #loan-dashboard-wrapper {
    padding-top: 65px; /* Height of admin bar (55px) + 10px padding */
}

/* Header */
.loan-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.loan-dashboard-title {
    font-size: 28px;
    color: var(--primary-color);
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.loan-dashboard-user-info {
    font-size: 16px;
    background-color: rgba(30, 90, 160, 0.08);
    padding: 8px 16px;
    border-radius: 30px;
    color: var(--primary-color);
}

.loan-dashboard-welcome {
    font-weight: 500;
}

/* User Info Header */
.loan-dashboard-user-info-header {
    display: flex;
    align-items: center;
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

.loan-dashboard-user-avatar {
    margin-right: 20px;
}

.loan-dashboard-user-avatar img {
    border-radius: 50%;
    border: 2px solid var(--primary-color);
}

.loan-dashboard-user-details {
    flex: 1;
}

.loan-dashboard-user-name {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: var(--primary-color);
}

.loan-dashboard-user-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.loan-dashboard-user-meta-item {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: var(--light-text);
}

.loan-dashboard-user-meta-item .dashicons {
    margin-right: 6px;
    color: var(--primary-color);
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.loan-dashboard-user-meta-value {
    font-weight: 500;
    color: var(--text-color);
}

.loan-dashboard-user-meta-subvalue {
    color: var(--light-text);
    margin-left: 5px;
    font-style: italic;
}

.loan-dashboard-user-actions {
    margin-left: 20px;
}

.loan-dashboard-user-edit-profile {
    display: flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 15px;
    border: 1px solid var(--primary-color);
    border-radius: 30px;
    transition: all 0.2s ease;
}

.loan-dashboard-user-edit-profile:hover {
    background-color: var(--primary-color);
    color: white;
}

.loan-dashboard-user-edit-profile .dashicons {
    margin-right: 5px;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Admin bar */
.loan-dashboard-admin-bar {
    background-color: #f8f9fa;
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    border-left: 4px solid var(--warning-color);
}

.loan-dashboard-admin-message {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* Metrics grid */
.loan-dashboard-metrics {
    margin-bottom: 40px;
}

.loan-dashboard-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.loan-dashboard-metric-card {
    background-color: var(--card-bg);
    padding: 24px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.loan-dashboard-metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.loan-dashboard-metric-icon {
    font-size: 24px;
    width: 56px;
    height: 56px;
    background-color: rgba(30, 90, 160, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 20px;
    transition: transform 0.3s ease;
}

.loan-dashboard-metric-card:hover .loan-dashboard-metric-icon {
    transform: scale(1.1);
    background-color: rgba(30, 90, 160, 0.15);
}

.loan-dashboard-metric-icon .dashicons {
    color: var(--primary-color);
    font-size: 26px;
    width: 26px;
    height: 26px;
}

.loan-dashboard-metric-content {
    flex: 1;
}

.loan-dashboard-metric-title {
    color: var(--light-text);
    font-size: 14px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.loan-dashboard-metric-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

/* Next payment in metrics */
.loan-dashboard-next-payment {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loan-dashboard-next-payment-label {
    font-weight: 600;
    margin-right: 10px;
}

.loan-dashboard-next-payment-info {
    display: flex;
    align-items: center;
}

.loan-dashboard-next-payment-date {
    margin-right: 15px;
    padding-right: 15px;
    border-right: 1px solid var(--border-color);
}

.loan-dashboard-next-payment-amount {
    font-weight: 600;
    color: var(--primary-color);
}

/* Enhanced Overview Styles */
.loan-dashboard-enhanced-overview {
    margin-bottom: 30px;
}

/* Status Banner */
.loan-dashboard-status-banner {
    display: flex;
    align-items: center;
    padding: 25px;
    background-color: #f8f9fa;
    border-radius: 14px;
    margin-bottom: 35px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.loan-dashboard-status-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.loan-dashboard-status-banner:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    transition: all 0.3s ease;
}

.loan-dashboard-status-banner.loan-dashboard-status-active {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.08), rgba(39, 174, 96, 0.04));
}

.loan-dashboard-status-banner.loan-dashboard-status-active:before {
    background: linear-gradient(to bottom, var(--success-color), rgba(39, 174, 96, 0.7));
}

.loan-dashboard-status-banner.loan-dashboard-status-approved {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.08), rgba(52, 152, 219, 0.04));
}

.loan-dashboard-status-banner.loan-dashboard-status-approved:before {
    background: linear-gradient(to bottom, var(--info-color), rgba(52, 152, 219, 0.7));
}

.loan-dashboard-status-banner.loan-dashboard-status-pending {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.08), rgba(243, 156, 18, 0.04));
}

.loan-dashboard-status-banner.loan-dashboard-status-pending:before {
    background: linear-gradient(to bottom, var(--warning-color), rgba(243, 156, 18, 0.7));
}

.loan-dashboard-status-banner.loan-dashboard-status-completed {
    background: linear-gradient(135deg, rgba(149, 165, 166, 0.08), rgba(149, 165, 166, 0.04));
}

.loan-dashboard-status-banner.loan-dashboard-status-completed:before {
    background: linear-gradient(to bottom, #95a5a6, rgba(149, 165, 166, 0.7));
}

.loan-dashboard-status-icon {
    font-size: 24px;
    width: 50px;
    height: 50px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 20px;
}

.loan-dashboard-status-active .loan-dashboard-status-icon {
    color: var(--success-color);
}

.loan-dashboard-status-approved .loan-dashboard-status-icon {
    color: var(--info-color);
}

.loan-dashboard-status-pending .loan-dashboard-status-icon {
    color: var(--warning-color);
}

.loan-dashboard-status-completed .loan-dashboard-status-icon {
    color: #95a5a6;
}

.loan-dashboard-status-info {
    flex: 1;
}

.loan-dashboard-status-label {
    font-size: 14px;
    color: var(--light-text);
    margin-bottom: 5px;
}

.loan-dashboard-status-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

.loan-dashboard-status-details {
    margin-left: 30px;
    padding-left: 30px;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
}

.loan-dashboard-next-due {
    font-size: 14px;
    margin-bottom: 5px;
}

.loan-dashboard-amount-due {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}

.loan-dashboard-status-actions {
    margin-left: 25px;
}

/* Key Figures */
.loan-dashboard-key-figures {
    margin-bottom: 30px;
}

.loan-dashboard-key-figures h3,
.loan-dashboard-repayment-progress h3,
.loan-dashboard-next-payment-card h3,
.loan-dashboard-additional-details h3,
.loan-dashboard-quick-documents h3 {
    font-size: 20px;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

.loan-dashboard-figures-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.loan-dashboard-figure-card {
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
}

.loan-dashboard-figure-card:hover {
    transform: translateY(-3px);
}

.loan-dashboard-figure-card-wide {
    grid-column: span 4;
    background-color: rgba(52, 152, 219, 0.05);
}

.loan-dashboard-figure-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(30, 90, 160, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
}

.loan-dashboard-figure-icon .dashicons {
    color: var(--primary-color);
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.loan-dashboard-figure-content {
    flex: 1;
}

.loan-dashboard-figure-title {
    font-size: 14px;
    color: var(--light-text);
    margin-bottom: 5px;
}

.loan-dashboard-figure-value {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 3px;
}

.loan-dashboard-figure-subtitle {
    font-size: 12px;
    color: var(--light-text);
}

/* Status-specific styling for figure cards */
.loan-dashboard-figure-card.loan-dashboard-status-approved {
    background-color: rgba(39, 174, 96, 0.1); /* Light green */
}
.loan-dashboard-figure-card.loan-dashboard-status-approved .loan-dashboard-figure-icon .dashicons,
.loan-dashboard-figure-card.loan-dashboard-status-approved .loan-dashboard-figure-value {
    color: var(--success-color);
}

.loan-dashboard-figure-card.loan-dashboard-status-pending {
    background-color: rgba(243, 156, 18, 0.1); /* Light yellow */
}
.loan-dashboard-figure-card.loan-dashboard-status-pending .loan-dashboard-figure-icon .dashicons,
.loan-dashboard-figure-card.loan-dashboard-status-pending .loan-dashboard-figure-value {
    color: var(--warning-color);
}

.loan-dashboard-figure-card.loan-dashboard-status-rejected {
    background-color: rgba(231, 76, 60, 0.1); /* Light red */
}
.loan-dashboard-figure-card.loan-dashboard-status-rejected .loan-dashboard-figure-icon .dashicons,
.loan-dashboard-figure-card.loan-dashboard-status-rejected .loan-dashboard-figure-value {
    color: var(--accent-color);
}

.loan-dashboard-figure-card.loan-dashboard-status-active {
    background-color: rgba(39, 174, 96, 0.1); /* Light green */
}
.loan-dashboard-figure-card.loan-dashboard-status-active .loan-dashboard-figure-icon .dashicons,
.loan-dashboard-figure-card.loan-dashboard-status-active .loan-dashboard-figure-value {
    color: var(--success-color);
}

.loan-dashboard-figure-card.loan-dashboard-status-completed {
    background-color: rgba(149, 165, 166, 0.1); /* Light gray */
}
.loan-dashboard-figure-card.loan-dashboard-status-completed .loan-dashboard-figure-icon .dashicons,
.loan-dashboard-figure-card.loan-dashboard-status-completed .loan-dashboard-figure-value {
    color: #7f8c8d; /* Darker gray for text */
}

/* Ensure title and subtitle in status cards remain readable */
.loan-dashboard-figure-card.loan-dashboard-status-approved .loan-dashboard-figure-title,
.loan-dashboard-figure-card.loan-dashboard-status-approved .loan-dashboard-figure-subtitle,
.loan-dashboard-figure-card.loan-dashboard-status-pending .loan-dashboard-figure-title,
.loan-dashboard-figure-card.loan-dashboard-status-pending .loan-dashboard-figure-subtitle,
.loan-dashboard-figure-card.loan-dashboard-status-rejected .loan-dashboard-figure-title,
.loan-dashboard-figure-card.loan-dashboard-status-rejected .loan-dashboard-figure-subtitle,
.loan-dashboard-figure-card.loan-dashboard-status-active .loan-dashboard-figure-title,
.loan-dashboard-figure-card.loan-dashboard-status-active .loan-dashboard-figure-subtitle,
.loan-dashboard-figure-card.loan-dashboard-status-completed .loan-dashboard-figure-title,
.loan-dashboard-figure-card.loan-dashboard-status-completed .loan-dashboard-figure-subtitle {
    color: var(--light-text); /* Keep using the standard light text color */
}


/* Section Card Styles (for grouping sections like Loan Overview, Details, etc.) */
.loan-dashboard-section-card {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.loan-dashboard-section-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.07);
}

/* Headings within these section cards are already styled by existing h3 rules */

/* Adjustments for grids inside the new section cards */
.loan-dashboard-section-card .loan-dashboard-details-grid {
    background-color: transparent; /* Remove inner card background */
    padding: 0;                   /* Remove inner card padding */
    border-radius: 0;             /* Remove inner card border-radius */
    box-shadow: none;             /* Remove inner card shadow */
    /* Grid layout (gap, columns) should remain */
}

/* Note: .loan-dashboard-figures-grid (within .loan-dashboard-key-figures)
   doesn't have conflicting styles. Its children, .loan-dashboard-figure-card,
   will correctly appear as smaller cards within the larger section card. */

/* Repayment Progress */
.loan-dashboard-repayment-progress {
    margin-bottom: 30px;
}

.loan-dashboard-progress-container {
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.loan-dashboard-progress-stats {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.loan-dashboard-progress-paid,
.loan-dashboard-progress-remaining {
    width: 20%;
}

.loan-dashboard-progress-indicator {
    flex: 1;
    padding: 0 20px;
}

.loan-dashboard-progress-bar {
    height: 10px;
    background-color: #f5f5f5;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 8px;
}

.loan-dashboard-progress-fill {
    height: 100%;
    background-color: var(--success-color);
    border-radius: 5px;
}

.loan-dashboard-progress-percentage {
    text-align: center;
    font-size: 14px;
    color: var(--light-text);
}

.loan-dashboard-progress-label {
    font-size: 13px;
    color: var(--light-text);
    margin-bottom: 5px;
}

.loan-dashboard-progress-value {
    font-size: 18px;
    font-weight: 600;
}

.loan-dashboard-progress-paid .loan-dashboard-progress-value {
    color: var(--success-color);
}

.loan-dashboard-progress-remaining .loan-dashboard-progress-value {
    color: var(--primary-color);
}

.loan-dashboard-payment-summary {
    display: flex;
    justify-content: space-around;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.loan-dashboard-payment-status-count {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
}

.loan-dashboard-payment-paid .loan-dashboard-payment-status-count {
    color: var(--success-color);
}

.loan-dashboard-payment-due .loan-dashboard-payment-status-count {
    color: var(--warning-color);
}

.loan-dashboard-payment-upcoming .loan-dashboard-payment-status-count {
    color: var(--info-color);
}

.loan-dashboard-payment-status-label {
    font-size: 14px;
    color: var(--light-text);
}

/* Next Payment Card */
.loan-dashboard-next-payment-card {
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.loan-dashboard-next-payment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.loan-dashboard-next-payment-header h3 {
    margin: 0;
    padding: 0;
    border: none;
    font-size: 20px;
}

.loan-dashboard-next-payment-number {
    font-size: 14px;
    color: var(--light-text);
    background-color: rgba(0, 0, 0, 0.05);
    padding: 5px 10px;
    border-radius: 20px;
}

.loan-dashboard-next-payment-details-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.loan-dashboard-next-payment-detail {
    text-align: center;
    padding: 15px 10px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.loan-dashboard-next-payment-label {
    font-size: 13px;
    color: var(--light-text);
    margin-bottom: 8px;
}

.loan-dashboard-next-payment-value {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.loan-dashboard-next-payment-amount {
    color: var(--primary-color);
    font-size: 22px;
}

.loan-dashboard-next-payment-info {
    font-size: 12px;
    color: var(--light-text);
}

.loan-dashboard-next-payment-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Loan Details */
.loan-dashboard-additional-details {
    margin-bottom: 30px;
}

.loan-dashboard-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.loan-dashboard-detail-item {
    margin-bottom: 5px;
}

.loan-dashboard-detail-label {
    font-size: 13px;
    color: var(--light-text);
    margin-bottom: 5px;
}

.loan-dashboard-detail-value {
    font-size: 16px;
    font-weight: 500;
}

/* Quick Documents */
.loan-dashboard-quick-documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 100%;
}

/* Document and Insurance Tab Styles with proper full width */
#documents table,
#loan-insurance table,
#escrow-account table,
#profile table,
#security table,
#compliance table,
#support table,
#financial-analysis table,
#two-factor table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
}

/* Panel headlines */
.loan-dashboard-panel h2 {
    font-size: 30px;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 28px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
    display: inline-block;
    letter-spacing: -0.3px;
}

.loan-dashboard-panel h2:after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%; /* Full width of the heading */
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color) 70%, rgba(30, 90, 160, 0.1) 100%);
    border-radius: 3px;
    animation: headingShine 2.5s infinite alternate;
}

@keyframes headingShine {
    from { background-position: 200% center; }
    to { background-position: -200% center; }
}

.loan-dashboard-quick-document {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
}

.loan-dashboard-quick-document:hover {
    transform: translateY(-3px);
}

.loan-dashboard-quick-document-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: rgba(30, 90, 160, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
}

.loan-dashboard-quick-document-icon .dashicons {
    color: var(--primary-color);
}

.loan-dashboard-quick-document-info {
    flex: 1;
}

.loan-dashboard-quick-document-title {
    font-weight: 500;
}

/* Make document action links always visible */
.loan-dashboard-quick-document-actions a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    display: inline-block;
    margin-left: 10px;
    transition: opacity 0.2s ease;
}

.loan-dashboard-quick-document-actions a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.loan-dashboard-more-documents {
    display: flex;
    align-items: center;
    justify-content: center;
}

.loan-dashboard-more-documents-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.loan-dashboard-more-documents-link:hover {
    text-decoration: underline;
}

.loan-dashboard-more-documents-link .dashicons {
    margin-left: 5px;
}

/* Dashboard Main Layout */
.loan-dashboard-content {
    margin-top: 30px;
}

.loan-dashboard-loan-selector {
    margin-bottom: 30px;
    padding: 20px;
    border-radius: 8px;
    background-color: rgba(30, 90, 160, 0.04);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.loan-dashboard-loan-selector label {
    margin-right: 16px;
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 15px;
    letter-spacing: 0.2px;
}

.loan-dashboard-select {
    padding: 12px 16px;
    border: 1px solid rgba(30, 90, 160, 0.2);
    border-radius: 6px;
    font-size: 16px;
    min-width: 300px;
    background-color: white;
    color: var(--text-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.loan-dashboard-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 90, 160, 0.1);
}

/* Enhanced Loan Selector */
.loan-dashboard-enhanced-loan-selector {
    margin-bottom: 25px;
    border-radius: 10px;
    background-color: white;
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
}

.loan-dashboard-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.loan-dashboard-selector-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--primary-color);
    font-weight: 600;
}

.loan-dashboard-loan-counts {
    display: flex;
    gap: 15px;
}

.loan-dashboard-loan-count {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 14px;
}

.loan-dashboard-count-number {
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 5px;
}

.loan-dashboard-active-loans .loan-dashboard-count-number {
    color: var(--success-color);
}

.loan-dashboard-pending-loans .loan-dashboard-count-number {
    color: var(--warning-color);
}

.loan-dashboard-completed-loans .loan-dashboard-count-number {
    color: #95a5a6;
}

.loan-dashboard-count-label {
    font-size: 12px;
    color: var(--light-text);
}

.loan-dashboard-loan-search {
    padding: 10px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.loan-dashboard-search-input-wrapper {
    position: relative;
}

.loan-dashboard-search-input-wrapper .dashicons {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--light-text);
}

.loan-dashboard-search-input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.loan-dashboard-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 90, 160, 0.1);
}

.loan-dashboard-selected-loan {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.loan-dashboard-selected-loan-title {
    font-size: 12px;
    color: var(--light-text);
    margin-bottom: 5px;
}

.loan-dashboard-selected-loan-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
}

.loan-dashboard-selected-loan-details {
    font-size: 14px;
    color: var(--light-text);
}

.loan-dashboard-button-select-loan {
    display: flex;
    align-items: center;
    background-color: transparent;
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.loan-dashboard-button-select-loan:hover {
    background-color: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.2);
}

.loan-dashboard-button-select-loan .dashicons {
    margin-right: 5px;
    font-size: 16px;
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.loan-dashboard-button-select-loan.active .dashicons {
    transform: rotate(180deg);
}

.loan-dashboard-loan-list-container {
    display: none;
    position: absolute;
    width: 100%;
    z-index: 100;
    background-color: white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 10px 10px;
    max-height: 400px;
}

.loan-dashboard-loan-list {
    max-height: 400px;
    overflow-y: auto;
}

.loan-dashboard-loan-group {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.loan-dashboard-loan-group:last-child {
    border-bottom: none;
}

.loan-dashboard-loan-group-header {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    background-color: rgba(0, 0, 0, 0.02);
}

.loan-dashboard-loan-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--text-color);
    transition: background-color 0.2s ease;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.loan-dashboard-loan-item:hover {
    background-color: rgba(30, 90, 160, 0.05);
}

.loan-dashboard-loan-item.selected {
    background-color: rgba(30, 90, 160, 0.1);
}

.loan-dashboard-loan-item-name {
    font-weight: 500;
    margin-bottom: 3px;
}

.loan-dashboard-loan-item-details {
    font-size: 13px;
    color: var(--light-text);
}

.loan-dashboard-loan-item-status {
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    padding: 4px 10px;
}

.loan-dashboard-status-active {
    background-color: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
}

.loan-dashboard-status-approved {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--info-color);
}

.loan-dashboard-status-pending {
    background-color: rgba(243, 156, 18, 0.1);
    color: var(--warning-color);
}

.loan-dashboard-status-completed {
    background-color: rgba(149, 165, 166, 0.1);
    color: #95a5a6;
}

.loan-dashboard-loan-list-empty {
    padding: 40px 20px;
    text-align: center;
}

.loan-dashboard-loan-list-empty-icon {
    margin-bottom: 15px;
}

.loan-dashboard-loan-list-empty-icon .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: var(--light-text);
}

.loan-dashboard-loan-list-empty-message {
    color: var(--light-text);
    font-size: 16px;
}

/* Fixed layout for main dashboard with stable dimensions */
.loan-dashboard-main {
    display: flex;
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: visible; /* Allow content to be visible */
    border: 1px solid rgba(0, 0, 0, 0.03);
    flex: 1; /* Take up available space */
    position: relative; /* Create positioning context */
    min-height: 650px; /* Slightly taller minimum height */
    transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
    backdrop-filter: blur(10px);
}

.loan-dashboard-main:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08), 0 3px 10px rgba(0, 0, 0, 0.03);
    transform: translateY(-2px);
}

/* Tab transition state */
.loan-dashboard-main.tab-transitioning {
    position: relative;
}

.loan-dashboard-main.tab-transitioning:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.03);
    z-index: 5;
    pointer-events: none;
    animation: tabTransitionPulse 0.5s ease;
}

@keyframes tabTransitionPulse {
    0% { opacity: 0; }
    50% { opacity: 0.2; }
    100% { opacity: 0; }
}

.loan-dashboard-sidebar {
    width: 280px;
    background-color: #f8faff; /* Slightly lighter blue tint for better contrast */
    background-image: linear-gradient(to bottom, rgba(245, 250, 255, 0.9), rgba(240, 248, 255, 0.95));
    border-right: 1px solid rgba(30, 90, 160, 0.05);
    overflow-y: auto; /* Allow scrolling if needed */
    flex-shrink: 0; /* Don't shrink */
    padding-top: 20px; /* Add more top spacing */
    box-shadow: inset -2px 0 8px -5px rgba(0, 0, 0, 0.05); /* Subtle inner shadow */
    border-radius: 16px 0 0 16px; /* Match the main container radius */
}

/* Mobile menu toggle positioning - BLACK WITH WHITE TEXT */
.loan-dashboard-mobile-menu-toggle {
    display: none;
    width: 100%;
    padding: 20px 25px;
    background: #000000 !important; /* BLACK BACKGROUND */
    color: white !important;
    border: 3px solid #ffffff !important;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    margin: 0 0 15px 0; /* SPACING BELOW BUTTON, ABOVE MERGED HEADER */
    box-sizing: border-box;
    position: relative;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4) !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.loan-dashboard-mobile-menu-toggle:hover {
    background: #333333 !important; /* DARK GRAY ON HOVER */
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
}

.loan-dashboard-mobile-menu-toggle.active {
    background: #444444 !important; /* DARK GRAY WHEN ACTIVE */
    border-color: #ffffff !important; /* WHITE BORDER WHEN ACTIVE */
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.8) !important;
}

/* Ensure tabs are always visible on desktop */
@media (min-width: 769px) {
    .loan-dashboard-tabs {
        display: block !important;
    }
}

/* Tab Content Container */
.loan-dashboard-tab-content {
    flex: 1; /* Take remaining width */
    background-color: #fff;
    position: relative; /* For positioning panels */
    overflow: auto; /* Enable scrolling */
}

/* Tab Panels with display transitions for reliable visibility */
.loan-dashboard-panel {
    display: none; /* Hide inactive panels */
    padding: 35px 40px;
    width: 100%; /* Full width */
    box-sizing: border-box;
    animation: fadeIn 0.3s cubic-bezier(0.19, 1, 0.22, 1); /* Add smoother fade-in animation */
}

@keyframes fadeIn {
    from {
        opacity: 0.7;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loan-dashboard-panel.active {
    display: block; /* Show active panel */
}

/* Sidebar Tabs */
.loan-dashboard-tabs {
    list-style: none;
    margin: 0;
    padding: 0;
}

.loan-dashboard-tabs li {
    margin: 5px 0;
    padding: 0;
}

.loan-dashboard-tabs li:first-child {
    margin-top: 12px;
}

.loan-dashboard-tab {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    color: var(--secondary-color);
    text-decoration: none;
    border-left: 4px solid transparent;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    font-size: 15px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    margin: 3px 12px;
    border-radius: 0 10px 10px 0;
    letter-spacing: 0.2px;
}

.loan-dashboard-tab:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background-color: rgba(30, 90, 160, 0.05);
    z-index: -1;
    transition: width 0.3s ease-out;
}

.loan-dashboard-tab:hover {
    background-color: rgba(30, 90, 160, 0.06);
    color: var(--primary-color);
    transform: translateX(3px);
}

.loan-dashboard-tab:hover:before {
    width: 100%;
}

.loan-dashboard-tab.active {
    background-color: rgba(30, 90, 160, 0.12);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(30, 90, 160, 0.15);
}

.loan-dashboard-tab .dashicons {
    margin-right: 16px;
    font-size: 18px;
    width: 36px;
    height: 36px;
    color: inherit;
    opacity: 0.85;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(30, 90, 160, 0.06);
    padding: 0;
    border-radius: 10px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    flex-shrink: 0;
    line-height: 1 !important;
    text-align: center !important;
    vertical-align: middle !important;
    position: relative;
}

.loan-dashboard-tab .dashicons:before {
    vertical-align: middle !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px !important;
}

.loan-dashboard-tab:hover .dashicons {
    opacity: 1;
    transform: scale(1.08) rotate(2deg);
    background: rgba(30, 90, 160, 0.1);
}

.loan-dashboard-tab.active .dashicons {
    opacity: 1;
    transform: scale(1.12);
    background: linear-gradient(135deg, rgba(30, 90, 160, 0.18), rgba(30, 90, 160, 0.25));
    color: var(--primary-color);
    box-shadow: 0 3px 8px rgba(30, 90, 160, 0.15);
}

/* CONSOLIDATED BUTTON STYLES - SINGLE SOURCE OF TRUTH */
.loan-dashboard-button {
    /* Core Display Properties */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
    
    /* Dimensions and Spacing */
    padding: 14px 28px !important;
    min-height: 48px !important;
    min-width: 120px !important;
    border-radius: 8px !important;
    border: none !important;
    
    /* Typography */
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    letter-spacing: 0.3px !important;
    text-decoration: none !important;
    text-align: center !important;
    color: #ffffff !important;
    
    /* Background and Colors */
    background: linear-gradient(135deg, var(--primary-color) 0%, #174a84 100%) !important;
    background-color: var(--primary-color) !important; /* Fallback */
    
    /* Effects and Interactions */
    box-shadow: 0 4px 12px rgba(30, 90, 160, 0.25) !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    
    /* Positioning */
    position: relative !important;
    z-index: 10 !important;
    overflow: hidden !important;
}

/* Button Hover State */
.loan-dashboard-button:hover {
    background: linear-gradient(135deg, #174a84 0%, #0d355f 100%) !important;
    background-color: #174a84 !important; /* Fallback */
    color: #ffffff !important;
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 6px 20px rgba(30, 90, 160, 0.4) !important;
    text-decoration: none !important;
}

/* Button Active State */
.loan-dashboard-button:active {
    transform: translateY(-1px) scale(0.98) !important;
    box-shadow: 0 3px 10px rgba(30, 90, 160, 0.3) !important;
}

/* Button Focus State */
.loan-dashboard-button:focus {
    outline: 2px solid #ffffff !important;
    outline-offset: 2px !important;
    color: #ffffff !important;
}

/* Remove conflicting pseudo-elements */
.loan-dashboard-button:before,
.loan-dashboard-button:after {
    display: none !important;
}

.loan-dashboard-button-small {
    padding: 8px 18px;
    font-size: 13px;
    border-radius: 10px;
}

.loan-dashboard-button-secondary {
    background: white;
    color: var(--primary-color);
    border: 1.5px solid var(--primary-color);
    box-shadow: 0 2px 6px rgba(30, 90, 160, 0.1);
    opacity: 1;
    visibility: visible;
    display: inline-flex;
    background: linear-gradient(to bottom, #ffffff, #f9fbff);
}

.loan-dashboard-button-secondary:hover {
    background: rgba(30, 90, 160, 0.05);
    color: var(--primary-color);
    border-color: #174a84;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(30, 90, 160, 0.15);
}

/* Messages */
.loan-dashboard-message {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 30px;
    display: flex;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: var(--shadow);
}

.loan-dashboard-message-icon {
    font-size: 32px;
    margin-right: 20px;
}

.loan-dashboard-message-icon .dashicons {
    width: 50px;
    height: 50px;
    font-size: 50px;
    color: var(--primary-color);
}

.loan-dashboard-login-required .dashicons,
.loan-dashboard-plugin-missing .dashicons {
    color: var(--warning-color);
}

.loan-dashboard-loan-not-found .dashicons,
.loan-dashboard-schedule-not-found .dashicons {
    color: var(--info-color);
}

.loan-dashboard-message-content h2 {
    margin-top: 0;
    color: var(--secondary-color);
}

.loan-dashboard-no-loans {
    text-align: center;
    padding: 30px;
    color: var(--light-text);
}

/* Responsive styles */
@media (max-width: 1100px) {
    .loan-dashboard-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .loan-dashboard-figures-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .loan-dashboard-next-payment-details-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .loan-dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .loan-dashboard-user-info {
        margin-top: 10px;
    }

    .loan-dashboard-metrics-grid {
        grid-template-columns: 1fr;
    }

    .loan-dashboard-figures-grid {
        grid-template-columns: 1fr;
    }

    .loan-dashboard-loan-grid {
        grid-template-columns: 1fr;
    }

    .loan-dashboard-tab-nav {
        flex-wrap: wrap;
    }

    .loan-dashboard-tab-button {
        flex: 1;
        text-align: center;
        padding: 10px;
        font-size: 14px;
    }

    .loan-dashboard-next-payment {
        flex-direction: column;
    }

    .loan-dashboard-next-payment-label {
        margin-bottom: 5px;
    }

    .loan-dashboard-next-payment-info {
        flex-direction: column;
    }

    .loan-dashboard-next-payment-date {
        margin-right: 0;
        padding-right: 0;
        border-right: none;
        margin-bottom: 5px;
    }

    /* Enhanced overview responsive styles */
    .loan-dashboard-status-banner {
        flex-wrap: wrap;
    }

    .loan-dashboard-status-details {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        margin-top: 15px;
        width: 100%;
    }

    .loan-dashboard-status-actions {
        margin-left: 0;
        margin-top: 15px;
        width: 100%;
        text-align: center;
    }

    .loan-dashboard-progress-stats {
        flex-direction: column;
    }

    .loan-dashboard-progress-paid,
    .loan-dashboard-progress-remaining {
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }

    .loan-dashboard-progress-indicator {
        width: 100%;
        padding: 15px 0;
    }

    .loan-dashboard-payment-summary {
        flex-direction: column;
    }

    .loan-dashboard-payment-status-item {
        margin-bottom: 15px;
    }

    .loan-dashboard-next-payment-details-grid {
        grid-template-columns: 1fr;
    }

    .loan-dashboard-next-payment-actions {
        flex-direction: column;
        gap: 10px;
    }

    .loan-dashboard-details-grid {
        grid-template-columns: 1fr;
    }

    .loan-dashboard-quick-documents-grid {
        grid-template-columns: 1fr;
    }

    .loan-dashboard-figure-card-wide {
        grid-column: span 1;
    }

    /* Enhanced responsive sidebar layout - Hamburger Menu */
    .loan-dashboard-main {
        flex-direction: column;
        max-height: none;
        height: auto;
        position: relative;
    }

    .loan-dashboard-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        border-radius: 0;
        background-color: #f8faff;
        background-image: linear-gradient(to bottom, rgba(245, 250, 255, 0.9), rgba(240, 248, 255, 0.95));
        padding: 0;
        overflow: visible;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        position: relative;
    }

    /* Show mobile menu toggle on mobile */
    .loan-dashboard-mobile-menu-toggle {
        display: block;
    }

    /* Mobile Menu Dropdown - positioned relative to container */
    .loan-dashboard-mobile-menu-container .loan-dashboard-tabs {
        display: none;
        flex-direction: column;
        padding: 0;
        gap: 0;
        background-color: white;
        border-radius: 0 0 16px 16px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        overflow: hidden;
        animation: slideDown 0.3s ease-out;
        position: absolute;
        top: 100%; /* Position directly below the button */
        left: 0;
        right: 0;
        width: 100%;
        max-height: 80vh;
        z-index: 9999;
        overflow-y: auto;
        margin: 0;
        border: 2px solid rgba(0, 0, 0, 0.1);
        border-top: none; /* Remove top border to connect with button */
        margin-top: -2px; /* Overlap slightly to connect with button */
    }
    
    /* Show dropdown when active */
    .loan-dashboard-mobile-menu-container .loan-dashboard-tabs.active {
        display: flex;
    }


    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-100%);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Mobile dropdown menu header */
    .loan-dashboard-mobile-menu-container .loan-dashboard-tabs::before {
        content: 'Dashboard Navigation';
        background: linear-gradient(135deg, #1e5aa0 0%, #174a84 100%);
        color: white;
        padding: 20px;
        font-size: 18px;
        font-weight: 700;
        text-align: center;
        position: sticky;
        top: 0;
        z-index: 10;
        border-bottom: 2px solid rgba(0, 0, 0, 0.1);
        flex-shrink: 0;
        border-radius: 0;
    }

    /* Mobile dropdown list items */
    .loan-dashboard-mobile-menu-container .loan-dashboard-tabs li {
        flex: none;
        min-width: 0;
        margin: 0;
        max-width: none;
        border-bottom: 2px solid rgba(0, 0, 0, 0.08);
    }

    .loan-dashboard-mobile-menu-container .loan-dashboard-tabs li:last-child {
        border-bottom: none;
    }

    /* Mobile dropdown tab styling */
    .loan-dashboard-mobile-menu-container .loan-dashboard-tab {
        justify-content: flex-start;
        align-items: center;
        padding: 18px 25px;
        font-size: 16px;
        font-weight: 600;
        border-left: none;
        border-bottom: none;
        border-radius: 0;
        margin: 0;
        white-space: nowrap;
        min-height: 60px;
        background-color: transparent;
        transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
        text-align: left;
        display: flex;
        flex-direction: row;
        gap: 12px;
        width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        color: #333333 !important;
        text-decoration: none !important;
        position: relative;
    }

    .loan-dashboard-mobile-menu-container .loan-dashboard-tab:hover {
        background-color: rgba(30, 90, 160, 0.08);
        transform: translateX(10px);
        box-shadow: inset 5px 0 0 var(--primary-color);
        color: var(--primary-color) !important;
        text-decoration: none !important;
    }

    .loan-dashboard-mobile-menu-container .loan-dashboard-tab.active {
        border-left: 6px solid var(--primary-color);
        background: linear-gradient(90deg, rgba(30, 90, 160, 0.12) 0%, rgba(30, 90, 160, 0.05) 100%);
        color: var(--primary-color) !important;
        font-weight: 700;
        box-shadow: inset 0 0 20px rgba(30, 90, 160, 0.1);
        transform: translateX(15px);
        text-decoration: none !important;
    }

    /* Show icons in mobile dropdown menu */
    .loan-dashboard-mobile-menu-container .loan-dashboard-tab .dashicons {
        display: inline-block !important;
        font-size: 20px;
        color: var(--primary-color);
        opacity: 0.7;
        transition: all 0.3s ease;
    }
    
    .loan-dashboard-mobile-menu-container .loan-dashboard-tab:hover .dashicons,
    .loan-dashboard-mobile-menu-container .loan-dashboard-tab.active .dashicons {
        opacity: 1;
        transform: scale(1.1);
    }

    /* Tab content area improvements for mobile */
    .loan-dashboard-tab-content {
        border-radius: 0 0 16px 16px;
        background-color: #fff;
        min-height: 50vh;
    }

    .loan-dashboard-panel {
        padding: 25px 20px;
        min-height: 50vh;
    }

    .loan-dashboard-panel h2 {
        font-size: 24px;
        margin-bottom: 20px;
        text-align: center;
        color: var(--primary-color);
    }

    .loan-dashboard-select {
        width: 100%;
        min-width: auto;
    }

    /* Responsive document items */
    .loan-dashboard-document-item {
        flex-direction: column;
    }

    .loan-dashboard-document-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .loan-dashboard-document-details {
        margin-bottom: 10px;
        text-align: center;
    }

    .loan-dashboard-document-actions {
        justify-content: center;
    }

    /* Responsive financial charts */
    .loan-dashboard-financial-charts {
        grid-template-columns: 1fr;
        overflow-x: hidden;
        max-width: 100%;
    }

    .loan-dashboard-chart-container {
        padding: 15px;
        max-width: 100%;
    }

    .loan-dashboard-chart-container canvas {
        max-width: 100% !important;
        height: auto !important;
    }

    /* User info header responsive styles */
    .loan-dashboard-user-info-header {
        flex-direction: column;
        text-align: center;
    }

    .loan-dashboard-user-avatar {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .loan-dashboard-user-meta {
        justify-content: center;
    }

    .loan-dashboard-user-actions {
        margin-left: 0;
        margin-top: 20px;
    }

    /* Enhanced loan selector responsive styles */
    .loan-dashboard-selector-header {
        flex-direction: column;
    }

    .loan-dashboard-loan-counts {
        margin-top: 15px;
    }

    .loan-dashboard-selected-loan {
        flex-direction: column;
    }

    .loan-dashboard-selected-loan-info {
        margin-bottom: 15px;
        text-align: center;
    }
}

/* Layout variations */
.loan-dashboard-layout-compact .loan-dashboard-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
}

.loan-dashboard-layout-compact .loan-dashboard-metrics-grid {
    gap: 15px;
}

.loan-dashboard-layout-compact .loan-dashboard-metric-card {
    padding: 15px;
}

.loan-dashboard-layout-compact .loan-dashboard-loan-header {
    padding: 15px;
}

.loan-dashboard-layout-compact .loan-dashboard-loan-details {
    padding: 15px;
}

.loan-dashboard-layout-expanded .loan-dashboard-metrics-grid {
    gap: 30px;
}

.loan-dashboard-layout-expanded .loan-dashboard-metric-card {
    padding: 25px;
}

.loan-dashboard-layout-expanded .loan-dashboard-loan-grid {
    gap: 30px;
}

.loan-dashboard-layout-expanded .loan-dashboard-loan-header {
    padding: 25px;
}

.loan-dashboard-layout-expanded .loan-dashboard-loan-details {
    padding: 25px;
}

/* Page template styles */
.loan-dashboard-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.loan-dashboard-page-header {
    margin-bottom: 30px;
}

.loan-dashboard-breadcrumbs {
    font-size: 14px;
    color: var(--light-text);
    margin-bottom: 20px;
}

.loan-dashboard-breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
}

.loan-dashboard-breadcrumbs a:hover {
    text-decoration: underline;
}

.loan-dashboard-breadcrumb-separator {
    margin: 0 8px;
}

/* Payment Schedule specific styles */
.loan-dashboard-schedule-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.loan-dashboard-schedule-table th {
    background: linear-gradient(to bottom, rgba(30, 90, 160, 0.09), rgba(30, 90, 160, 0.12));
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 2px solid rgba(30, 90, 160, 0.1);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.7px;
    transition: background-color 0.2s ease;
}

.loan-dashboard-schedule-table th:first-child {
    border-top-left-radius: 12px;
}

.loan-dashboard-schedule-table th:last-child {
    border-top-right-radius: 12px;
}

.loan-dashboard-schedule-table td {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
    font-size: 14px;
}

.loan-dashboard-schedule-table tr:last-child td {
    border-bottom: none;
}

.loan-dashboard-schedule-table tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}

.loan-dashboard-schedule-table tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}

.loan-dashboard-schedule-table tr:nth-child(even) {
    background-color: rgba(30, 90, 160, 0.02);
}

.loan-dashboard-schedule-table tr:hover td {
    background-color: rgba(30, 90, 160, 0.05);
    transform: translateY(-1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

/* Special styling for status indicators */
.loan-dashboard-payment-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    min-width: 90px;
}

.loan-dashboard-payment-status:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0) 30%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 70%);
    background-size: 200% 100%;
    background-position: -100% 0;
    transition: background-position 0.8s ease-in-out;
}

.loan-dashboard-payment-status:hover:before {
    background-position: 200% 0;
}

.loan-dashboard-payment-status:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.09);
}

.loan-dashboard-payment-status-paid {
    background: linear-gradient(150deg, rgba(39, 174, 96, 0.9), rgba(39, 174, 96, 0.7));
    color: white;
    border: none;
}

.loan-dashboard-payment-status-due {
    background: linear-gradient(150deg, rgba(243, 156, 18, 0.9), rgba(243, 156, 18, 0.7));
    color: white;
    border: none;
}

.loan-dashboard-payment-status-upcoming {
    background: linear-gradient(150deg, rgba(52, 152, 219, 0.9), rgba(52, 152, 219, 0.7));
    color: white;
    border: none;
}

/* Financial Analysis */
.loan-dashboard-financial-charts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
    max-width: 100%;
    overflow: hidden;
}

.loan-dashboard-chart-container {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    width: 100%;
    overflow: hidden;
}

.loan-dashboard-chart-container canvas {
    max-width: 100%;
    height: auto !important;
}

.loan-dashboard-chart-container:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

.loan-dashboard-chart-container h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
    color: var(--primary-color);
    text-align: center;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(30, 90, 160, 0.1);
    letter-spacing: 0.2px;
}

.loan-dashboard-chart-container canvas {
    margin-top: 15px;
    margin-bottom: 15px;
}

/* Loan Status Colors in Details View */
.loan-dashboard-status-pending {
    color: #e6b800; /* Dark Yellow */
    font-weight: bold;
}

.loan-dashboard-status-approved,
.loan-dashboard-status-active { /* Assuming active is also green */
    color: #28a745; /* Green */
    font-weight: bold;
}

.loan-dashboard-status-rejected {
    color: #dc3545; /* Red */
    font-weight: bold;
}

/* Color coding for the active 'Overview' tab text based on loan status */
.loan-dashboard-sidebar .loan-dashboard-tab.active.loan-dashboard-status-pending {
    color: #e6b800; /* Dark Yellow */
}
.loan-dashboard-sidebar .loan-dashboard-tab.active.loan-dashboard-status-approved,
.loan-dashboard-sidebar .loan-dashboard-tab.active.loan-dashboard-status-active {
    color: #28a745; /* Green */
}
.loan-dashboard-sidebar .loan-dashboard-tab.active.loan-dashboard-status-rejected {
    color: #dc3545; /* Red */
}

/* Chart Loading and Error States */
.loan-dashboard-chart-loading,
.loan-dashboard-chart-error,
.loan-dashboard-chart-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    padding: 40px 20px;
    text-align: center;
    color: var(--light-text);
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.loan-dashboard-chart-loading .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: loan-dashboard-spin 1s linear infinite;
    margin-bottom: 15px;
}

.loan-dashboard-chart-error {
    color: var(--accent-color);
    background: #fff5f5;
    border-color: #fed7d7;
}

.loan-dashboard-chart-loading p,
.loan-dashboard-chart-error p,
.loan-dashboard-chart-fallback {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}

@keyframes loan-dashboard-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ================================================================================================
   KYC VERIFICATION STYLES FOR LOAN DASHBOARD
   ================================================================================================ */

/* KYC Content Container */
.loan-dashboard-kyc-content {
    padding: 20px;
}

/* KYC Status Banner */
.loan-dashboard-kyc-status-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-left: 5px solid;
}

.loan-dashboard-kyc-status-banner.kyc-status-complete {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-left-color: #28a745;
    color: #155724;
}

.loan-dashboard-kyc-status-banner.kyc-status-pending {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left-color: #ffc107;
    color: #856404;
}

.loan-dashboard-kyc-status-banner.kyc-status-rejected {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-left-color: #dc3545;
    color: #721c24;
}

.loan-dashboard-kyc-status-banner.kyc-status-incomplete {
    background: linear-gradient(135deg, #e2e3e5 0%, #d1ecf1 100%);
    border-left-color: #6c757d;
    color: #383d41;
}

.kyc-status-main h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
}

.kyc-status-summary {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.4;
}

.kyc-status-stats {
    display: flex;
    gap: 20px;
}

.kyc-stat {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.kyc-stat-number {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.kyc-stat-label {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    opacity: 0.8;
}

/* KYC Requirements */
.loan-dashboard-kyc-requirements {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.loan-dashboard-kyc-requirements h3 {
    margin: 0 0 15px 0;
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 600;
}

.kyc-requirements-list {
    margin: 15px 0 0 20px;
    padding: 0;
}

.kyc-requirements-list li {
    margin-bottom: 8px;
    color: var(--text-color);
    font-size: 14px;
}

/* KYC Upload Section */
.loan-dashboard-kyc-upload {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.loan-dashboard-kyc-upload h3 {
    margin: 0 0 15px 0;
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
}

/* KYC Error State */
.loan-dashboard-kyc-error {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin-bottom: 25px;
}

.loan-dashboard-kyc-error h3 {
    color: var(--accent-color);
    margin-bottom: 10px;
}

/* Document History */
.loan-dashboard-kyc-history {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.loan-dashboard-kyc-history h3 {
    margin: 0 0 15px 0;
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
}

.kyc-documents-table {
    overflow-x: auto;
}

.kyc-documents-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.kyc-documents-table th,
.kyc-documents-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.kyc-documents-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 14px;
}

.kyc-documents-table td {
    font-size: 14px;
}

.kyc-doc-row.kyc-doc-approved {
    background: rgba(40, 167, 69, 0.05);
}

.kyc-doc-row.kyc-doc-pending {
    background: rgba(255, 193, 7, 0.05);
}

.kyc-doc-row.kyc-doc-rejected {
    background: rgba(220, 53, 69, 0.05);
}

.kyc-doc-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 13px;
}

.kyc-status-approved {
    background: #d4edda;
    color: #155724;
}

.kyc-status-pending {
    background: #fff3cd;
    color: #856404;
}

.kyc-status-rejected {
    background: #f8d7da;
    color: #721c24;
}

.kyc-view-doc-btn {
    background: var(--info-color);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.kyc-view-doc-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
    text-decoration: none;
    color: white;
}

/* KYC Help Section */
.loan-dashboard-kyc-help {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
}

.loan-dashboard-kyc-help h3 {
    margin: 0 0 15px 0;
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
}

.kyc-help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.kyc-help-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
}

.kyc-help-item h4 {
    margin: 0 0 8px 0;
    color: var(--secondary-color);
    font-size: 14px;
    font-weight: 600;
}

.kyc-help-item p {
    margin: 0;
    font-size: 13px;
    color: var(--light-text);
    line-height: 1.4;
}

/* Responsive Design for KYC */
@media (max-width: 768px) {
    .loan-dashboard-kyc-status-banner {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .kyc-status-stats {
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .kyc-help-grid {
        grid-template-columns: 1fr;
    }
    
    .kyc-documents-table {
        font-size: 13px;
    }
    
    .kyc-documents-table th,
    .kyc-documents-table td {
        padding: 8px;
    }
}

/* ================================================================================================
   LOAN APPLICATION FORM STYLES FOR DASHBOARD
   ================================================================================================ */

/* Loan Application Content Container */
.loan-dashboard-loan-application-content {
    padding: 20px;
}

/* Application Header */
.loan-application-intro {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
}

.loan-application-header h3 {
    margin: 0 0 15px 0;
    color: var(--primary-color);
    font-size: 20px;
    font-weight: 600;
}

.loan-application-description {
    color: var(--light-text);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.loan-application-benefits h4 {
    margin: 0 0 15px 0;
    color: var(--secondary-color);
    font-size: 16px;
    font-weight: 600;
}

.loan-application-benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.loan-application-benefits-list li {
    padding: 8px 0;
    color: var(--text-color);
    font-size: 14px;
    position: relative;
    padding-left: 25px;
}

.loan-application-benefits-list li:before {
    content: "✓";
    color: var(--success-color);
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 8px;
}

/* Loan Application Form Container */
.loan-application-form-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    min-height: 400px;
}

.loan-application-form-wrapper {
    width: 100%;
}

/* Make loan form styles blend with dashboard */
.loan-application-form-wrapper .loan-form-container {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

.loan-application-form-wrapper .loan-form-step {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 20px;
}

.loan-application-form-wrapper .loan-form-field {
    margin-bottom: 15px;
}

.loan-application-form-wrapper input[type="text"],
.loan-application-form-wrapper input[type="email"],
.loan-application-form-wrapper input[type="tel"],
.loan-application-form-wrapper input[type="number"],
.loan-application-form-wrapper select,
.loan-application-form-wrapper textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.loan-application-form-wrapper input:focus,
.loan-application-form-wrapper select:focus,
.loan-application-form-wrapper textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(30, 90, 160, 0.1);
}

.loan-application-form-wrapper .loan-form-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.loan-application-form-wrapper .loan-form-button:hover {
    background: #1a4e8a;
    transform: translateY(-1px);
}

/* Application Error State */
.loan-application-error {
    text-align: center;
    padding: 40px 20px;
    color: var(--light-text);
}

.loan-application-error h3 {
    color: var(--accent-color);
    margin-bottom: 15px;
    font-size: 18px;
}

.loan-application-contact {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    margin-top: 20px;
    text-align: left;
}

.loan-application-contact h4 {
    margin: 0 0 10px 0;
    color: var(--secondary-color);
    font-size: 16px;
}

.loan-application-contact p {
    margin: 8px 0;
    font-size: 14px;
    color: var(--text-color);
}

/* Application Tips */
.loan-application-tips {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
}

.loan-application-tips h4 {
    margin: 0 0 20px 0;
    color: var(--primary-color);
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
}

.loan-application-tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.loan-application-tip {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.loan-application-tip:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.loan-application-tip h5 {
    margin: 0 0 10px 0;
    color: var(--secondary-color);
    font-size: 15px;
    font-weight: 600;
}

.loan-application-tip p {
    margin: 0;
    color: var(--light-text);
    font-size: 13px;
    line-height: 1.5;
}

/* Responsive Design for Loan Application */
@media (max-width: 768px) {
    .loan-dashboard-loan-application-content {
        padding: 15px;
    }
    
    .loan-application-intro,
    .loan-application-form-container,
    .loan-application-tips {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .loan-application-tips-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .loan-application-header h3 {
        font-size: 18px;
    }
    
    .loan-application-benefits-list li {
        font-size: 13px;
    }
}

/* ================================================================================================
   ENHANCED KYC VERIFICATION STYLES (PERSONAL, BUSINESS, FINANCIAL)
   ================================================================================================ */

/* KYC Category Tabs */
.kyc-categories-container {
    margin-top: 20px;
}

.kyc-category-tabs {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 25px;
    overflow-x: auto;
}

.kyc-category-tab {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: none;
    border: none;
    color: var(--light-text);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.kyc-category-tab:hover {
    color: var(--primary-color);
    background: rgba(30, 90, 160, 0.05);
}

.kyc-category-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: rgba(30, 90, 160, 0.08);
}

.kyc-category-tab .dashicons {
    margin-right: 8px;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.kyc-tab-badge {
    background: var(--warning-color);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
    min-width: 32px;
    text-align: center;
}

.kyc-category-tab.active .kyc-tab-badge {
    background: var(--primary-color);
}

/* KYC Category Panels */
.kyc-category-panel {
    display: none;
}

.kyc-category-panel.active {
    display: block;
    animation: fadeInKyc 0.3s ease;
}

@keyframes fadeInKyc {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.kyc-category-header {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.kyc-category-header h3 {
    margin: 0 0 8px 0;
    color: var(--primary-color);
    font-size: 18px;
    font-weight: 600;
}

.kyc-category-header p {
    margin: 0;
    color: var(--light-text);
    font-size: 14px;
    line-height: 1.5;
}

/* KYC Document Grid */
.kyc-document-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kyc-document-item {
    background: var(--card-bg);
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.kyc-document-item.has-document {
    border-color: var(--success-color);
    background: rgba(39, 174, 96, 0.02);
}

.kyc-document-item.status-pending {
    border-color: var(--warning-color);
    background: rgba(243, 156, 18, 0.02);
}

.kyc-document-item.status-rejected {
    border-color: var(--accent-color);
    background: rgba(231, 76, 60, 0.02);
}

.kyc-document-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #e9ecef;
    transition: background 0.3s ease;
}

.kyc-document-item.has-document::before {
    background: var(--success-color);
}

.kyc-document-item.status-pending::before {
    background: var(--warning-color);
}

.kyc-document-item.status-rejected::before {
    background: var(--accent-color);
}

/* KYC Document Header */
.kyc-doc-header h4 {
    margin: 0 0 8px 0;
    color: var(--text-color);
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}


.kyc-doc-description {
    margin: 0 0 15px 0;
    color: var(--light-text);
    font-size: 13px;
    line-height: 1.4;
}

/* KYC Status Display */
.kyc-doc-status-display {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.kyc-doc-info {
    flex: 1;
}

.kyc-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.kyc-status-badge.kyc-status-approved {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
}

.kyc-status-badge.kyc-status-pending {
    background: rgba(243, 156, 18, 0.1);
    color: var(--warning-color);
}

.kyc-status-badge.kyc-status-rejected {
    background: rgba(231, 76, 60, 0.1);
    color: var(--accent-color);
}

.kyc-doc-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.kyc-doc-meta small {
    color: var(--light-text);
    font-size: 12px;
}

.kyc-doc-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.kyc-view-btn, .kyc-reupload-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.kyc-view-btn {
    background: var(--info-color);
    color: white;
}

.kyc-view-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
}

.kyc-reupload-btn {
    background: var(--warning-color);
    color: white;
}

.kyc-reupload-btn:hover {
    background: #e67e22;
    transform: translateY(-1px);
}

.kyc-view-btn .dashicons, .kyc-reupload-btn .dashicons {
    margin-right: 4px;
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* KYC Upload Area */
.kyc-upload-area {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s ease;
}

.kyc-upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(30, 90, 160, 0.02);
}

.kyc-upload-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.kyc-upload-form input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
}

.kyc-upload-info {
    text-align: center;
}

.kyc-upload-info p {
    margin: 4px 0;
    font-size: 12px;
    color: var(--light-text);
}

.kyc-upload-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.kyc-upload-btn:hover {
    background: #1a4e8a;
    transform: translateY(-1px);
}

.kyc-upload-btn .dashicons {
    margin-right: 6px;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* ================================
 * COMPREHENSIVE MOBILE RESPONSIVE DESIGN
 * ================================ */

/* Enhanced Tablet Styles (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .loan-dashboard-container {
        padding: 20px;
    }
    
    .loan-dashboard-main {
        flex-direction: row; /* Keep sidebar on tablets */
    }
    
    .loan-dashboard-sidebar {
        width: 220px; /* Slightly smaller sidebar on tablets */
    }
    
    .loan-dashboard-tab {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .loan-dashboard-panel {
        padding: 25px 20px;
    }
    
    /* Adjust grid layouts for tablets */
    .financial-overview-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .financial-analysis-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .loan-dashboard-schedule-table {
        font-size: 14px;
    }
    
    .loan-dashboard-schedule-table th,
    .loan-dashboard-schedule-table td {
        padding: 12px 15px;
    }
}

/* Desktop hiding for mobile menu container and show sidebar */
@media (min-width: 769px) {
    .loan-dashboard-mobile-menu-container {
        display: none !important;
    }
    
    .loan-dashboard-sidebar {
        display: block !important;
    }
    
    .loan-dashboard-main {
        flex-direction: row !important;
    }
    
    .loan-dashboard-tab-content {
        width: auto !important;
        margin-left: auto !important;
    }
}

/* Enhanced Mobile Styles (320px - 768px) */
@media (max-width: 768px) {
    /* Standalone dashboard specific mobile adjustments */
    #standalone-dashboard {
        min-height: 100vh;
    }
    
    #standalone-dashboard #loan-dashboard-wrapper {
        padding-top: 55px; /* Reduce top padding on mobile */
    }
    
    .admin-bar-placeholder {
        padding: 8px 15px;
        height: 45px; /* Smaller admin bar on mobile */
    }
    
    .admin-bar-logo {
        font-size: 16px;
    }
    
    .admin-bar-user {
        font-size: 14px;
    }
    
    .admin-bar-user img {
        width: 24px;
        height: 24px;
    }
    
    .logout-link {
        font-size: 12px;
        padding: 3px 8px;
    }
    
    /* Enhanced container adjustments */
    .loan-dashboard-container {
        padding: 15px 10px;
        border-radius: 0;
        box-shadow: none;
    }
    
    .loan-dashboard-fullwidth-container {
        padding: 0;
    }
    
    /* Hide desktop sidebar on mobile */
    .loan-dashboard-sidebar {
        display: none !important;
    }
    
    /* Make main content full width when sidebar is hidden */
    .loan-dashboard-main {
        flex-direction: column !important;
    }
    
    .loan-dashboard-tab-content {
        width: 100% !important;
        margin-left: 0 !important;
    }
    
    /* Mobile Menu Container */
    .loan-dashboard-mobile-menu-container {
        position: relative;
        z-index: 1000;
        width: 100%;
        margin: 0 0 20px 0; /* Add bottom margin for spacing */
        padding: 0;
    }
    
    /* Mobile Menu Toggle Enhancements - BLACK WITH WHITE TEXT */
    .loan-dashboard-mobile-menu-toggle {
        display: block !important;
        width: 100%;
        padding: 25px 30px;
        background: #000000 !important; /* BLACK BACKGROUND */
        color: white !important;
        border: 4px solid #ffffff !important;
        border-radius: 12px;
        font-size: 20px;
        font-weight: 800;
        cursor: pointer;
        transition: all 0.3s ease;
        text-align: center;
        margin: 0 0 0 0; /* Remove bottom margin when dropdown is connected */
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
        position: relative !important;
        z-index: 10000 !important;
        text-decoration: none !important;
        text-transform: uppercase;
        letter-spacing: 2px;
    }
    
    
    .loan-dashboard-mobile-menu-toggle:hover {
        background: #333333 !important; /* DARK GRAY ON HOVER */
        transform: translateY(-3px) scale(1.02);
        color: white !important;
        text-decoration: none !important;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7) !important;
        border-color: #ffffff !important; /* WHITE BORDER ON HOVER */
    }
    
    .loan-dashboard-mobile-menu-toggle:focus {
        outline: 3px solid #ffffff !important; /* WHITE OUTLINE */
        outline-offset: 3px;
        color: white !important;
        text-decoration: none !important;
    }
    
    .loan-dashboard-mobile-menu-toggle.active {
        background: #444444 !important; /* DARK GRAY WHEN ACTIVE */
        border-color: #ffffff !important; /* WHITE BORDER WHEN ACTIVE */
        border-radius: 12px 12px 0 0; /* Square bottom corners when dropdown is open */
        color: white !important;
        text-decoration: none !important;
        box-shadow: 0 15px 45px rgba(0, 0, 0, 0.8) !important;
        border-bottom: none; /* Remove bottom border to connect with dropdown */
        margin-bottom: 0; /* Ensure no gap */
    }
    
    @keyframes pulse {
        0% { box-shadow: 0 15px 45px rgba(0, 0, 0, 0.8); }
        50% { box-shadow: 0 20px 50px rgba(0, 0, 0, 1.0); }
        100% { box-shadow: 0 15px 45px rgba(0, 0, 0, 0.8); }
    }
    
    
    /* Enhanced Mobile Sidebar */
    .loan-dashboard-sidebar {
        background: white;
        border-radius: 0;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        margin-bottom: 0;
        position: relative;
        z-index: 999;
    }
    
    /* Mobile Navigation Tabs */
    .loan-dashboard-tabs {
        background: white;
        border-radius: 0;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
        border: 1px solid rgba(0, 0, 0, 0.1);
        max-height: 70vh;
        overflow-y: auto;
        /* Custom scrollbar for mobile */
        scrollbar-width: thin;
        scrollbar-color: var(--primary-color) transparent;
    }
    
    .loan-dashboard-tabs::-webkit-scrollbar {
        width: 4px;
    }
    
    .loan-dashboard-tabs::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .loan-dashboard-tabs::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 2px;
    }
    
    .loan-dashboard-tab {
        padding: 18px 20px;
        font-size: 16px;
        font-weight: 500;
        border-left: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        transition: all 0.2s ease;
        touch-action: manipulation; /* Better touch response */
    }
    
    .loan-dashboard-tab:active {
        background-color: rgba(30, 90, 160, 0.15);
    }
    
    .loan-dashboard-tab.active {
        border-left: 5px solid var(--primary-color);
        background-color: rgba(30, 90, 160, 0.12);
        font-weight: 600;
    }
    
    /* Enhanced Tab Content for Mobile */
    .loan-dashboard-tab-content {
        background: #f8f9fa;
        border-radius: 0;
        min-height: calc(100vh - 200px);
    }
    
    .loan-dashboard-panel {
        padding: 20px 15px;
        background: white;
        margin: 15px 10px;
        border-radius: 12px;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
        min-height: auto;
    }
    
    .loan-dashboard-panel h2 {
        font-size: 22px;
        margin-bottom: 20px;
        text-align: left;
        padding-bottom: 10px;
        border-bottom: 2px solid var(--primary-color);
        color: var(--primary-color);
    }
    
    /* Enhanced User Info Header for Mobile */
    .loan-dashboard-user-info-header {
        margin: 10px;
        border-radius: 12px;
        padding: 20px 15px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }
    
    .loan-dashboard-user-name {
        font-size: 20px;
        margin-bottom: 8px;
    }
    
    .loan-dashboard-user-meta {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .loan-dashboard-user-meta-item {
        width: 100%;
        justify-content: flex-start;
    }
    
    /* Enhanced Loan Selector for Mobile */
    .loan-dashboard-enhanced-loan-selector {
        margin: 10px;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }
    
    .loan-dashboard-selector-header {
        padding: 15px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .loan-dashboard-selector-title {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .loan-dashboard-loan-counts {
        margin: 0;
        flex-wrap: wrap;
    }
    
    .loan-dashboard-loan-count-item {
        margin-right: 15px;
        margin-bottom: 5px;
    }
    
    .loan-dashboard-selected-loan {
        padding: 15px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .loan-dashboard-selected-loan-info {
        margin-bottom: 15px;
        text-align: left;
    }
    
    .loan-dashboard-loan-amount {
        font-size: 24px;
    }
    
    .loan-dashboard-loan-details {
        margin-bottom: 15px;
    }
    
    .loan-dashboard-loan-detail-item {
        margin-bottom: 8px;
        font-size: 14px;
    }
    
    .loan-dashboard-selected-loan-actions {
        width: 100%;
        justify-content: center;
    }
    
    .loan-dashboard-select {
        width: 100%;
        min-width: auto;
        font-size: 16px;
        padding: 12px 15px;
        border-radius: 8px;
    }
    
    /* Financial Analysis Mobile Enhancements */
    .financial-overview-cards {
        grid-template-columns: 1fr;
        gap: 15px;
        margin: 0 -5px;
    }
    
    .financial-card {
        margin: 0 5px;
        padding: 15px;
        flex-direction: column;
        text-align: center;
    }
    
    .financial-card-icon {
        margin-right: 0;
        margin-bottom: 10px;
        width: 50px;
        height: 50px;
    }
    
    .financial-card-icon .dashicons {
        font-size: 24px;
    }
    
    .financial-value {
        font-size: 20px;
    }
    
    .financial-analysis-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 0 -5px;
    }
    
    .analysis-card {
        margin: 0 5px;
    }
    
    .analysis-card-content {
        padding: 20px 15px;
    }
    
    /* Chart Mobile Optimizations */
    .chart-tabs {
        flex-wrap: wrap;
        gap: 5px;
        margin-bottom: 15px;
    }
    
    .chart-tab {
        flex: 1;
        min-width: calc(50% - 5px);
        text-align: center;
        padding: 10px 8px;
        font-size: 13px;
        border-radius: 6px;
    }
    
    .chart-container {
        padding: 10px;
        height: 300px; /* Fixed height for mobile charts */
    }
    
    /* Health Score Mobile Layout */
    .health-score-circle {
        width: 100px;
        height: 100px;
    }
    
    .health-score-circle::before {
        width: 80px;
        height: 80px;
        top: 10px;
        left: 10px;
    }
    
    .score-value {
        font-size: 24px;
    }
    
    .score-grade {
        font-size: 14px;
    }
    
    .health-factors {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    /* Profile Tab Mobile Enhancements */
    .loan-dashboard-profile-card {
        margin: 0 5px 20px 5px;
        border-radius: 12px;
    }
    
    .profile-card-header {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    
    .profile-card-icon {
        margin-right: 0;
        margin-bottom: 10px;
        width: 40px;
        height: 40px;
    }
    
    .profile-card-title h3 {
        font-size: 16px;
    }
    
    .profile-card-title p {
        font-size: 13px;
    }
    
    .profile-card-content {
        padding: 20px 15px;
    }
    
    .loan-dashboard-profile-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .loan-dashboard-profile-field {
        padding: 12px 15px;
    }
    
    /* Payment Schedule Mobile Enhancements */
    .loan-dashboard-schedule-container {
        margin: 0 -5px;
        padding: 0 5px;
    }
    
    .loan-dashboard-schedule-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        border-radius: 12px;
        font-size: 14px;
        /* Custom scrollbar for table */
        scrollbar-width: thin;
        scrollbar-color: var(--primary-color) #f1f1f1;
    }
    
    .loan-dashboard-schedule-table::-webkit-scrollbar {
        height: 8px;
    }
    
    .loan-dashboard-schedule-table::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }
    
    .loan-dashboard-schedule-table::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 4px;
    }
    
    .loan-dashboard-schedule-table th,
    .loan-dashboard-schedule-table td {
        padding: 12px 10px;
        min-width: 100px; /* Ensure minimum width for readability */
    }
    
    .loan-dashboard-schedule-table th {
        font-size: 12px;
        position: sticky;
        top: 0;
        background: linear-gradient(to bottom, rgba(30, 90, 160, 0.09), rgba(30, 90, 160, 0.12));
        z-index: 10;
    }
    
    /* Enhanced Overview Mobile Layout */
    .loan-dashboard-status-banner {
        flex-direction: column;
        text-align: center;
        padding: 20px 15px;
    }
    
    .loan-dashboard-status-info {
        margin-bottom: 15px;
    }
    
    .loan-dashboard-status-details {
        margin: 15px 0;
        padding: 0;
        border: none;
        width: 100%;
        text-align: center;
    }
    
    .loan-dashboard-status-actions {
        margin: 15px 0 0 0;
        width: 100%;
        text-align: center;
    }
    
    .loan-dashboard-figures-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin: 0 -5px;
    }
    
    .loan-dashboard-figure-card {
        margin: 0 5px;
        padding: 15px;
    }
    
    .loan-dashboard-next-payment-details-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .loan-dashboard-next-payment-detail {
        padding: 12px 8px;
    }
    
    .loan-dashboard-next-payment-label {
        font-size: 12px;
    }
    
    .loan-dashboard-next-payment-value {
        font-size: 14px;
    }
    
    /* Document Tab Mobile Enhancements */
    .loan-document-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin: 0 -5px;
    }
    
    .loan-document-card {
        margin: 0 5px;
        padding: 20px 15px;
    }
    
    .loan-document-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .document-button {
        width: 100%;
        text-align: center;
        padding: 10px 15px;
    }
    
    /* Enhanced Compliance Mobile Layout */
    .legal-documents-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px 5px;
    }
    
    .legal-document-card {
        margin: 0 5px;
        padding: 15px;
    }
    
    .legal-document-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .legal-document-button {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    .preference-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }
    
    .preference-info {
        margin-right: 0;
        margin-bottom: 15px;
        width: 100%;
    }
    
    .preference-control {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .compliance-status-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 15px 5px;
    }
    
    .status-card {
        margin: 0 5px;
        padding: 15px;
    }
    
    .data-rights-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px 5px;
    }
    
    .data-right-item {
        margin: 0 5px;
        padding: 15px;
    }
}

/* Small Mobile Devices (320px - 480px) */
@media (max-width: 480px) {
    .admin-bar-placeholder {
        padding: 6px 10px;
        height: 40px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .admin-bar-logo {
        font-size: 14px;
        text-align: center;
        margin-bottom: 5px;
    }
    
    .admin-bar-user {
        font-size: 12px;
        justify-content: center;
    }
    
    .admin-bar-user img {
        width: 20px;
        height: 20px;
    }
    
    .logout-link {
        margin-left: 10px;
        font-size: 11px;
        padding: 2px 6px;
    }
    
    .loan-dashboard-mobile-menu-toggle {
        padding: 20px 25px !important;
        font-size: 18px !important;
        text-align: center;
        background: #000000 !important; /* BLACK BACKGROUND */
        color: white !important;
        border: 3px solid #ffffff !important;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5) !important;
        margin: 0 0 15px 0 !important; /* SPACING BELOW BUTTON */
    }
    
    .loan-dashboard-mobile-menu-toggle.active {
        background: #444444 !important;
        border-color: #ffffff !important;
    }
    
    .loan-dashboard-tab {
        padding: 15px 15px;
        font-size: 14px;
    }
    
    .loan-dashboard-panel {
        padding: 15px 10px;
        margin: 10px 5px;
    }
    
    .loan-dashboard-panel h2 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .loan-dashboard-container {
        padding: 8px 5px;
    }
    
    .loan-dashboard-user-info-header {
        padding: 15px 10px;
    }
    
    .loan-dashboard-enhanced-loan-selector {
        margin: 5px;
    }
    
    .financial-overview-cards {
        margin: 0 -2px;
    }
    
    .financial-card {
        margin: 0 2px;
        padding: 12px;
    }
    
    .financial-value {
        font-size: 18px;
    }
    
    .chart-tab {
        font-size: 12px;
        padding: 8px 6px;
    }
    
    .chart-container {
        height: 250px;
    }
    
    .loan-dashboard-next-payment-details-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .compliance-status-grid {
        grid-template-columns: 1fr;
    }
}

/* Extra Small Mobile Devices (320px and below) */
@media (max-width: 320px) {
    .admin-bar-placeholder {
        height: 35px;
        padding: 4px 8px;
    }
    
    .admin-bar-logo {
        font-size: 12px;
    }
    
    .admin-bar-user {
        font-size: 11px;
    }
    
    .loan-dashboard-mobile-menu-toggle {
        padding: 18px 20px !important;
        font-size: 16px !important;
        text-align: center;
        background: #000000 !important; /* BLACK BACKGROUND */
        color: white !important;
        border: 3px solid #ffffff !important;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5) !important;
        margin: 0 0 12px 0 !important; /* SPACING BELOW BUTTON */
    }
    
    .loan-dashboard-mobile-menu-toggle.active {
        background: #444444 !important;
        border-color: #ffffff !important;
    }
    
    .loan-dashboard-tab {
        padding: 12px 12px;
        font-size: 13px;
    }
    
    .loan-dashboard-panel {
        padding: 12px 8px;
        margin: 8px 3px;
    }
    
    .loan-dashboard-panel h2 {
        font-size: 16px;
    }
    
    .financial-card {
        padding: 10px;
    }
    
    .financial-value {
        font-size: 16px;
    }
    
    .chart-container {
        height: 200px;
    }
    
    .loan-dashboard-user-name {
        font-size: 18px;
    }
    
    .loan-dashboard-loan-amount {
        font-size: 20px;
    }
}

/* Landscape Orientation Optimizations */
@media (max-height: 500px) and (orientation: landscape) {
    .loan-dashboard-tabs {
        max-height: 60vh;
    }
    
    .loan-dashboard-tab-content {
        min-height: calc(100vh - 150px);
    }
    
    .loan-dashboard-panel {
        min-height: auto;
        padding: 15px;
    }
    
    .chart-container {
        height: 200px;
    }
    
    .health-score-circle {
        width: 80px;
        height: 80px;
    }
    
    .health-score-circle::before {
        width: 65px;
        height: 65px;
        top: 7.5px;
        left: 7.5px;
    }
}

/* Touch and Interaction Enhancements */
@media (hover: none) and (pointer: coarse) {
    /* Touch device specific styles */
    .loan-dashboard-tab {
        min-height: 48px; /* Minimum touch target size */
        touch-action: manipulation;
    }
    
    .loan-dashboard-mobile-menu-toggle {
        min-height: 48px;
        touch-action: manipulation;
    }
    
    .document-button,
    .legal-document-button,
    .data-right-button {
        min-height: 44px;
        touch-action: manipulation;
    }
    
    /* Remove hover effects on touch devices */
    .loan-dashboard-tab:hover,
    .financial-card:hover,
    .analysis-card:hover,
    .loan-dashboard-profile-card:hover {
        transform: none;
    }
    
    /* Enhanced tap feedback */
    .loan-dashboard-tab:active {
        background-color: rgba(30, 90, 160, 0.2);
        transition: background-color 0.1s ease;
    }
    
    .document-button:active,
    .legal-document-button:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

/* Print Styles for Mobile */
@media print {
    .loan-dashboard-mobile-menu-toggle,
    .admin-bar-placeholder {
        display: none !important;
    }
    
    .loan-dashboard-sidebar {
        display: none !important;
    }
    
    .loan-dashboard-main {
        flex-direction: column !important;
    }
    
    .loan-dashboard-tab-content {
        width: 100% !important;
        margin: 0 !important;
        box-shadow: none !important;
    }
    
    .loan-dashboard-panel {
        page-break-inside: avoid;
        margin: 0 !important;
        box-shadow: none !important;
        border: 1px solid #ddd;
    }
}

/* Responsive Design for Enhanced KYC */
@media (max-width: 768px) {
    .kyc-document-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .kyc-category-tabs {
        flex-direction: column;
        border-bottom: none;
    }
    
    .kyc-category-tab {
        border-bottom: none;
        border-right: 3px solid transparent;
        justify-content: flex-start;
    }
    
    .kyc-category-tab.active {
        border-bottom-color: transparent;
        border-right-color: var(--primary-color);
    }
    
    .kyc-doc-status-display {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .kyc-doc-actions {
        flex-direction: row;
        align-items: center;
        width: 100%;
        justify-content: flex-start;
    }
    
    .kyc-upload-area {
        padding: 15px;
    }
}

/* ================================================================================================
   SUPPORT TICKET STYLES
   ================================================================================================ */

.loan-dashboard-support-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Create Ticket Section */
.loan-dashboard-support-create {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
}

.loan-dashboard-support-create h3 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
    font-size: 20px;
    font-weight: 600;
}

.loan-dashboard-support-create p {
    margin: 0 0 20px 0;
    color: var(--light-text);
    font-size: 14px;
}

.loan-support-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.loan-support-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.loan-support-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.loan-support-form-group label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 14px;
}

.loan-support-form-group input,
.loan-support-form-group select,
.loan-support-form-group textarea {
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    font-family: inherit;
}

.loan-support-form-group input:focus,
.loan-support-form-group select:focus,
.loan-support-form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 90, 160, 0.1);
}

.loan-support-form-group textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

.loan-support-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.loan-support-form-actions .loan-dashboard-button {
    position: relative;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
}

.loan-support-form-actions .loan-dashboard-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.submit-loading {
    display: none;
}

/* Support Messages */
.loan-support-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 500;
}

.loan-support-message.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.loan-support-message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Support Options */
.loan-dashboard-support-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.loan-dashboard-support-option {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--shadow);
}

.loan-dashboard-support-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.loan-dashboard-support-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), #3574c2);
    border-radius: 50%;
    margin-bottom: 20px;
    color: white;
    font-size: 24px;
}

.loan-dashboard-support-option h3 {
    margin: 0 0 15px 0;
    color: var(--text-color);
    font-size: 18px;
    font-weight: 600;
}

.loan-dashboard-support-option p {
    margin: 0 0 15px 0;
    color: var(--light-text);
    font-size: 14px;
    line-height: 1.6;
}

.loan-dashboard-support-contact {
    text-align: left;
    margin: 15px 0;
}

.loan-dashboard-support-contact-method {
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-color);
}

.loan-dashboard-support-contact-method strong {
    color: var(--primary-color);
}

.loan-dashboard-kb-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 15px;
}

.loan-dashboard-kb-topic {
    padding: 6px 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-color);
    font-size: 12px;
    transition: all 0.3s ease;
}

.loan-dashboard-kb-topic:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    text-decoration: none;
}

/* User Tickets Section */
.loan-dashboard-recent-tickets {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
}

.loan-dashboard-recent-tickets h3 {
    margin: 0 0 20px 0;
    color: var(--primary-color);
    font-size: 20px;
    font-weight: 600;
}

.loan-dashboard-ticket-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.loan-dashboard-ticket-item {
    display: grid;
    grid-template-columns: auto 1fr auto auto auto auto;
    gap: 15px;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.loan-dashboard-ticket-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-color);
}

.loan-dashboard-ticket-number {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 14px;
}

.loan-dashboard-ticket-subject {
    font-weight: 500;
    color: var(--text-color);
    font-size: 14px;
}

.loan-dashboard-ticket-date {
    font-size: 12px;
    color: var(--light-text);
}

.loan-dashboard-ticket-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.loan-dashboard-ticket-category {
    padding: 4px 8px;
    background: rgba(30, 90, 160, 0.1);
    border: 1px solid rgba(30, 90, 160, 0.2);
    border-radius: 12px;
    font-size: 11px;
    color: var(--primary-color);
    text-transform: capitalize;
}

.loan-dashboard-ticket-action {
    display: flex;
    align-items: center;
}

.loan-dashboard-view-ticket {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 6px;
    color: var(--light-text);
    cursor: pointer;
    transition: all 0.3s ease;
}

.loan-dashboard-view-ticket:hover {
    background: var(--primary-color);
    color: white;
}

.loan-dashboard-loading {
    text-align: center;
    padding: 40px;
    color: var(--light-text);
    font-style: italic;
}

.no-tickets {
    text-align: center;
    padding: 40px;
    color: var(--light-text);
    font-size: 16px;
}

.error {
    text-align: center;
    padding: 20px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    color: #721c24;
    font-size: 14px;
}

/* Mobile Responsive Design for Support */
@media (max-width: 768px) {
    .loan-dashboard-support-content {
        gap: 20px;
    }
    
    .loan-support-form-row {
        grid-template-columns: 1fr;
    }
    
    .loan-dashboard-support-options {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .loan-dashboard-support-option {
        padding: 20px;
    }
    
    .loan-dashboard-support-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .loan-dashboard-ticket-item {
        grid-template-columns: 1fr;
        gap: 10px;
        text-align: left;
    }
    
    .loan-dashboard-ticket-action {
        justify-content: center;
    }
    
    .loan-dashboard-kb-topics {
        justify-content: flex-start;
    }
    
    .loan-dashboard-support-contact {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .loan-dashboard-support-create,
    .loan-dashboard-recent-tickets {
        padding: 15px;
    }
    
    .loan-dashboard-support-option {
        padding: 15px;
    }
    
    .loan-support-form {
        gap: 15px;
    }
    
    .loan-support-form-actions {
        justify-content: stretch;
    }
    
    .loan-support-form-actions .loan-dashboard-button {
        width: 100%;
        justify-content: center;
    }
}

/* ================================================
   ENHANCED SUPPORT TAB STYLING - SUPER NICE DESIGN
   ================================================ */

/* Support Header */
.support-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e3a8a 100%);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 32px;
    color: white;
    position: relative;
    overflow: hidden;
}

.support-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    border-radius: 50%;
    transform: translate(50%, -50%);
}

.support-header-content {
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
    z-index: 1;
}

.support-header-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.support-header-icon .dashicons {
    font-size: 40px;
    color: white;
}

.support-header-text h2 {
    margin: 0 0 8px 0;
    font-size: 32px;
    font-weight: 700;
    color: white;
}

.support-header-text p {
    margin: 0;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

/* Support Dashboard */
.support-dashboard {
    padding: 0;
}

/* Support Statistics Grid */
.support-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.support-stat-card {
    background: var(--card-bg);
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.support-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, #6366f1 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.support-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.support-stat-card:hover::before {
    transform: scaleX(1);
}

.support-stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, #6366f1 100%);
    color: white;
    flex-shrink: 0;
}

.support-stat-icon.open {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.support-stat-icon.resolved {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.support-stat-icon .dashicons {
    font-size: 24px;
}

.support-stat-content {
    flex: 1;
}

.support-stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.2;
    margin-bottom: 4px;
    transition: all 0.3s ease;
}

.support-stat-number.updating {
    transform: scale(1.1);
    color: var(--primary-color);
}

.support-stat-label {
    font-size: 14px;
    color: var(--light-text);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Support Content Grid */
.support-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

/* Support Cards */
.support-card {
    background: var(--card-bg);
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.support-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.support-card-header {
    padding: 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.support-card-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #6366f1 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.support-card-icon .dashicons {
    font-size: 20px;
}

.support-card-title {
    flex: 1;
}

.support-card-title h3 {
    margin: 0 0 4px 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
}

.support-card-title p {
    margin: 0;
    font-size: 14px;
    color: var(--light-text);
    line-height: 1.4;
}

.support-card-actions {
    margin-left: auto;
}

.refresh-button,
.support-card-actions .refresh-button,
button.refresh-button {
    background: var(--primary-color, #1e5aa0) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 10;
}

.refresh-button:hover,
.support-card-actions .refresh-button:hover,
button.refresh-button:hover {
    background: #1e40af !important;
    transform: translateY(-1px);
}

.refresh-button .dashicons {
    font-size: 16px;
}

/* Enhanced Support Form */
.enhanced-support-form {
    padding: 32px;
    background: var(--card-bg);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

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

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
    font-size: 14px;
}

.form-label .dashicons {
    font-size: 16px;
    color: var(--primary-color);
}

.required {
    color: #ef4444;
    font-weight: 700;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    background: white;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.5;
}

.form-select {
    cursor: pointer;
    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 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
}

/* Enhanced Submit Button */
.form-actions {
    margin-top: 32px;
}

.submit-button,
.enhanced-support-form .submit-button,
button.submit-button {
    background: linear-gradient(135deg, var(--primary-color, #1e5aa0) 0%, #1e40af 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 12px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-width: 200px;
    justify-content: center;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 10;
}

.submit-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.6s ease;
}

.submit-button:hover::before {
    width: 300px;
    height: 300px;
}

.submit-button:hover,
.enhanced-support-form .submit-button:hover,
button.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.3) !important;
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%) !important;
}

.submit-button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
    box-shadow: none;
}

.submit-button.loading {
    padding-right: 60px;
}

.button-icon,
.submit-button .button-icon {
    font-size: 18px;
    color: white !important;
    display: inline-flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.button-text,
.submit-button .button-text {
    position: relative;
    z-index: 2;
    color: white !important;
    display: inline-flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.submit-text,
.submit-loading {
    color: white !important;
    display: inline !important;
}

.dashicons {
    color: inherit !important;
    font-family: dashicons !important;
    display: inline-block !important;
    line-height: 1 !important;
    font-weight: normal !important;
    font-style: normal !important;
    speak: never;
    text-decoration: inherit !important;
    text-transform: none !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

.button-loader {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.submit-button.success-submitted {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    transform: scale(1.05);
}

/* Enhanced Message System */
.enhanced-message {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    animation: slideInDown 0.3s ease;
}

.enhanced-message.success {
    border-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
}

.enhanced-message.error {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #fef2f2 100%);
}

.enhanced-message.info {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
}

.message-content {
    flex: 1;
}

.message-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
    color: var(--text-color);
}

.message-details {
    font-size: 14px;
    color: var(--light-text);
    line-height: 1.4;
}

.message-close {
    background: none;
    border: none;
    color: var(--light-text);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.message-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-color);
}

/* Enhanced Tickets Container */
.tickets-container {
    background: var(--card-bg);
    min-height: 400px;
}

.enhanced-ticket-list {
    padding: 24px;
}

/* Loading States */
.tickets-loading,
.empty-tickets-state,
.error-tickets-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
}

.loading-spinner {
    margin-bottom: 16px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.button-loader .spinner {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Empty and Error States */
.empty-state-icon,
.error-state-icon {
    width: 80px;
    height: 80px;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.empty-state-icon .dashicons,
.error-state-icon .dashicons {
    font-size: 32px;
    color: var(--light-text);
}

.empty-tickets-state h4,
.error-tickets-state h4 {
    margin: 0 0 8px 0;
    font-size: 20px;
    color: var(--text-color);
}

.empty-tickets-state p,
.error-tickets-state p {
    margin: 0 0 24px 0;
    color: var(--light-text);
    line-height: 1.5;
}

.retry-button,
button.retry-button {
    background: var(--primary-color, #1e5aa0) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 10;
}

.retry-button:hover,
button.retry-button:hover {
    background: #1e40af !important;
    transform: translateY(-1px);
}

/* Enhanced Ticket Grid */
.enhanced-tickets-grid {
    display: grid;
    gap: 20px;
}

.enhanced-ticket-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.enhanced-ticket-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.ticket-card-header {
    padding: 20px 24px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f3f4f6;
}

.ticket-number {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 2px;
}

.ticket-hash {
    color: var(--light-text);
    font-size: 14px;
}

.ticket-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.status-open {
    background: #fef2f2;
    color: #dc2626;
}

.status-progress {
    background: #fffbeb;
    color: #d97706;
}

.status-waiting {
    background: #f0f9ff;
    color: #0284c7;
}

.status-resolved {
    background: #f0fdf4;
    color: #16a34a;
}

.status-closed {
    background: #f9fafb;
    color: #6b7280;
}

.ticket-card-content {
    padding: 20px 24px;
}

.ticket-subject {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.3;
}

.ticket-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ticket-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.ticket-meta-item .dashicons {
    font-size: 16px;
    color: var(--light-text);
}

.meta-label {
    color: var(--light-text);
    font-weight: 500;
    min-width: 70px;
}

.meta-value {
    color: var(--text-color);
    font-weight: 500;
}

.meta-value.priority-low {
    color: #6b7280;
}

.meta-value.priority-medium {
    color: #d97706;
}

.meta-value.priority-high {
    color: #dc2626;
}

.meta-value.priority-urgent {
    color: #7c2d12;
    font-weight: 700;
}

.ticket-card-actions {
    padding: 16px 24px 20px;
    border-top: 1px solid #f3f4f6;
}

.ticket-action-btn,
.enhanced-ticket-card .ticket-action-btn,
button.ticket-action-btn {
    background: var(--primary-color, #1e5aa0) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    width: 100%;
    justify-content: center;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 10;
}

.ticket-action-btn:hover,
.enhanced-ticket-card .ticket-action-btn:hover,
button.ticket-action-btn:hover {
    background: #1e40af !important;
    transform: translateY(-1px);
}

.ticket-action-btn .dashicons {
    font-size: 16px;
}

/* Form Success Animation */
.enhanced-support-form.success-submitted {
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Mobile Responsive Design */
@media (max-width: 1024px) {
    .support-content-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .support-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .support-header {
        padding: 24px;
    }
    
    .support-header-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .support-header-icon {
        width: 60px;
        height: 60px;
    }
    
    .support-header-icon .dashicons {
        font-size: 30px;
    }
    
    .support-header-text h2 {
        font-size: 24px;
    }
    
    .support-header-text p {
        font-size: 16px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .support-stat-card {
        padding: 16px;
    }
    
    .support-card-header {
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .enhanced-support-form {
        padding: 20px;
    }
    
    .ticket-meta {
        gap: 6px;
    }
    
    .ticket-meta-item {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .support-header {
        padding: 16px;
        margin-bottom: 20px;
    }
    
    .support-stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .support-content-grid {
        gap: 16px;
    }
    
    .enhanced-support-form {
        padding: 16px;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
    
    .submit-button {
        padding: 14px 24px;
        font-size: 14px;
        min-width: 160px;
    }
    
    .enhanced-tickets-grid {
        gap: 12px;
    }
    
    .ticket-card-content {
        padding: 16px;
    }
    
    .ticket-subject {
        font-size: 16px;
    }
}

/* ================================================
   BUTTON VISIBILITY FIX - DEBUGGING & OVERRIDES
   ================================================ */

/* Force button visibility with maximum specificity */
.loan-dashboard-container .submit-button,
.loan-dashboard-container button.submit-button,
.loan-dashboard-container .ticket-action-btn,
.loan-dashboard-container button.ticket-action-btn,
.loan-dashboard-container .refresh-button,
.loan-dashboard-container button.refresh-button {
    background: #1e5aa0 !important;
    background-image: linear-gradient(135deg, #1e5aa0 0%, #1e40af 100%) !important;
    color: #ffffff !important;
    border: 2px solid #1e5aa0 !important;
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    height: auto !important;
    width: auto !important;
    min-height: 44px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    z-index: 999 !important;
    position: relative !important;
}

/* Fix button content visibility */
.loan-dashboard-container .submit-button *,
.loan-dashboard-container .ticket-action-btn *,
.loan-dashboard-container .refresh-button * {
    color: #ffffff !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: inline !important;
}

/* Specific override for dashicons in buttons */
.loan-dashboard-container .submit-button .dashicons,
.loan-dashboard-container .ticket-action-btn .dashicons,
.loan-dashboard-container .refresh-button .dashicons {
    font-family: 'dashicons' !important;
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
    font-size: 16px !important;
    line-height: 1 !important;
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: normal !important;
    font-style: normal !important;
    vertical-align: top !important;
}

/* Debug: Add border to identify button boundaries */
.submit-button,
.ticket-action-btn,
.refresh-button {
    outline: 1px solid rgba(255, 0, 0, 0.3) !important;
    min-height: 40px !important;
    padding: 12px 20px !important;
}

/* Alternative fallback styling if gradients fail */
.submit-button.fallback,
.ticket-action-btn.fallback,
.refresh-button.fallback {
    background: #1e5aa0 !important;
    background-image: none !important;
    border: 2px solid #1e5aa0 !important;
}

/* ==============================================
   Ticket Modal Styles
   ============================================== */

.ticket-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
    animation: modalOverlayFadeIn 0.3s ease-out;
}

@keyframes modalOverlayFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(3px);
    }
}

.ticket-modal-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 95%;
    max-height: 90vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
    position: relative;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-30px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.ticket-modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e5aa0 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
}

.ticket-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.ticket-modal-close {
    background: #fff !important;
    border: 3px solid #dc3545 !important;
    color: #dc3545 !important;
    font-size: 24px !important;
    font-weight: 900 !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.2s ease !important;
}

.ticket-modal-close:hover {
    background: #dc3545 !important;
    color: #fff !important;
    border-color: #dc3545 !important;
    transform: scale(1.1) !important;
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4) !important;
}

.ticket-modal-close:active {
    transform: scale(1.05) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.ticket-modal-close:focus {
    outline: 3px solid #fff !important;
    outline-offset: 2px !important;
}

.ticket-modal-content {
    padding: 0;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
}

.ticket-details {
    padding: 24px;
    border-bottom: 1px solid #eee;
}

.ticket-header-info {
    margin-bottom: 20px;
}

.ticket-subject h4 {
    margin: 0 0 12px 0;
    font-size: 22px;
    color: #333;
    line-height: 1.4;
}

.ticket-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.ticket-status,
.ticket-priority,
.ticket-category {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ticket-status {
    color: white;
}

.ticket-priority {
    background: #f8f9fa;
    color: #666;
}

.ticket-priority.priority-low { color: #28a745; }
.ticket-priority.priority-medium { color: #ffc107; }
.ticket-priority.priority-high { color: #fd7e14; }
.ticket-priority.priority-urgent { color: #dc3545; }

.ticket-category {
    background: #e9ecef;
    color: #495057;
}

.ticket-description {
    margin-bottom: 20px;
}

.ticket-description h5 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.description-content {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    line-height: 1.6;
    color: #333;
}

.ticket-timestamps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    font-size: 14px;
}

.timestamp-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timestamp-label {
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.timestamp-value {
    color: #333;
}

/* Ticket Responses */
.ticket-responses {
    padding: 24px;
    border-bottom: 1px solid #eee;
}

.ticket-responses h4 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
}

.responses-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 8px;
}

.ticket-response {
    border-radius: 8px;
    padding: 16px;
    border-left: 4px solid;
    transition: all 0.2s ease;
}

.ticket-response.response-public {
    background: #f8f9fa;
    border-left-color: var(--primary-color);
}

.ticket-response.response-internal {
    background: #fff3cd;
    border-left-color: #ffc107;
}

.response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.response-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-name {
    font-weight: 600;
    color: #333;
}

.internal-badge {
    background: #ffc107;
    color: #856404;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.response-date {
    font-size: 12px;
    color: #666;
}

.response-content {
    line-height: 1.6;
    color: #333;
}

.no-responses {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-responses .dashicons {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-responses p {
    margin: 0;
    font-size: 16px;
}

/* Ticket Reply Section */
.ticket-reply-section {
    padding: 24px;
    background: #f8f9fa;
}

.ticket-reply-section h4 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
}

.ticket-reply-form {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.reply-form-group {
    margin-bottom: 20px;
}

.reply-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.reply-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.reply-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 139, 245, 0.1);
}

.reply-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.reply-submit-btn,
.reply-cancel-btn {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 15px 30px !important;
    border: 3px solid !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    min-height: 50px !important;
    justify-content: center !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.reply-submit-btn {
    background: #28a745 !important;
    color: #fff !important;
    border-color: #28a745 !important;
}

.reply-submit-btn:hover {
    background: #218838 !important;
    border-color: #218838 !important;
    color: #fff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4) !important;
}

.reply-submit-btn:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.reply-submit-btn:disabled {
    background: #6c757d !important;
    border-color: #6c757d !important;
    color: #fff !important;
    opacity: 0.6 !important;
    transform: none !important;
    cursor: not-allowed !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
}

.reply-submit-btn:disabled:hover {
    background: #6c757d !important;
    border-color: #6c757d !important;
    transform: none !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
}

.reply-cancel-btn {
    background: #6c757d !important;
    color: #fff !important;
    border-color: #6c757d !important;
}

.reply-cancel-btn:hover {
    background: #5a6268 !important;
    border-color: #5a6268 !important;
    color: #fff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 16px rgba(108, 117, 125, 0.4) !important;
}

.btn-icon {
    font-size: 16px;
}

/* Loading State */
.ticket-loading {
    text-align: center;
    padding: 40px 20px;
}

.ticket-loading .spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Force text visibility in all states with maximum specificity */
.ticket-modal-container .reply-submit-btn,
.ticket-modal-container .reply-submit-btn span,
.ticket-modal-container .reply-submit-btn .btn-text,
.ticket-modal-container .reply-submit-btn .btn-icon {
    color: #fff !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: inline !important;
}

.ticket-modal-container .reply-cancel-btn,
.ticket-modal-container .reply-cancel-btn span,
.ticket-modal-container .reply-cancel-btn .btn-text,
.ticket-modal-container .reply-cancel-btn .btn-icon {
    color: #fff !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: inline !important;
}

/* Override any hiding styles */
.reply-submit-btn *,
.reply-cancel-btn * {
    opacity: 1 !important;
    visibility: visible !important;
    color: inherit !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .ticket-modal-container {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }
    
    .ticket-modal-header {
        border-radius: 0;
        padding: 16px;
    }
    
    .ticket-modal-header h3 {
        font-size: 18px;
    }
    
    .ticket-modal-close {
        width: 42px !important;
        height: 42px !important;
        font-size: 20px !important;
    }
    
    .ticket-details,
    .ticket-responses,
    .ticket-reply-section {
        padding: 16px;
    }
    
    .ticket-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .timestamp-item {
        grid-template-columns: 1fr;
    }
    
    .reply-form-actions {
        flex-direction: column !important;
        gap: 16px !important;
    }
    
    .reply-submit-btn,
    .reply-cancel-btn {
        justify-content: center !important;
        width: 100% !important;
        min-height: 54px !important;
        font-size: 18px !important;
        padding: 18px 20px !important;
    }
    
    .reply-textarea {
        font-size: 16px; /* Prevent zoom on iOS */
        min-height: 120px;
        padding: 15px !important;
        border-width: 3px !important;
    }
}

/* Additional button visibility enforcement - added at end for maximum priority */
button.reply-submit-btn,
button.reply-cancel-btn,
.reply-submit-btn,
.reply-cancel-btn {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Debug: Force button visibility with ultra-high specificity */
.ticket-modal-overlay .ticket-modal-container .ticket-reply-form .reply-form-actions .reply-submit-btn {
    background: #28a745 !important;
    color: #ffffff !important;
    border: 3px solid #28a745 !important;
    padding: 15px 30px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
    cursor: pointer !important;
    min-height: 50px !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.ticket-modal-overlay .ticket-modal-container .ticket-reply-form .reply-form-actions .reply-cancel-btn {
    background: #6c757d !important;
    color: #ffffff !important;
    border: 3px solid #6c757d !important;
    padding: 15px 30px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
    cursor: pointer !important;
    min-height: 50px !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

/* ================================================
   SUPPORT CHAT INTERFACE STYLES
   ================================================ */

/* Main Chat Container */
.support-chat-container {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 700px;
    max-height: 80vh;
    margin: 0;
    border: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
}

/* Chat Header */
.support-chat-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    color: white;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.chat-header-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.chat-header-avatar {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.chat-header-avatar .dashicons {
    font-size: 24px;
    color: white;
}

.chat-header-info h3 {
    margin: 0 0 4px 0;
    font-size: 22px;
    font-weight: 700;
    color: white;
}

.chat-status {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.status-dot.online {
    background: #10b981;
}

.status-dot.offline {
    background: #ef4444;
    animation: none;
}

.chat-header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.chat-stats {
    display: flex;
    gap: 16px;
    font-size: 14px;
}

.chat-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.chat-stat .dashicons {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
}

.chat-refresh-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.chat-refresh-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.chat-refresh-btn .dashicons {
    font-size: 16px;
}

/* Chat Conversation Area */
.support-chat-conversation {
    flex: 1;
    overflow-y: auto;
    background: #f8fafc;
    position: relative;
    padding: 0;
}

/* Custom Scrollbar */
.support-chat-conversation::-webkit-scrollbar {
    width: 6px;
}

.support-chat-conversation::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.support-chat-conversation::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.support-chat-conversation::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Chat Messages */
.chat-messages {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 100%;
}

.chat-message {
    display: flex;
    gap: 12px;
    max-width: 100%;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message-avatar .dashicons {
    font-size: 20px;
}

.message-content {
    flex: 1;
    background: white;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

.message-content:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.message-author {
    font-weight: 600;
    color: var(--text-color);
    font-size: 14px;
}

.message-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--light-text);
}

.ticket-number {
    background: var(--primary-color);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ticket-status {
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ticket-status.status-open {
    background: #fef2f2;
    color: #dc2626;
}

.ticket-status.status-progress {
    background: #fffbeb;
    color: #d97706;
}

.ticket-status.status-waiting {
    background: #f0f9ff;
    color: #0284c7;
}

.ticket-status.status-resolved {
    background: #f0fdf4;
    color: #16a34a;
}

.ticket-status.status-closed {
    background: #f9fafb;
    color: #6b7280;
}

.message-time {
    color: var(--light-text);
    font-size: 12px;
}

.message-subject {
    margin-bottom: 8px;
}

.message-subject strong {
    color: var(--text-color);
    font-size: 16px;
    line-height: 1.4;
}

.message-text {
    color: var(--light-text);
    line-height: 1.5;
    margin-bottom: 12px;
    font-size: 14px;
}

.message-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.message-action-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
}

.message-action-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    text-decoration: none;
}

.message-action-btn .dashicons {
    font-size: 14px;
}

.message-updates {
    margin-top: 8px;
    padding: 8px 12px;
    background: #f0f9ff;
    border-radius: 8px;
    color: #0284c7;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.message-updates .dashicons {
    font-size: 14px;
}

/* Welcome State */
.chat-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    text-align: center;
    height: 100%;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.chat-welcome-content {
    max-width: 400px;
}

.welcome-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.welcome-icon .dashicons {
    font-size: 40px;
}

.chat-welcome h3 {
    margin: 0 0 16px 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
}

.chat-welcome p {
    margin: 0 0 20px 0;
    color: var(--light-text);
    font-size: 16px;
    line-height: 1.5;
}

.welcome-actions {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
    text-align: left;
}

.welcome-actions li {
    margin-bottom: 8px;
    color: var(--text-color);
    font-size: 14px;
}

.welcome-quick-start {
    margin-top: 24px;
}

.welcome-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.welcome-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.welcome-btn .dashicons {
    font-size: 18px;
}

/* Error State */
.chat-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    text-align: center;
    height: 100%;
    background: #fef2f2;
}

.error-icon {
    width: 80px;
    height: 80px;
    background: #fecaca;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: #dc2626;
}

.error-icon .dashicons {
    font-size: 40px;
}

.chat-error h3 {
    margin: 0 0 16px 0;
    font-size: 20px;
    color: #dc2626;
}

.chat-error p {
    margin: 0 0 24px 0;
    color: #7f1d1d;
    font-size: 14px;
    line-height: 1.5;
}

.retry-btn {
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.retry-btn:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

.retry-btn .dashicons {
    font-size: 16px;
}

/* Chat Input Section */
.support-chat-input-section {
    background: white;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
    position: relative;
    overflow: visible;
}

/* Quick Actions */
.chat-quick-actions {
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    overflow-x: auto;
    z-index: 10;
    position: relative;
}

.quick-action-btn {
    background: white;
    border: 1px solid #d1d5db;
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.quick-action-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.quick-action-btn .dashicons {
    font-size: 14px;
}

/* New Ticket Form */
.new-ticket-form {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 20px;
    z-index: 10;
    position: relative;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.form-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

.form-close {
    background: none;
    border: none;
    color: var(--light-text);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.form-close:hover {
    background: #f3f4f6;
    color: var(--text-color);
}

.form-close .dashicons {
    font-size: 18px;
}

.chat-support-form,
.chat-reply-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field label {
    font-weight: 500;
    color: var(--text-color);
    font-size: 14px;
}

.form-field input,
.form-field select,
.form-field textarea {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-field textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 8px;
}

.submit-btn,
.cancel-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    border: none;
}

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

.submit-btn:hover {
    background: #1e40af;
    transform: translateY(-1px);
}

.submit-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.cancel-btn {
    background: #f3f4f6;
    color: var(--text-color);
    border: 1px solid #d1d5db;
}

.cancel-btn:hover {
    background: #e5e7eb;
}

.submit-btn .dashicons,
.cancel-btn .dashicons {
    font-size: 16px;
}

/* Chat Input Bar */
.chat-input-bar {
    padding: 16px 20px;
    background: white;
}

.chat-input-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    padding: 8px;
    transition: all 0.2s ease;
}

.chat-input-container:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.chat-attachment-btn,
.chat-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chat-attachment-btn {
    background: #e5e7eb;
    color: var(--text-color);
}

.chat-attachment-btn:hover {
    background: #d1d5db;
    transform: scale(1.05);
}

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

.chat-send-btn:hover {
    background: #1e40af;
    transform: scale(1.05);
}

.chat-attachment-btn .dashicons,
.chat-send-btn .dashicons {
    font-size: 16px;
}

.chat-input-wrapper {
    flex: 1;
}

.chat-input-wrapper input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 10px 16px;
    font-size: 15px;
    outline: none;
    font-family: inherit;
}

.chat-input-wrapper input::placeholder {
    color: #9ca3af;
}

/* Reply Form */
.ticket-reply-form {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 20px;
    z-index: 10;
    position: relative;
}

.reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.reply-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}

/* Chat Notifications */
.chat-notification {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: slideInDown 0.3s ease;
    position: relative;
    z-index: 1000;
}

.chat-notification.success {
    border-left: 4px solid #10b981;
    background: #f0fdf4;
}

.chat-notification.error {
    border-left: 4px solid #ef4444;
    background: #fef2f2;
}

.chat-notification.warning {
    border-left: 4px solid #f59e0b;
    background: #fffbeb;
}

.notification-content {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
}

.notification-close {
    background: none;
    border: none;
    color: var(--light-text);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.notification-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-color);
}

.notification-close .dashicons {
    font-size: 16px;
}

/* Conversation Modal */
.conversation-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
    animation: modalOverlayFadeIn 0.3s ease-out;
}

.conversation-modal-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 95%;
    max-height: 90vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
    position: relative;
}

.conversation-modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    color: white;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-header-info h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.conversation-modal-header .ticket-status {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 24px;
    font-weight: 700;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.conversation-modal-content {
    padding: 0;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
}

.conversation-messages {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.conversation-message {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    animation: fadeInUp 0.3s ease;
}

.conversation-message.user-message .message-avatar {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.conversation-message.support-message .message-avatar {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
}

.conversation-modal-footer {
    padding: 20px 24px;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: center;
}

.modal-reply-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.modal-reply-btn:hover {
    background: #1e40af;
    transform: translateY(-1px);
}

.modal-reply-btn .dashicons {
    font-size: 16px;
}

/* Chat Loading State */
.chat-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    text-align: center;
    height: 100%;
}

.chat-loading .loading-spinner {
    margin-bottom: 16px;
}

.chat-loading p {
    margin: 0;
    color: var(--light-text);
    font-size: 16px;
}

/* Mobile Responsive for Chat Interface */
@media (max-width: 768px) {
    .support-chat-container {
        height: 600px;
        max-height: 70vh;
    }
    
    .support-chat-header {
        padding: 16px 20px;
    }
    
    .chat-header-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .chat-header-avatar {
        width: 40px;
        height: 40px;
    }
    
    .chat-header-avatar .dashicons {
        font-size: 20px;
    }
    
    .chat-header-info h3 {
        font-size: 18px;
    }
    
    .chat-header-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .chat-stats {
        justify-content: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .submit-btn,
    .cancel-btn {
        width: 100%;
        justify-content: center;
    }
    
    .conversation-modal-container {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .conversation-modal-header {
        border-radius: 0;
    }
    
    .conversation-messages {
        padding: 16px;
    }
    
    .conversation-modal-footer {
        padding: 16px 20px;
    }
}

@media (max-width: 480px) {
    .support-chat-container {
        height: 500px;
        max-height: 60vh;
    }
    
    .support-chat-header {
        padding: 12px 16px;
    }
    
    .chat-header-info h3 {
        font-size: 16px;
    }
    
    .chat-messages {
        padding: 16px;
    }
    
    .message-content {
        padding: 12px;
    }
    
    .new-ticket-form,
    .ticket-reply-form {
        padding: 16px;
    }
    
    .chat-input-bar {
        padding: 12px 16px;
    }
}

/* ================================================
   SUPPORT TICKET SYSTEM STYLES 
   ================================================ */

/* Support Tickets System Container */
.support-tickets-system {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin: 0;
}

/* Support Header */
.support-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    color: white;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.support-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    transform: translate(50%, -50%);
}

.support-header-content {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.support-header-info h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 700;
    color: white;
    border: none;
    padding: 0;
}

.support-header-info p {
    margin: 0;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

.support-header-actions {
    display: flex;
    align-items: center;
}

/* Support Statistics Row */
.support-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 24px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.support-stat-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.support-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-icon.tickets-total {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
}

.stat-icon.tickets-open {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.stat-icon.tickets-progress {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.stat-icon.tickets-resolved {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 4px;
    line-height: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--light-text);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Support Form */
.support-new-ticket-form {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 0;
    margin: 0;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.support-new-ticket-form.show {
    max-height: 600px;
    padding: 24px;
}

.ticket-form-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.ticket-form-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticket-form-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

.form-close-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--light-text);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.form-close-btn:hover {
    background: #f3f4f6;
    color: var(--text-color);
}

.support-ticket-form {
    padding: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-field label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 14px;
}

.required {
    color: #ef4444;
}

.form-field input,
.form-field select,
.form-field textarea {
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-field textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.5;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

/* Tickets List */
.support-tickets-list {
    padding: 24px;
}

.tickets-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.tickets-list-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
}

.tickets-list-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tickets-list-actions .loan-dashboard-button {
    background: var(--primary-color) !important;
    color: white !important;
    border: 2px solid var(--primary-color) !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 999 !important;
    box-shadow: 0 3px 12px rgba(30, 90, 160, 0.3) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.tickets-list-actions .loan-dashboard-button:hover {
    background: #1e40af !important;
    border-color: #1e40af !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 20px rgba(30, 90, 160, 0.4) !important;
}

.tickets-list-actions .loan-dashboard-button .dashicons {
    font-size: 18px !important;
    color: white !important;
    font-weight: bold !important;
}

.refresh-tickets-btn {
    background: #f8fafc !important;
    color: var(--primary-color) !important;
    border: 2px solid var(--primary-color) !important;
    border-radius: 8px;
    padding: 12px 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    opacity: 1 !important;
    visibility: visible !important;
    box-shadow: 0 2px 8px rgba(30, 90, 160, 0.15) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
}

.refresh-tickets-btn:hover {
    background: var(--primary-color) !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(30, 90, 160, 0.3) !important;
}

.refresh-tickets-btn .dashicons {
    font-size: 16px !important;
    color: inherit !important;
    font-weight: bold !important;
}

/* Tickets Container */
.tickets-container {
    background: white;
    border-radius: 8px;
    min-height: 300px;
}

/* Ticket Cards Grid */
.tickets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.ticket-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ticket-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.ticket-card-header {
    padding: 16px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticket-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ticket-number {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 14px;
}

.ticket-category {
    background: rgba(59, 130, 246, 0.1);
    color: #1e40af;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.ticket-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
}

.status-open {
    background: #ef4444;
}

.status-in-progress {
    background: #f59e0b;
}

.status-waiting {
    background: #3b82f6;
}

.status-resolved {
    background: #10b981;
}

.status-closed {
    background: #6b7280;
}

.ticket-card-body {
    padding: 20px;
}

.ticket-subject {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.4;
}

.ticket-description {
    color: var(--light-text);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ticket-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--light-text);
    margin-bottom: 16px;
}

.ticket-date,
.ticket-priority {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ticket-priority {
    text-transform: capitalize;
}

.priority-low { color: #6b7280; }
.priority-medium { color: #f59e0b; }
.priority-high { color: #ef4444; }
.priority-urgent { color: #dc2626; font-weight: 700; }

.ticket-card-footer {
    padding: 16px 20px;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
}

.ticket-action-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.ticket-action-btn:hover {
    background: #1e40af;
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
}

.view-ticket {
    background: #f3f4f6;
    color: var(--text-color);
    border: 1px solid #d1d5db;
}

.view-ticket:hover {
    background: #e5e7eb;
    color: var(--text-color);
}

.reply-ticket {
    background: #10b981;
}

.reply-ticket:hover {
    background: #059669;
}

/* Loading States */
.tickets-loading,
.tickets-empty-state,
.tickets-error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--light-text);
}

.loading-spinner {
    margin-bottom: 16px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.empty-state-icon,
.error-state-icon {
    width: 80px;
    height: 80px;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.empty-state-icon .dashicons,
.error-state-icon .dashicons {
    font-size: 32px;
    color: var(--light-text);
}

.tickets-empty-state h3,
.tickets-error-state h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    color: var(--text-color);
}

.tickets-empty-state p,
.tickets-error-state p {
    margin: 0 0 20px 0;
    line-height: 1.5;
}

/* Ticket Modal */
.ticket-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ticket-modal-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 95%;
    max-height: 90vh;
    overflow: hidden;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.ticket-modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    color: white;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticket-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: white;
    border: none;
    padding: 0;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 24px;
    font-weight: 700;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.ticket-modal-content {
    max-height: calc(90vh - 80px);
    overflow-y: auto;
}

/* Ticket Details */
.ticket-details-section {
    padding: 24px;
}

.ticket-details-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.ticket-meta-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.ticket-dates {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--light-text);
}

.ticket-subject-section,
.ticket-description-section {
    margin-bottom: 24px;
}

.ticket-subject-section h4,
.ticket-description-section h4,
.ticket-responses-section h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}

.ticket-responses-section {
    margin-bottom: 24px;
}

.responses-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 300px;
    overflow-y: auto;
}

.ticket-response {
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #e5e7eb;
}

.response-user {
    background: #f0f9ff;
    border-left-color: #3b82f6;
}

.response-support {
    background: #f0fdf4;
    border-left-color: #10b981;
}

.response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.response-author {
    font-weight: 600;
    color: var(--text-color);
}

.response-date {
    font-size: 12px;
    color: var(--light-text);
}

.response-content {
    color: var(--text-color);
    line-height: 1.5;
}

.no-responses {
    text-align: center;
    padding: 40px 20px;
    color: var(--light-text);
    font-style: italic;
}

.ticket-modal-footer {
    padding: 20px 24px;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: center;
}

/* Notifications */
.ticket-notification {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.ticket-notification.success {
    border-left: 4px solid #10b981;
    background: #f0fdf4;
}

.ticket-notification.error {
    border-left: 4px solid #ef4444;
    background: #fef2f2;
}

.ticket-notification.warning {
    border-left: 4px solid #f59e0b;
    background: #fffbeb;
}

.ticket-notification.info {
    border-left: 4px solid #3b82f6;
    background: #f0f9ff;
}

.notification-content {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
}

.notification-close {
    background: none;
    border: none;
    color: var(--light-text);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.notification-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-color);
}

/* Mobile Responsive for Support Tickets */
@media (max-width: 768px) {
    .support-header-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .support-stats-row {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .form-actions button {
        width: 100%;
        justify-content: center;
    }
    
    .tickets-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .ticket-card-footer {
        flex-direction: column;
        gap: 8px;
    }
    
    .ticket-action-btn {
        width: 100%;
        justify-content: center;
    }
    
    .ticket-modal-container {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .ticket-modal-header {
        border-radius: 0;
        padding: 16px 20px;
    }
    
    .ticket-details-section {
        padding: 20px;
    }
    
    .ticket-meta-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .ticket-dates {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .support-header {
        padding: 20px;
    }
    
    .support-header-info h2 {
        font-size: 24px;
    }
    
    .support-stats-row {
        padding: 16px;
        gap: 12px;
    }
}

/* ================================================
   NEW TICKET FORM MODAL STYLES
   ================================================ */

.ticket-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(4px);
    }
}

.ticket-modal-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    max-width: 700px;
    width: 95%;
    max-height: 90vh;
    overflow: hidden;
    animation: modalSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

@keyframes modalSlideUp {
    from {
        transform: translateY(50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.ticket-modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    color: white;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 16px 16px 0 0;
    position: relative;
    overflow: hidden;
}

.ticket-modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    transform: translate(30%, -30%);
}

.ticket-modal-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: white;
    position: relative;
    z-index: 1;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 2px solid rgba(255, 255, 255, 0.4) !important;
    color: white !important;
    font-size: 28px !important;
    font-weight: 900 !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    backdrop-filter: blur(10px) !important;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    position: relative !important;
    z-index: 2 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

.modal-close:hover {
    background: rgba(220, 53, 69, 0.9) !important;
    border-color: #dc3545 !important;
    color: white !important;
    transform: scale(1.15) rotate(90deg) !important;
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4) !important;
}

.modal-close:active {
    transform: scale(1.1) rotate(90deg) !important;
}

.ticket-modal-content {
    padding: 32px;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
    background: #f8fafc;
}

.support-ticket-form {
    background: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-field label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.required {
    color: #ef4444;
    font-weight: 700;
}

.form-field input,
.form-field select,
.form-field textarea {
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1), 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.form-field input:hover,
.form-field select:hover,
.form-field textarea:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.form-field textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.6;
}

.form-field select {
    cursor: pointer;
    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 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 16px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 48px;
    appearance: none;
}

.form-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid #f1f5f9;
}

.loan-dashboard-button {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 16px 32px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    text-decoration: none !important;
    min-width: 160px !important;
    justify-content: center !important;
    box-shadow: 0 8px 25px rgba(30, 90, 160, 0.3) !important;
    position: relative !important;
    overflow: hidden !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 10 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.loan-dashboard-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.loan-dashboard-button:hover::before {
    left: 100%;
}

.loan-dashboard-button:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%) !important;
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 12px 35px rgba(30, 90, 160, 0.4) !important;
    color: white !important;
}

.loan-dashboard-button:active {
    transform: translateY(-1px) scale(0.98) !important;
    box-shadow: 0 6px 20px rgba(30, 90, 160, 0.3) !important;
}

.loan-dashboard-button-secondary {
    background: white !important;
    color: var(--text-color) !important;
    border: 2px solid #e5e7eb !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.loan-dashboard-button-secondary:hover {
    background: #f8fafc !important;
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
}

.loan-dashboard-button .dashicons {
    font-size: 18px !important;
    color: white !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.loan-dashboard-button-secondary .dashicons {
    color: inherit !important;
}

/* Mobile Responsive for Modal */
@media (max-width: 768px) {
    .ticket-modal-container {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        border: none;
    }
    
    .ticket-modal-header {
        border-radius: 0;
        padding: 20px;
    }
    
    .ticket-modal-header h3 {
        font-size: 20px;
    }
    
    .modal-close {
        width: 44px !important;
        height: 44px !important;
        font-size: 24px !important;
    }
    
    .ticket-modal-content {
        padding: 24px;
    }
    
    .support-ticket-form {
        padding: 24px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .loan-dashboard-button {
        width: 100% !important;
        min-width: auto !important;
        padding: 18px 24px !important;
        font-size: 18px !important;
    }
}

@media (max-width: 480px) {
    .ticket-modal-content {
        padding: 20px;
    }
    
    .support-ticket-form {
        padding: 20px;
    }
    
    .form-field input,
    .form-field select,
    .form-field textarea {
        padding: 14px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .form-field textarea {
        min-height: 120px;
    }
}
