/* ============================================
   PATIENT DASHBOARD - SORRISO EZMERLI STYLE
   Matches the website's design system
============================================ */

.tpa-patient-dashboard {
    margin: 0 auto;
    direction: ltr;
    background: #f8f9fa;
    padding: 40px 20px;
    font-family: 'inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    border-radius: 10px;
}

/* ============================================
   HEADER
============================================ */
.tpa-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #78909C 0%, #607D8B 100%);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(96, 125, 139, 0.2);
}

.tpa-dashboard-header h2 {
    margin: 0;
    color: #ffffff;
    font-size: 32px;
    font-weight: 500;
    letter-spacing: -0.5px;
}

.tpa-logout-btn {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.tpa-logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #fff;
}

/* ============================================
   TABS
============================================ */
.tpa-dashboard-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 30px;
    background: white;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tpa-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 500;
    color: #78909C;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.tpa-tab-btn:hover {
    background: rgba(120, 144, 156, 0.1);
    color: #607D8B;
}

.tpa-tab-btn.active {
    background: linear-gradient(135deg, #78909C 0%, #607D8B 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(120, 144, 156, 0.3);
}

/* ============================================
   TAB CONTENT
============================================ */
.tpa-tab-content {
    display: none;
    animation: fadeInUp 0.4s ease;
}

.tpa-tab-content.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tpa-tab-content h3 {
    color: #2C3E50;
    margin: 40px 0 24px;
    font-size: 24px;
    font-weight: 500;
    position: relative;
    padding-bottom: 12px;
}

.tpa-tab-content h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #78909C, #607D8B);
    border-radius: 2px;
}

/* ============================================
   APPOINTMENTS LIST
============================================ */
.tpa-appointments-list {
    display: grid;
    gap: 20px;
    margin-bottom: 50px;
}

.tpa-appointment-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    position: relative;
    overflow: hidden;
}

.tpa-appointment-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    transition: width 0.3s ease;
}

.tpa-appointment-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.tpa-appointment-card.status-approved {
    border-left-color: #10b981;
}

.tpa-appointment-card.status-approved::before {
    background: linear-gradient(180deg, #10b981, #059669);
}

.tpa-appointment-card.status-pending {
    border-left-color: #f59e0b;
}

.tpa-appointment-card.status-pending::before {
    background: linear-gradient(180deg, #f59e0b, #d97706);
}

.tpa-appointment-card.status-canceled {
    border-left-color: #ef4444;
    opacity: 0.7;
}

.tpa-appointment-card.status-canceled::before {
    background: linear-gradient(180deg, #ef4444, #dc2626);
}

.apt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f3f4f6;
}

.apt-date {
    font-weight: 600;
    color: #1f2937;
    font-size: 18px;
    font-family: 'Inter', sans-serif;
}

.apt-status {
    font-family: inter;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-approved .apt-status {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
}

.status-pending .apt-status {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}

.status-canceled .apt-status {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
}

.apt-body p {
    margin: 12px 0;
    color: #6b7280;
    line-height: 1.8;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
}

.apt-body strong {
    color: #374151;
    margin-right: 8px;
    font-weight: 600;
}

.apt-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #f3f4f6;
    display: flex;
    gap: 12px;
}

.tpa-reschedule-btn,
.tpa-rate-btn,
.tpa-cancel-btn {
    flex: 1;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tpa-reschedule-btn {
    background: linear-gradient(135deg, #78909C, #607D8B);
    color: white;
}

.tpa-reschedule-btn:hover {
    background: linear-gradient(135deg, #607D8B, #546E7A);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(96, 125, 139, 0.3);
}

.tpa-rate-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-family: inter;
}

.tpa-rate-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.tpa-cancel-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.tpa-cancel-btn:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.tpa-cancel-btn:disabled,
.tpa-reschedule-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   FILES GRID
============================================ */
.tpa-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.tpa-file-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.tpa-file-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
    border-color: #78909C;
}

.file-icon {
    font-size: 64px;
    margin-bottom: 16px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.file-info {
    flex: 1;
    margin-bottom: 20px;
    width: 100%;
}

.file-name {
    font-weight: 600;
    color: #1f2937;
    margin: 8px 0;
    word-break: break-word;
    font-size: 15px;
    line-height: 1.4;
}

.file-date {
    color: #9ca3af;
    font-size: 13px;
    margin: 8px 0;
    font-family: 'Inter', sans-serif;
}

.file-download {
    background: linear-gradient(135deg, #78909C, #607D8B);
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    font-size: 14px;
}

.file-download:hover {
    background: linear-gradient(135deg, #607D8B, #546E7A);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(96, 125, 139, 0.3);
    color: #fff;
}

.file-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.file-preview {
    background: #ffffff;
    border: 2px solid #607D8B;
    color: #607D8B;
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 14px;
}

.file-preview:hover {
    background: #607D8B;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(96, 125, 139, 0.3);
}


/* ============================================
   PROFILE FORM
============================================ */
.tpa-profile-form {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.form-row-dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: #374151;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Inter', sans-serif;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #78909C;
    box-shadow: 0 0 0 3px rgba(120, 144, 156, 0.1);
}

.form-group input:disabled {
    background: #f9fafb;
    cursor: not-allowed;
    color: #9ca3af;
}

.form-group small {
    color: #9ca3af;
    font-size: 13px;
    margin-top: 6px;
    font-family: 'Inter', sans-serif;
}


.tpa-btn-primary:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
}

.tpa-message {
    padding: 16px 20px;
    border-radius: 8px;
    margin-top: 24px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.tpa-message.success {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border-left: 4px solid #10b981;
}

.tpa-message.error {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

/* ============================================
   LOADING & EMPTY STATES
============================================ */
.tpa-loading {
    text-align: center;
    padding: 60px 20px;
    color: #78909C;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
}

.tpa-loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {

    0%,
    20% {
        content: '.';
    }

    40% {
        content: '..';
    }

    60%,
    100% {
        content: '...';
    }
}

.tpa-no-data {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
    font-size: 16px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tpa-dashboard-error {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    border-left: 4px solid #ef4444;
}

/* ============================================
   LOGIN FORM
============================================ */
.tpa-login-form {
    max-width: 450px;
    margin: 60px auto;
    padding: 50px 40px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.tpa-login-form h2 {
    text-align: center;
    margin-bottom: 40px;
    color: #1f2937;
    font-size: 28px;
    font-weight: 500;
}

.tpa-login-form label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tpa-login-form input[type="text"],
.tpa-login-form input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.tpa-login-form input[type="text"]:focus,
.tpa-login-form input[type="password"]:focus {
    outline: none;
    border-color: #78909C;
    box-shadow: 0 0 0 3px rgba(120, 144, 156, 0.1);
}

.tpa-login-form input[type="submit"] {
    width: 100%;
    background: linear-gradient(135deg, #78909C, #607D8B);
    color: white;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tpa-login-form input[type="submit"]:hover {
    background: linear-gradient(135deg, #607D8B, #546E7A);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(96, 125, 139, 0.3);
}

.tpa-register-link {
    text-align: center;
    margin-top: 24px;
    color: #6b7280;
    font-size: 15px;
}

.tpa-register-link a {
    color: #78909C;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.tpa-register-link a:hover {
    color: #607D8B;
    text-decoration: underline;
}

/* ============================================
   MODAL STYLES
============================================ */
.tpa-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.tpa-modal-content {
    background: white;
    margin: 5% auto;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 550px;
    position: relative;
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-60px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.tpa-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 32px;
    font-weight: 300;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.tpa-modal-close:hover {
    color: #374151;
    background: #f3f4f6;
    transform: rotate(90deg);
}

.tpa-modal-content h2 {
    margin-top: 0;
    margin-bottom: 30px;
    color: #1f2937;
    font-size: 24px;
    font-weight: 500;
}

/* ============================================
   RATING STARS
============================================ */
.rating-stars {
    text-align: center;
    margin: 40px 0;
    padding: 20px;
    background: linear-gradient(135deg, #78909C, #000);
    border-radius: 12px;
}

.star {
    font-size: 56px;
    color: #d1d5db;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 8px;
    display: inline-block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.star:hover,
.star.selected {
    color: #fbbf24;
    transform: scale(1.3) rotate(12deg);
}

.star:active {
    transform: scale(1.2) rotate(6deg);
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.form-control:focus {
    outline: none;
    border-color: #78909C;
    box-shadow: 0 0 0 3px rgba(120, 144, 156, 0.1);
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 768px) {
    .tpa-patient-dashboard {
        padding: 20px 10px;
    }

    .tpa-dashboard-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 24px 20px;
    }

    .tpa-dashboard-header h2 {
        font-size: 24px;
    }

    .tpa-dashboard-tabs {
        flex-direction: column;
        padding: 4px;
    }

    .tpa-tab-btn {
        width: 100%;
        text-align: center;
    }

    .tpa-files-grid {
        grid-template-columns: 1fr;
    }

    .apt-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .form-row-dashboard {
        grid-template-columns: 1fr;
    }

    .tpa-modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 30px 20px;
    }

    .apt-actions {
        flex-direction: column;
    }

    .tpa-reschedule-btn,
    .tpa-rate-btn,
    .tpa-cancel-btn {
        width: 100%;
    }

    .star {
        font-size: 44px;
        margin: 0 4px;
    }

    .tpa-tab-content h3 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .tpa-dashboard-header h2 {
        font-size: 20px;
    }

    .tpa-login-form {
        padding: 40px 24px;
    }

    .star {
        font-size: 36px;
        margin: 0 2px;
    }
}

.tpa-credentials-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 16px;
    margin-top: 20px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4);
    animation: slideInUp 0.5s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tpa-credentials-box h3 {
    margin: 0 0 20px 0;
    font-size: 24px;
    text-align: center;
}

.credentials-info {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
}

.credentials-info p {
    margin: 12px 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.password-display {
    font-family: 'Courier New', monospace;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 2px;
    margin: 0 10px;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid white;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: white;
    color: #667eea;
    transform: scale(1.05);
}

.important-note {
    background: rgba(255, 193, 7, 0.9);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #ff9800;
    font-weight: 500;
    color: #000;
}

.dashboard-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.tpa-btn-link {
    display: inline-block;
    background: white;
    color: #667eea;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tpa-btn-link:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: #667eea;
}

.tpa-btn-link-secondary {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tpa-btn-link-secondary:hover {
    background: white;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Success Message */
.tpa-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 30px;
    border-radius: 16px;
    margin-top: 20px;
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.4);
    text-align: center;
    font-size: 18px;
    animation: slideInUp 0.5s ease;
}

.tpa-success .dashboard-actions {
    margin-top: 25px;
}

.tpa-success .tpa-btn-link {
    background: white;
    color: #10b981;
}

.tpa-success .tpa-btn-link:hover {
    background: #f0f0f0;
    color: #10b981;
}

.tpa-success .tpa-btn-link-secondary {
    border-color: white;
    color: white;
}

.tpa-success .tpa-btn-link-secondary:hover {
    background: white;
    color: #10b981;
}

@media (max-width: 768px) {
    .dashboard-actions {
        flex-direction: column;
    }

    .tpa-btn-link,
    .tpa-btn-link-secondary {
        width: 100%;
        text-align: center;
    }

    .credentials-info p {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .password-display {
        margin: 10px 0;
    }
}

.copy-btn {
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid white;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: white;
    color: #667eea;
    transform: scale(1.05);
}

.important-note {
    background: rgba(255, 107, 107, 0.9);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #ff4757;
    font-weight: 500;
}

.tpa-btn-link {
    display: inline-block;
    background: white;
    color: #667eea;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.tpa-btn-link:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.upload-file-section {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

.upload-file-section h3 {
    margin: 0 0 20px 0;
    color: #2C3E50;
    font-size: 20px;
}

.upload-area {
    border: 2px dashed #78909C;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    background: #f9fafb;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #607D8B;
    background: #f3f4f6;
}

.upload-area input[type="file"] {
    display: none;
}

.upload-label {
    display: inline-block;
    background: linear-gradient(135deg, #78909C, #607D8B);
    color: white;
    padding: 14px 32px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.upload-label:hover {
    background: linear-gradient(135deg, #607D8B, #546E7A);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(96, 125, 139, 0.3);
}

.file-selected {
    margin-top: 15px;
    color: #10b981;
    font-weight: 600;
    font-size: 15px;
}

#upload-message {
    margin-top: 20px;
}

@media (max-width: 768px) {
    .upload-area {
        padding: 30px 20px;
    }

    .upload-label {
        padding: 12px 24px;
        font-size: 14px;
    }
}

.file-source-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
}

.file-source-badge.dashboard {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.file-source-badge.booking {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

/* File description */
.file-description {
    font-size: 13px;
    color: #6b7280;
    margin: 8px 0;
    font-style: italic;
    line-height: 1.4;
}

/* Enhanced file card hover */
.tpa-file-card:hover .file-source-badge {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* File type specific styling */
.file-card-pdf {
    border-left: 4px solid #ef4444;
}

.file-card-image {
    border-left: 4px solid #10b981;
}

.file-source-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.file-source-badge.dashboard {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.file-source-badge.booking {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.file-source-badge.custom-field {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

/* Hover effect */
.file-source-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

/* ============================================
   TPA AUTH PAGES (Login / Set Password / Forgot / Reset)
============================================ */

.tpa-auth-wrap {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px;
    background: #78909C;
}

.tpa-auth-card {
    width: 100%;
    max-width: 460px;
    background: #fff;
    border-radius: 20px;
    padding: 48px 44px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10);
}

.tpa-auth-logo {
    text-align: center;
    margin-bottom: 24px;
}

.tpa-auth-logo img {
    max-height: 64px;
    width: auto;
}

.tpa-auth-logo-text {
    font-size: 48px;
    line-height: 1;
}

.tpa-auth-title {
    text-align: center;
    font-size: 26px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.tpa-auth-subtitle {
    text-align: center;
    color: #6b7280;
    font-size: 15px;
    margin: 0 0 32px 0;
}

.tpa-auth-welcome-name {
    font-size: 16px;
    color: #374151;
    margin-bottom: 24px;
    font-weight: 500;
}

/* Fields */
.tpa-auth-form .tpa-field {
    margin-bottom: 20px;
}

.tpa-auth-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.tpa-auth-form input[type="email"],
.tpa-auth-form input[type="text"],
.tpa-auth-form input[type="password"],
.tpa-auth-form input[type="tel"] {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    color: #1f2937;
    transition: border-color 0.25s, box-shadow 0.25s;
    box-sizing: border-box;
    background: #fafafa;
}

.tpa-auth-form input:focus {
    outline: none;
    border-color: #78909C;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(120, 144, 156, 0.12);
}

/* Password field with toggle */
.tpa-password-wrap {
    position: relative;
}

.tpa-password-wrap input {
    padding-right: 48px !important;
}

.tpa-toggle-pass {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    line-height: 1;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.tpa-toggle-pass:hover {
    opacity: 1;
}

/* Row: Remember me + Forgot link */
.tpa-field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.tpa-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6b7280;
    cursor: pointer;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-weight: 400 !important;
}

.tpa-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #78909C;
}

.tpa-link-sm {
    font-size: 14px;
    color: #78909C;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.tpa-link-sm:hover {
    color: #546E7A;
    text-decoration: underline;
}

/* Submit button */
.tpa-auth-btn {
    width: 100%;
    background: linear-gradient(135deg, #78909C, #607D8B);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: all 0.3s;
    margin-top: 4px;
}

.tpa-auth-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #607D8B, #546E7A);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(96, 125, 139, 0.3);
}

.tpa-auth-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.tpa-auth-btn-link {
    display: inline-block;
    background: linear-gradient(135deg, #78909C, #607D8B);
    color: #fff;
    border-radius: 10px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.tpa-auth-btn-link:hover {
    background: linear-gradient(135deg, #607D8B, #546E7A);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(96, 125, 139, 0.3);
}

/* Alerts */
.tpa-auth-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    font-weight: 500;
}

.tpa-auth-alert.success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.tpa-auth-alert.error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

/* Password strength bar */
.tpa-strength-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 4px;
    margin-top: 8px;
    overflow: hidden;
}

.tpa-strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    transition: width 0.3s, background 0.3s;
}

.tpa-strength-label {
    display: block;
    font-size: 12px;
    margin-top: 4px;
    font-weight: 600;
    min-height: 16px;
}

/* Success state (forgot password step 2) */
.tpa-auth-success-state {
    text-align: center;
    padding: 20px 0;
}

.tpa-success-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.tpa-auth-success-state h3 {
    font-size: 22px;
    color: #1f2937;
    margin-bottom: 12px;
}

.tpa-auth-success-state p {
    color: #6b7280;
    font-size: 15px;
    margin-bottom: 8px;
}

.tpa-note {
    font-size: 13px !important;
    color: #9ca3af !important;
}

.tpa-auth-center {
    text-align: center;
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 500px) {
    .tpa-auth-card {
        padding: 36px 24px;
    }
}