/**
 * Frontend Styles for Sensors & More Loan System
 */

/* Shield Financing Payment Gateway Styles */
.wc_payment_method.payment_method_shield_financing {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #007cba;
    border-radius: 8px;
    margin: 10px 0;
    padding: 0;
    overflow: hidden;
}

.wc_payment_method.payment_method_shield_financing input[type="radio"] {
    margin: 15px;
}

.wc_payment_method.payment_method_shield_financing label {
    display: flex;
    align-items: center;
    padding: 15px;
    margin: 0;
    font-weight: bold;
    color: #007cba;
    cursor: pointer;
}

.payment_method_shield_financing .shield-financing-logo {
    margin-left: auto;
    font-size: 20px;
    color: #007cba;
}

/* Shield Financing Fields */
.shield-financing-payment-fields {
    background: white;
    border-top: 1px solid #dee2e6;
    margin: 0;
    padding: 20px;
}

.shield-financing-payment-fields .financing-preview {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
}

.shield-financing-payment-fields .financing-preview h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 18px;
}

.shield-financing-payment-fields .loan-options {
    display: grid;
    gap: 12px;
}

.shield-financing-payment-fields .loan-options label {
    display: block;
    margin: 0;
    padding: 15px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shield-financing-payment-fields .loan-options label:hover {
    border-color: #007cba;
    box-shadow: 0 2px 8px rgba(0,123,186,0.15);
}

.shield-financing-payment-fields .loan-options input[type="radio"] {
    margin-right: 12px;
    transform: scale(1.2);
}

.shield-financing-payment-fields .loan-options input[type="radio"]:checked + .loan-option-details {
    color: #007cba;
}

.shield-financing-payment-fields .loan-options label:has(input:checked) {
    border-color: #007cba;
    background: #f0f8ff;
}

.shield-financing-payment-fields .loan-option-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.shield-financing-payment-fields .loan-option-details strong {
    font-size: 16px;
    color: #2c3e50;
}

.shield-financing-payment-fields .monthly-payment {
    font-weight: bold;
    color: #007cba;
    font-size: 16px;
}

.shield-financing-payment-fields .monthly-payment .calculating {
    color: #6c757d;
    font-style: italic;
}

.shield-financing-payment-fields .monthly-payment .error {
    color: #dc3545;
}

.shield-financing-payment-fields .financing-note {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    text-align: center;
}

.shield-financing-payment-fields .financing-note small {
    color: #6c757d;
    font-size: 12px;
}

/* General Styles */
.sensors-loan-application-form,
.sensors-loan-customer-portal {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.sensors-loan-login-required {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.sensors-loan-login-required p {
    margin-bottom: 20px;
    font-size: 16px;
    color: #666;
}

/* Application Form Styles */
.loan-form-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #3A39DD;
}

.loan-form-header h2 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 28px;
    font-weight: 600;
}

.loan-form-header p {
    margin: 0;
    color: #666;
    font-size: 16px;
    line-height: 1.5;
}

.form-section {
    margin-bottom: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.form-section h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid #3A39DD;
    padding-bottom: 10px;
}

/* Multi‑step stepper */
.loan-stepper { margin: 10px 0 20px; }
.loan-steps { list-style:none; display:flex; gap:8px; padding:0; margin:0 0 10px; overflow:auto; }
.loan-step { display:flex; align-items:center; gap:8px; padding:8px 12px; border-radius:10px; color:#6b7280; background:#fff; border:1px solid #e5e7eb; white-space:nowrap; }
.loan-step i.bx { font-size:18px; color:#3A39DD; opacity:.8; }
.loan-step.active { color:#0f172a; background:#eef2ff; border-color:#3A39DD; box-shadow:0 2px 6px rgba(58,57,221,.12); }
.loan-step.completed { color:#0f172a; background:#f3f4f6; }
.loan-progress { height:4px; background:#e5e7eb; border-radius:999px; overflow:hidden; }
.loan-progress-bar { height:100%; width:0%; background:#3A39DD; transition:width .25s ease; }

.loan-step-actions { display:flex; gap:10px; align-items:center; justify-content:space-between; margin-top:18px; border-top:1px solid #e5e7eb; padding-top:14px; }
.loan-step-actions .button { display:inline-flex; align-items:center; gap:8px; }
.loan-step-actions .is-disabled { opacity:.6; cursor:not-allowed; }

/* Micro interactions & spinners */
.button { transition: transform .08s ease, box-shadow .18s ease; }
.button:hover { transform: translateY(-1px); box-shadow: 0 6px 12px rgba(17,24,39,.08); }
.button:active { transform: translateY(0); box-shadow: 0 3px 6px rgba(17,24,39,.06); }
.button.is-loading { position: relative; color: transparent !important; }
.button.is-loading::after { content:""; position:absolute; inset:0; margin:auto; width:16px; height:16px; border:2px solid #fff; border-top-color:transparent; border-radius:50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.tab-button { transition: transform .12s ease, box-shadow .18s ease; }
.tab-button:active { transform: scale(.98); }

/* Icons spacing in tabs and cards */
.tab-button i.bx { margin-right:6px; font-size:18px; vertical-align:middle; }
.summary-card i.bx { font-size:24px; color:#3A39DD; opacity:.9; margin-right:6px; }

.form-row {
    margin-bottom: 20px;
}

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

.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    transition: all 0.3s ease;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    border-color: #3A39DD;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.form-row input.error,
.form-row select.error,
.form-row textarea.error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

.form-row textarea.error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

.form-row-half {
    width: 48%;
    float: left;
    margin-right: 4%;
    margin-bottom: 20px;
}

.form-row-half:nth-child(even) {
    margin-right: 0;
}

.form-section::after,
.form-row::after {
    content: "";
    display: table;
    clear: both;
}

/* Ensure proper spacing between sections */
.form-section {
    clear: both;
    overflow: hidden;
}

/* Draft saved indicator */
.draft-saved-indicator {
    background: #d4edda;
    color: #155724;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    border: 1px solid #c3e6cb;
    font-size: 14px;
    display: none;
}

/* File restoration indicators */
.file-restored {
    color: #28a745;
    font-size: 12px;
    margin-top: 5px;
    padding: 8px 12px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.remove-draft-file {
    background: #dc3545;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    cursor: pointer;
    margin-left: 10px;
}

.remove-draft-file:hover {
    background: #c82333;
}

.form-row small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.form-row input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    transform: scale(1.1);
}

.form-row label input[type="checkbox"] {
    margin-right: 10px;
}

/* Loan Preview */
.loan-preview {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.loan-preview h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.preview-details .preview-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 12px 0;
    padding: 8px 0;
    border-bottom: 1px solid #f8f9fa;
}

.preview-details .preview-row:last-child {
    border-bottom: none;
    font-weight: 600;
    font-size: 16px;
    color: #3A39DD;
}

.preview-details .label {
    font-weight: 500;
    color: #666;
}

.preview-details .value {
    font-weight: 600;
    color: #333;
}

/* Document Uploads */
.document-uploads {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px;
    margin-top: 15px;
}

.document-uploads .form-row {
    margin-bottom: 15px;
}

.document-uploads input[type="file"] {
    padding: 8px;
    border: 2px dashed #ddd;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.document-uploads input[type="file"]:hover {
    border-color: #3A39DD;
    background: #f0f8ff;
}

/* Form Actions */
.form-actions {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.form-actions .button {
    margin: 0 10px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.button-primary {
    background: #3A39DD;
    color: #fff;
}

.button-primary:hover {
    background: #3A39DD;
    color: #fff;
}

/* Auth (Login/Register) */
.sensors-loan-auth { max-width: 720px; margin: 0 auto; }
.sensors-loan-auth .auth-card {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 24px;
    box-shadow: 0 8px 18px rgba(0,0,0,0.05);
}
.sensors-loan-auth .auth-tabs { display: flex; gap: 8px; border-bottom: 1px solid #f1f5f9; margin-bottom: 16px; }
.sensors-loan-auth .auth-tab { background: transparent; border: 0; padding: 10px 12px; font-weight: 700; color: #6b7280; cursor: pointer; border-bottom: 2px solid transparent; }
.sensors-loan-auth .auth-tab.active { color: #0f172a; border-bottom-color: #0ea5e9; }
.sensors-loan-auth .auth-form { display: none; }
.sensors-loan-auth .auth-form.active { display: block; }
.sensors-loan-auth .auth-form .form-row { margin-bottom: 14px; }
.sensors-loan-auth .auth-form label { display:block; font-weight:600; color:#374151; margin-bottom:6px; }
.sensors-loan-auth .auth-form input { width:100%; padding:12px 14px; border:2px solid #e5e7eb; border-radius:10px; transition:border-color .2s ease, box-shadow .2s ease; }
.sensors-loan-auth .auth-form input:focus { outline:none; border-color:#0ea5e9; box-shadow:0 0 0 3px rgba(14,165,233,.15); }
.sensors-loan-auth .auth-form .form-actions { margin-top: 8px; }
.sensors-loan-auth .auth-message { margin-top:10px; font-size:13px; }
.sensors-loan-auth .auth-message.success { color:#16a34a; }
.sensors-loan-auth .auth-message.error { color:#dc2626; }

.button-secondary {
    background: #6c757d;
    color: #fff;
}

.button-secondary:hover {
    background: #545b62;
    color: #fff;
}

/* Customer Portal Styles */
.sensors-loan-customer-portal {
    max-width: 1200px !important;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #3A39DD 0%, #3A39DD 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
}

.portal-header h2 {
    margin: 0;
    color: #fff;
    font-size: 32px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.portal-header .button {
    background: #fff;
    color: #3A39DD;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255,255,255,0.2);
    border: none;
}

.portal-header .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,255,255,0.4);
    background: #f0f8ff;
}

/* Portal Tabs - Responsive with Scroll */
.portal-tabs {
    display: flex;
    margin-bottom: 30px;
    background: #fff;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
    scrollbar-width: thin;
    scrollbar-color: #3A39DD #f8f9fa;
}

.portal-tabs::-webkit-scrollbar {
    height: 6px;
}

.portal-tabs::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 10px;
}

.portal-tabs::-webkit-scrollbar-thumb {
    background: #3A39DD;
    border-radius: 10px;
}

.portal-tabs::-webkit-scrollbar-thumb:hover {
    background: #3A39DD;
}

.tab-button {
    padding: 14px 22px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.tab-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 124, 186, 0.1), transparent);
    transition: left 0.5s ease;
}

.tab-button:hover::before {
    left: 100%;
}

.tab-button:hover {
    color: #3A39DD;
    background: rgba(0, 124, 186, 0.08);
    transform: translateY(-2px);
}

.tab-button.active {
    color: #fff;
    background: linear-gradient(135deg, #3A39DD 0%, #3A39DD 100%);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
    transform: translateY(-2px);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Dashboard Summary - Compact Minimal Cards */
.dashboard-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.summary-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
    text-align: left;
    box-shadow: 0 6px 12px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    position: relative;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 18px rgba(0,0,0,0.06);
}

.summary-card h3 {
    margin: 0 0 6px 0;
    color: #6b7280; /* muted */
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.summary-card .amount,
.summary-card .count,
.summary-card .date {
    font-size: 24px;
    font-weight: 800;
    color: #111827; /* slate-900 */
    line-height: 1.2;
}

/* Subtle left-accent per card */
.summary-card { border-left: 4px solid #0ea5e9; }
.summary-card:nth-child(2) { border-left-color: #6366f1; }
.summary-card:nth-child(3) { border-left-color: #f59e0b; }
.summary-card:nth-child(4) { border-left-color: #10b981; }

/* Loan and Application Cards */
.loans-list,
.applications-list {
    display: grid;
    gap: 24px;
}

.loan-card,
.application-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 6px 14px rgba(0,0,0,0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

.loan-card::before,
.application-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg, #3A39DD, #00a8e8);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.4s ease;
}

.loan-card:hover::before,
.application-card:hover::before {
    transform: scaleY(1);
    transform-origin: top;
}

.loan-card:hover,
.application-card:hover {
    box-shadow: 0 10px 24px rgba(0,0,0,0.10);
    transform: translateY(-4px);
}

.loan-header,
.application-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #f1f5f9;
}

.loan-header h3,
.application-header h3 {
    margin: 0;
    color: #111827;
    font-size: 17px;
    font-weight: 700;
}

.loan-status,
.application-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

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

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

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

.status-closed {
    background: #e2e3e5;
    color: #6c757d;
}

/* Loan Details */
.loan-details,
.application-details {
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
    padding: 5px 0;
}

.detail-row .label {
    font-weight: 500;
    color: #666;
}

.detail-row .value {
    font-weight: 600;
    color: #333;
}

/* Loan Actions */
.loan-actions,
.application-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.loan-actions .button,
.application-actions .button {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #3A39DD;
    background: #fff;
    color: #3A39DD;
}

.loan-actions .button:hover,
.application-actions .button:hover {
    background: #3A39DD;
    color: #fff;
}

/* Payment Form */
.payment-form {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    border: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.payment-form h3 {
    margin: 0 0 24px 0;
    color: #333;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.payment-form h3::before {
    content: '💳';
    font-size: 28px;
}

/* Recent Activity */
.recent-activity {
    background: #fff;
    border: none;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.recent-activity h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.recent-activity h3::before {
    content: '🔔';
    font-size: 24px;
}

.activity-list {
    color: #666;
    line-height: 1.8;
}

/* Activity items */
.activity-list p,
.activity-list .activity {
    padding: 12px;
    margin: 8px 0;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #3A39DD;
    transition: all 0.25s ease;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.activity-list p:hover,
.activity-list .activity:hover {
    background: #eef2f7;
    transform: translateX(4px);
}

/* Documents Tab - modern styles */
.documents-section {
    background: transparent;
}

.documents-list {
    display: grid;
    gap: 24px;
}

.loan-documents {
    background: #fff;
    border: none;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.loan-documents h4 { margin: 0 0 12px 0; color: #111827; font-size: 20px; }

.document-category { margin-top: 8px; }
.document-category h5 { margin: 12px 0; color: #374151; font-size: 14px; text-transform: uppercase; letter-spacing: .5px; }

.document-item {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
}

.document-item:hover { background: #f8fafc; }

.doc-icon { font-size: 18px; opacity: .8; }
.doc-name { font-weight: 600; color: #111827; }
.doc-date { color: #6b7280; }

.button.button-small { padding: 6px 10px; border-radius: 8px; font-size: 12px; }

@media (max-width: 768px) {
    .loan-documents { padding: 18px; }
    .document-item { grid-template-columns: 24px 1fr; }
    .document-item .button { grid-column: 2; justify-self: start; margin-top: 6px; }
}

.activity-date {
    color: #8898aa;
    font-size: 12px;
    font-weight: 600;
    margin-right: 6px;
}

/* Type accents */
.activity-payment { border-left-color: #28a745 !important; }
.activity-application { border-left-color: #3A39DD !important; }
.activity-early { border-left-color: #f59e0b !important; }

/* Error and Success Messages */
.field-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    font-weight: 500;
}

.upload-success {
    color: #28a745;
    font-size: 12px;
    margin-top: 5px;
}

.upload-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sensors-loan-application-form,
    .sensors-loan-customer-portal {
        padding: 20px;
        margin: 10px;
    }
    
    .form-row-half {
        width: 100%;
        float: none;
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .portal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 20px;
    }
    
    .portal-header h2 {
        font-size: 24px;
    }
    
    .portal-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 6px;
    }
    
    .tab-button {
        flex-shrink: 0;
        min-width: auto;
        padding: 12px 18px;
        font-size: 14px;
    }
    
    .dashboard-summary {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .summary-card {
        padding: 20px;
    }
    
    .summary-card .amount,
    .summary-card .count,
    .summary-card .date {
        font-size: 28px;
    }
    
    .loan-header,
    .application-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .loan-actions,
    .application-actions {
        justify-content: flex-start;
    }
    
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .detail-row .value {
        margin-top: 5px;
    }
}

@media (max-width: 480px) {
    .loan-form-header h2 {
        font-size: 24px;
    }
    
    .portal-header h2 {
        font-size: 24px;
    }
    
    .form-section {
        padding: 15px;
    }
    
    .summary-card {
        padding: 15px;
    }
    
    .loan-card,
    .application-card {
        padding: 15px;
    }
}

/* Print Styles */
@media print {
    .sensors-loan-application-form,
    .sensors-loan-customer-portal {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .form-actions,
    .loan-actions,
    .application-actions {
        display: none;
    }
    
    .tab-button {
        display: none;
    }
    
    .tab-content {
        display: block !important;
    }
}

/* Override stray icon content from older builds */
.payment-form h3::before,
.recent-activity h3::before { content: none !important; }
/* Global hover-lift for cards */
.loan-card,.application-card,.summary-card,.loan-documents,.recent-activity{transition:transform .15s ease, box-shadow .2s ease}
.loan-card:hover,.application-card:hover,.loan-documents:hover,.recent-activity:hover{transform:translateY(-3px); box-shadow:0 12px 22px rgba(0,0,0,.08)}

/* My Account Section Styles */
.my-account-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.my-account-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 24px;
}

.my-account-section > p {
    color: #6c757d;
    margin-bottom: 30px;
}

.account-info-form .form-section {
    background: #f8f9fa;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 8px;
    border-left: 4px solid #007cba;
}

.account-info-form .form-section h4 {
    color: #007cba;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
}

.account-info-form .form-section p.description {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 15px;
}

.account-info-form .form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 15px;
}

.account-info-form .form-group {
    display: flex;
    flex-direction: column;
}

.account-info-form .form-group.full-width {
    grid-column: 1 / -1;
}

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

.account-info-form .form-group input,
.account-info-form .form-group select {
    padding: 10px 15px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
}

.account-info-form .form-group input:focus,
.account-info-form .form-group select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 123, 186, 0.1);
}

.account-info-form .form-group small {
    margin-top: 5px;
    color: #6c757d;
    font-size: 12px;
}

.account-info-form .form-actions {
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid #dee2e6;
    margin-top: 30px;
}

.account-info-form .button-primary {
    background: #007cba;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.account-info-form .button-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 186, 0.3);
}

.account-info-form .button-primary:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.update-message {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
}

.update-message.success {
    background: #d4edda;
    color: #155724;
}

.update-message.error {
    background: #f8d7da;
    color: #721c24;
}

/* Mobile responsive for My Account form */
@media (max-width: 768px) {
    .account-info-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .my-account-section {
        padding: 20px;
    }
    
    .account-info-form .form-section {
        padding: 20px;
    }
}
