/* ========================================
   PORTAL FORMS - COMPACT LOGIN & SIGNUP STYLING
   ======================================== */

.portal-form {
    max-width: 400px;
    margin: 1.5rem auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.1);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.portal-form h2 {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    color: white;
    margin: 0;
    padding: 1.25rem;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.portal-form-content {
    padding: 1.75rem;
}

.portal-form form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.portal-form label {
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: #1e293b;
    font-size: 14px;
    display: block;
}

.portal-form input[type="text"],
.portal-form input[type="email"],
.portal-form input[type="password"] {
    padding: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #ffffff;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}

.portal-form input[type="text"]:focus,
.portal-form input[type="email"]:focus,
.portal-form input[type="password"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.portal-form button[type="submit"] {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    color: white;
    border: none;
    padding: 0.9rem;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.portal-form button[type="submit"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.portal-form button[type="submit"]:active {
    transform: translateY(-1px);
}

/* Error messages */
.portal-error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #b91c1c;
    padding: 0.9rem;
    border-radius: 6px;
    border: 1px solid #fecaca;
    margin-bottom: 1rem;
    font-weight: 500;
    font-size: 14px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(185, 28, 28, 0.1);
}

/* Success messages */
.portal-success {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #166534;
    padding: 1.75rem;
    border-radius: 12px;
    border: 1px solid #bbf7d0;
    text-align: center;
    margin: 1.5rem auto;
    max-width: 400px;
    box-shadow: 0 2px 8px rgba(22, 101, 52, 0.08);
}

.portal-success h2 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: #166534;
    font-size: 1.25rem;
    font-weight: 600;
    background: none !important;
    padding: 0;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
    background-clip: unset !important;
}

.portal-success p {
    margin-bottom: 1rem;
    font-size: 15px;
    font-weight: 500;
}

.portal-success a {
    color: #166534;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid #166534;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    background: rgba(22, 101, 52, 0.1);
    transition: all 0.3s ease;
    font-size: 14px;
}

.portal-success a:hover {
    background: #166534;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(22, 101, 52, 0.25);
}

/* ========================================
   CLIENT PORTAL DASHBOARD STYLING
   ======================================== */

.client-portal-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #ffffff;
    min-height: 100vh;
}

.portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    padding: 32px;
    border-radius: 20px;
    margin-bottom: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.1);
    min-height: 120px;
    overflow: visible;
}

.portal-header h1 {
    margin: 0;
    color: #1e293b;
    font-weight: 700;
    font-size: 30px;
    letter-spacing: -0.8px;
    line-height: 1.3;
    padding: 10px 0;
    display: inline-block;
    position: relative;
    /* Gradient text with fallback */
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Fallback for browsers that don't support gradient text */
@supports not (background-clip: text) {
    .portal-header h1 {
        color: #3b82f6;
        background: none;
    }
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    min-height: 60px;
    justify-content: center;
}

.user-info p,
.user-info span {
    margin: 0;
    color: #64748b;
    font-weight: 500;
    font-size: 15px;
    line-height: 1.4;
}

.portal-nav {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    padding: 24px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    flex-wrap: wrap;
    justify-content: center;
    border: 1px solid rgba(148, 163, 184, 0.08);
}

/* Navigation buttons - FIXED FOR CLICKABILITY */
.portal-nav .nav-btn {
    all: unset !important;
    display: inline-block !important;
    background: #ffffff !important;
    color: #475569 !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
    padding: 16px 28px !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-align: center !important;
    min-width: 150px !important;
    transition: all 0.3s ease !important;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif !important;
    box-sizing: border-box !important;
    position: relative !important;
    z-index: 999 !important;
    pointer-events: auto !important;
    margin: 0 8px !important;
    text-decoration: none !important;
}

.portal-nav .nav-btn::before,
.portal-nav .nav-btn::after {
    display: none !important;
}

.portal-nav .nav-btn:hover {
    background: #3b82f6 !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
}

.portal-nav .nav-btn.active {
    background: #3b82f6 !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
}

.portal-nav .nav-btn * {
    pointer-events: none !important;
}

/* Dashboard content */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 28px;
    margin-bottom: 32px;
}

.dashboard-card {
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 20px;
    padding: 32px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #10b981 0%, #06b6d4 50%, #3b82f6 100%);
}

.dashboard-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.2);
}

.dashboard-card h3 {
    margin-top: 0;
    margin-bottom: 24px;
    color: #1e293b;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.4px;
}

.activity-list {
    max-height: 320px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 18px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    transition: all 0.3s ease;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    background: rgba(59, 130, 246, 0.02);
    padding-left: 16px;
    border-left: 4px solid #10b981;
    border-radius: 8px;
}

.file-name {
    font-weight: 600;
    color: #334155;
    font-size: 15px;
    line-height: 1.4;
}

.upload-date {
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    flex: 1;
    min-width: 160px;
    padding: 28px 24px;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #10b981, #06b6d4);
}

.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

.stat-number {
    display: block;
    font-size: 42px;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    line-height: 1;
}

/* Fallback for stat numbers */
@supports not (background-clip: text) {
    .stat-number {
        color: #3b82f6;
        background: none;
    }
}

.stat-label {
    display: block;
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.account-info {
    line-height: 1.6;
}

.account-info p {
    margin: 18px 0;
    color: #475569;
    font-size: 15px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.account-info p:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.account-info strong {
    color: #334155;
    font-weight: 600;
    font-size: 14px;
}

.account-info span {
    background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    color: white;
    font-weight: 600;
    font-size: 13px;
    padding: 6px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

/* Files section */
.files-section {
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 20px;
    padding: 36px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 20px;
}

.files-header h3 {
    margin: 0;
    color: #1e293b;
    font-weight: 700;
    font-size: 24px;
    letter-spacing: -0.5px;
}

.files-filter select {
    padding: 14px 20px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    background: white;
    font-weight: 500;
    font-size: 15px;
    color: #475569;
    box-shadow: 0 2px 8px rgba(148, 163, 184, 0.06);
    transition: all 0.3s ease;
}

.files-filter select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.file-card {
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 16px;
    padding: 28px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.file-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

.file-icon {
    font-size: 48px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@supports not (background-clip: text) {
    .file-icon {
        color: #3b82f6;
        background: none;
    }
}

.file-info h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: #334155;
    font-weight: 600;
    line-height: 1.3;
}

.file-info p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.file-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Upload section */
.upload-section {
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 20px;
    padding: 36px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.upload-section h3 {
    margin-top: 0;
    margin-bottom: 28px;
    color: #1e293b;
    font-weight: 700;
    font-size: 24px;
    letter-spacing: -0.5px;
}

.file-upload-area {
    border: 3px dashed rgba(148, 163, 184, 0.3);
    border-radius: 16px;
    padding: 48px;
    text-align: center;
    background: #ffffff;
    transition: all 0.4s ease;
}

.file-upload-area:hover {
    border-color: #3b82f6;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
    transform: translateY(-2px);
}

.upload-drop-zone h4 {
    margin: 20px 0 16px 0;
    color: #1e293b;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.3px;
}

.upload-drop-zone p {
    margin: 10px 0;
    color: #64748b;
    font-weight: 500;
    font-size: 16px;
}

#file-input {
    display: none;
}

.file-input-label {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    color: white;
    padding: 16px 32px;
    border-radius: 12px;
    cursor: pointer;
    display: inline-block;
    margin: 24px 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.25);
}

.file-input-label:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.35);
}

.upload-info {
    margin: 28px 0;
    padding: 24px;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 12px;
}

.upload-info p {
    margin: 8px 0;
    font-size: 14px;
    color: #475569;
    font-weight: 500;
}

/* Buttons */
.upload-btn,
.btn-download,
.logout-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    color: white;
    border: 1px solid #3b82f6;
    padding: 14px 28px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
    pointer-events: auto !important;
    z-index: 10 !important;
}

.upload-btn:hover,
.btn-download:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.3);
    text-decoration: none;
    color: white;
}

.logout-btn {
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
    border-color: #ef4444;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.2);
}

.logout-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(239, 68, 68, 0.3);
    text-decoration: none;
    color: white;
}

.upload-btn:disabled {
    background: #94a3b8;
    border-color: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Messages section */
.messages-section {
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 20px;
    padding: 36px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.messages-section h3 {
    margin-top: 0;
    margin-bottom: 28px;
    color: #1e293b;
    font-weight: 700;
    font-size: 24px;
    letter-spacing: -0.5px;
}

.messages-container {
    padding: 40px;
    text-align: center;
    color: #64748b;
    font-weight: 500;
    font-size: 16px;
}

/* ========================================
   CLIENT PROGRESS BAR STYLING
   ======================================== */

.progress-container {
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.progress-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #10b981 0%, #06b6d4 50%, #3b82f6 100%);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.progress-header h3 {
    margin: 0;
    color: #1e293b;
    font-weight: 700;
    font-size: 24px;
    letter-spacing: -0.5px;
}

.progress-percentage {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.progress-bar-wrapper {
    margin-bottom: 40px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #f1f5f9;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #06b6d4 50%, #3b82f6 100%);
    border-radius: 6px;
    transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.progress-step.completed {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #10b981;
}

.progress-step.current {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #3b82f6;
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

.progress-step.pending {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.step-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.progress-step.completed .step-circle {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.progress-step.current .step-circle {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    animation: pulse 2s infinite;
}

.progress-step.pending .step-circle {
    background: #e2e8f0;
    color: #64748b;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.step-info {
    flex: 1;
    min-width: 0;
}

.step-title {
    font-weight: 600;
    font-size: 16px;
    color: #1e293b;
    margin-bottom: 4px;
    line-height: 1.3;
}

.step-status {
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
}

.progress-step.completed .step-status {
    color: #10b981;
}

.progress-step.current .step-status {
    color: #3b82f6;
    font-weight: 600;
}

.progress-notes {
    margin-top: 32px;
    padding: 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.progress-notes h4 {
    margin: 0 0 12px 0;
    color: #1e293b;
    font-size: 18px;
    font-weight: 600;
}

.progress-notes p {
    margin: 0 0 8px 0;
    color: #475569;
    font-size: 15px;
    line-height: 1.6;
}

.progress-notes small {
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
}

/* ========================================
   GENERAL STYLING
   ======================================== */

/* Enhanced Typography - Scoped to portal elements */
.client-portal-container h1, 
.client-portal-container h2, 
.client-portal-container h3, 
.client-portal-container h4, 
.client-portal-container h5, 
.client-portal-container h6,
.portal-form h1,
.portal-form h2,
.portal-form h3,
.portal-form h4,
.portal-form h5,
.portal-form h6 {
    color: #1e293b;
    font-weight: 700;
    letter-spacing: -0.3px;
}

/* Focus states for accessibility - Scoped to portal elements */
.client-portal-container button:focus,
.client-portal-container input:focus,
.client-portal-container select:focus,
.portal-form button:focus,
.portal-form input:focus,
.portal-form select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Custom Scrollbar - Scoped to portal elements */
.client-portal-container ::-webkit-scrollbar,
.portal-form ::-webkit-scrollbar {
    width: 10px;
}

.client-portal-container ::-webkit-scrollbar-track,
.portal-form ::-webkit-scrollbar-track {
    background: #ffffff;
    border-radius: 5px;
}

.client-portal-container ::-webkit-scrollbar-thumb,
.portal-form ::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    border-radius: 5px;
}

.client-portal-container ::-webkit-scrollbar-thumb:hover,
.portal-form ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2563eb, #0891b2);
}

.activity-list::-webkit-scrollbar {
    width: 8px;
}

.activity-list::-webkit-scrollbar-track {
    background: #ffffff;
    border-radius: 4px;
}

.activity-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    border-radius: 4px;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .client-portal-container {
        padding: 16px;
    }
    
    .portal-form {
        margin: 1rem;
        max-width: none;
    }
    
    .portal-form-content {
        padding: 1.5rem;
    }
    
    .portal-form h2 {
        padding: 1rem;
        font-size: 1.2rem;
    }
    
    .portal-success {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .portal-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 28px;
        min-height: auto;
    }
    
    .portal-header h1 {
        font-size: 28px;
        line-height: 1.2;
        padding: 6px 0;
    }
    
    .user-info {
        align-items: center;
        min-height: auto;
    }
    
    .portal-nav {
        flex-direction: column;
        gap: 12px;
        padding: 20px;
    }
    
    .portal-nav .nav-btn {
        width: 100% !important;
        min-width: auto !important;
        margin: 4px 0 !important;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .files-grid {
        grid-template-columns: 1fr;
    }
    
    .files-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .stats {
        flex-direction: column;
        gap: 16px;
    }
    
    .stat-item {
        min-width: auto;
    }
    
    .file-upload-area {
        padding: 32px 20px;
    }
    
    .dashboard-card,
    .files-section,
    .upload-section,
    .messages-section {
        padding: 24px;
    }
    
    /* Progress bar responsive */
    .progress-container {
        padding: 24px;
        margin-bottom: 24px;
    }
    
    .progress-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 16px;
    }
    
    .progress-header h3 {
        font-size: 20px;
    }
    
    .progress-steps {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .progress-step {
        padding: 16px;
    }
    
    .step-circle {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .step-title {
        font-size: 15px;
    }
    
    .step-status {
        font-size: 13px;
    }
    
    .progress-notes {
        padding: 20px;
        margin-top: 24px;
    }
}