/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    margin-bottom: 40px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

.header-left {
    text-align: left;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
}

/* Main content */
.main {
    flex: 1;
    padding: 0 40px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

@media (max-width: 768px) {
    .main {
        padding: 0 20px;
    }
    
    .card {
        padding: 24px;
        margin: 0 auto;
    }
    
    .clients-empty {
        padding: 60px 20px;
        grid-column: 1 / -1;
    }
    
    .client-bar-content {
        padding: 12px 16px;
        gap: 12px;
    }
    
    .client-avatar {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .client-meta {
        min-width: 100px;
    }
    
    .client-name {
        font-size: 15px;
    }
    
    .client-email {
        font-size: 13px;
    }
    
    .client-actions {
        opacity: 1;
        gap: 6px;
    }
    
    .btn-icon {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

/* Cards */
.card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #4f46e5;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h3 {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 15px;
    color: #374151;
}

/* Form section */
.form-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e5e7eb;
}

.item-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-group {
    display: flex;
    gap: 10px;
}

@media (max-width: 576px) {
    .input-group {
        flex-direction: column;
    }
}

.item-form input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.item-form input:focus {
    outline: none;
    border-color: #4f46e5;
    background: white;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.3);
}

/* Items list */
.items-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.item-header {
    display: flex;
    justify-content: between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.item-title {
    font-weight: 600;
    color: #1e293b;
    font-size: 1.1rem;
    flex: 1;
}

.item-description {
    color: #64748b;
    margin-bottom: 15px;
}

.item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #94a3b8;
}

.item-actions {
    display: flex;
    gap: 10px;
}

/* Status indicator */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

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

.status-text {
    font-weight: 500;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: #6b7280;
    font-size: 1.1rem;
}

.loading.hidden {
    display: none;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 40px;
    color: white;
    opacity: 0.8;
}

.text-red {
    color: #ef4444;
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

.item {
    animation: fadeIn 0.5s ease-out;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .card {
        padding: 20px;
    }
    
    .item-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .item-actions {
        align-self: flex-start;
    }
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    background: var(--surface-color);
    border-radius: 12px;
    padding: 6px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    gap: 4px;
}

.tab-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn:hover {
    background: var(--hover-color);
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.tab-btn i {
    font-size: 16px;
}

/* Tab Content */
.tab-content {
    display: none;
    width: 100%;
}

.tab-content.active {
    display: block;
    width: 100%;
}

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

.card-description {
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.card-description p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

.card-description i {
    color: var(--primary-color);
    margin-right: 8px;
}

.card-header h2 {
    margin: 0;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
    text-align: left;
}

/* Clients Grid */
.clients-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    width: 100%;
}

/* Enhanced Form Styles */
.send-form,
.favorite-form,
.video-form {
    padding: 0;
    background: #ffffff;
    border-radius: 12px;
}

.send-form .form-content,
.favorite-form .form-content,
.video-form .form-content {
    padding: 24px;
    background: #ffffff;
    border-radius: 12px;
}

/* Enhanced Form Groups */
.send-form .form-group,
.favorite-form .form-group,
.video-form .form-group {
    margin-bottom: 20px;
}

.send-form .form-row,
.favorite-form .form-row,
.video-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Enhanced Labels */
.send-form label,
.favorite-form label,
.video-form label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #1f2937;
    margin-bottom: 8px;
    line-height: 1.4;
}

/* Enhanced Inputs */
.send-form input,
.send-form select,
.send-form textarea,
.favorite-form input,
.favorite-form select,
.favorite-form textarea,
.video-form input,
.video-form select,
.video-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: #ffffff;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.send-form input:focus,
.send-form select:focus,
.send-form textarea:focus,
.favorite-form input:focus,
.favorite-form select:focus,
.favorite-form textarea:focus,
.video-form input:focus,
.video-form select:focus,
.video-form textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: #fefefe;
}

/* Enhanced Placeholders */
.send-form input::placeholder,
.send-form textarea::placeholder,
.favorite-form input::placeholder,
.favorite-form textarea::placeholder,
.video-form input::placeholder,
.video-form textarea::placeholder {
    color: #9ca3af;
    font-size: 14px;
}

/* Enhanced Textareas */
.send-form textarea,
.favorite-form textarea,
.video-form textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

/* Enhanced Small Text */
.send-form small,
.favorite-form small,
.video-form small {
    display: block;
    margin-top: 6px;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.4;
}

/* Enhanced Required Fields */
.send-form label:has(+ input[required])::after,
.send-form label:has(+ select[required])::after,
.send-form label:has(+ textarea[required])::after,
.favorite-form label:has(+ input[required])::after,
.favorite-form label:has(+ select[required])::after,
.favorite-form label:has(+ textarea[required])::after,
.video-form label:has(+ input[required])::after,
.video-form label:has(+ select[required])::after,
.video-form label:has(+ textarea[required])::after {
    content: " *";
    color: #ef4444;
    font-weight: 600;
}

/* Send Form Specific Styles */
.form-info {
    margin-top: 24px;
    padding: 0 24px;
}

.info-box {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 16px;
}

.info-box i {
    color: #3b82f6;
    margin-top: 2px;
    flex-shrink: 0;
    font-size: 18px;
}

.info-box h4 {
    margin: 0 0 10px 0;
    color: #1f2937;
    font-size: 15px;
    font-weight: 600;
}

.info-box ul {
    margin: 0;
    padding-left: 18px;
    color: #4b5563;
    font-size: 13px;
    line-height: 1.6;
}

.info-box li {
    margin-bottom: 6px;
}

.info-box.success {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #86efac;
}

.info-box.success i {
    color: #16a34a;
}

.form-link-section {
    margin-top: 20px;
}

.form-link-display {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    align-items: center;
}

.form-link-display input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: monospace;
    font-size: 14px;
    background: #f9fafb;
    color: #374151;
}

.form-link-display input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#emailGroup,
#smsGroup {
    transition: all 0.3s ease;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

/* Enhanced Modal Content */
.modal-content {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    width: 90vw;
    max-height: 85vh;
    overflow: hidden;
}

/* Enhanced Modal Header */
.modal-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 24px;
    border-bottom: 2px solid #e5e7eb;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header i {
    color: #3b82f6;
    font-size: 20px;
}

/* Enhanced Modal Footer */
.modal-footer {
    background: #f9fafb;
    padding: 20px 24px;
    border-top: 2px solid #e5e7eb;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Enhanced Buttons */
.modal-footer .btn {
    padding: 12px 24px;
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.modal-footer .btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.modal-footer .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.modal-footer .btn-secondary {
    background: #f3f4f6;
    color: #4b5563;
    border: 2px solid #e5e7eb;
}

.modal-footer .btn-secondary:hover {
    background: #e5e7eb;
    color: #374151;
}

/* Videos Grid Styles */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
    width: 100%;
}

.video-item {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: all 0.2s ease;
    position: relative;
}

.video-item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: #d1d5db;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    background: #f3f4f6;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-thumbnail .video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #9ca3af;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.video-thumbnail .video-placeholder i {
    font-size: 48px;
    margin-bottom: 8px;
}

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.video-play-overlay:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-content {
    padding: 20px;
}

.video-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.video-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    line-height: 1.3;
    flex: 1;
    margin-right: 12px;
}

.video-actions {
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.video-item:hover .video-actions {
    opacity: 1;
}

.video-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.video-tag {
    background: #f3f4f6;
    color: #374151;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.video-tag.category {
    background: #eff6ff;
    color: #1d4ed8;
}

.video-tag.difficulty {
    background: #fef3c7;
    color: #d97706;
}

.video-tag.duration {
    background: #f0fdf4;
    color: #15803d;
}

.video-description {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #9ca3af;
}

.video-url {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.video-url:hover {
    text-decoration: underline;
}

.videos-empty {
    text-align: center;
    padding: 80px 40px;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    grid-column: 1 / -1;
}

.videos-empty i {
    font-size: 64px;
    color: var(--primary-color);
    margin-bottom: 24px;
    opacity: 0.3;
}

.videos-empty h3 {
    margin: 0 0 12px 0;
    color: var(--text-primary);
    font-size: 20px;
}

.videos-empty p {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
}



@media (max-width: 768px) {
    .videos-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .video-item {
        margin-bottom: 16px;
    }
    
    .video-actions {
        opacity: 1; /* Always visible on mobile */
    }
    
    .videos-empty {
        padding: 60px 20px;
    }
    
    .video-thumbnail {
        height: 180px;
    }
}

/* Generate Plan Modal Styles */
.generate-form {
    max-height: 75vh;
    overflow-y: auto;
}

.generate-form .form-content {
    padding: 24px;
}

.generate-form h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

.plan-type-selection,
.plan-duration,
.plan-customization,
.ai-preview {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.ai-preview {
    border-bottom: none;
    margin-bottom: 0;
}

.plan-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
}

.plan-option {
    cursor: pointer;
}

.plan-option input[type="radio"] {
    display: none;
}

.generate-form .plan-card {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 8px;
    text-align: center;
    transition: all 0.2s ease;
    position: relative;
    height: 90px !important;
    max-height: 90px !important;
    min-height: 90px !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.generate-form .plan-card i {
    font-size: 20px;
    color: #6b7280;
    margin-bottom: 4px;
    display: block;
}

.generate-form .plan-card span {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 3px;
}

.generate-form .plan-card small {
    display: block;
    font-size: 11px;
    color: #6b7280;
    line-height: 1.3;
    margin-bottom: 0;
}

.plan-option input[type="radio"]:checked + .plan-card {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.plan-option input[type="radio"]:checked + .plan-card i {
    color: #3b82f6;
}

.plan-option input[type="radio"]:checked + .plan-card span {
    color: #1d4ed8;
}

.generate-form .plan-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

/* PDF Preview Modal */
.pdf-modal {
    max-width: 90vw;
    width: 1200px;
    max-height: 90vh;
}

.pdf-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.pdf-content {
    background: #f3f4f6;
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.pdf-viewer {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    min-height: 600px;
    padding: 48px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
    color: #1f2937;
}

/* Professional PDF Header */
.pdf-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 48px;
    padding-bottom: 24px;
    border-bottom: 3px solid #e5e7eb;
    position: relative;
}

.pdf-logo-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 160px;
    height: 80px;
}

.pdf-logo {
    max-height: 80px;
    max-width: 160px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    background: white;
    padding: 8px;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.pdf-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 80px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 8px;
    border: 2px solid #1d4ed8;
}

.logo-placeholder-text {
    color: white;
    font-weight: 700;
    font-size: 14px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pdf-title {
    text-align: center;
    flex: 1;
    margin: 0 32px;
}

.pdf-title h1 {
    margin: 0 0 8px 0;
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    letter-spacing: -0.025em;
}

.pdf-title p {
    margin: 0;
    font-size: 18px;
    color: #6b7280;
    font-weight: 500;
}

.pdf-client-info {
    text-align: right;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

.pdf-client-info strong {
    color: #1f2937;
    font-size: 16px;
    display: block;
    margin-bottom: 4px;
}

/* PDF Sections */
.pdf-section {
    margin-bottom: 40px;
}

.pdf-section:last-child {
    margin-bottom: 0;
}

.pdf-section h2 {
    font-size: 24px;
    color: #1f2937;
    margin: 0 0 24px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pdf-section h2 i {
    color: #3b82f6;
}

/* Plan Content */
.plan-content {
    font-size: 16px;
    line-height: 1.7;
}

/* Day Cards */
.pdf-day {
    margin-bottom: 32px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.pdf-day-header {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pdf-day-number {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

.pdf-day-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.pdf-day-content {
    padding: 24px;
}

/* Workout Styles */
.workout-full-content {
    font-size: 16px;
    line-height: 1.8;
    color: #374151;
}

.workout-item {
    margin-bottom: 12px;
    padding: 8px 0;
}

.workout-item.numbered {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.workout-item.bulleted {
    margin-left: 16px;
    color: #4b5563;
}

.workout-item.special {
    background: #f0f9ff;
    padding: 12px 16px;
    border-left: 4px solid #3b82f6;
    border-radius: 4px;
    font-weight: 500;
    color: #1e40af;
    margin: 16px 0;
}

.workout-exercise {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #f3f4f6;
}

.workout-exercise:last-child {
    border-bottom: none;
}

.exercise-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 16px;
    flex: 1;
}

.exercise-details {
    display: flex;
    gap: 16px;
    align-items: center;
    font-size: 14px;
    color: #6b7280;
}

.exercise-sets,
.exercise-reps,
.exercise-time {
    background: #f3f4f6;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
    color: #374151;
}

.exercise-sets {
    background: #dbeafe;
    color: #1e40af;
}

.exercise-reps {
    background: #dcfce7;
    color: #166534;
}

.exercise-time {
    background: #fef3c7;
    color: #92400e;
}

/* Simple Meal Layout */
.simple-meal-layout {
    font-size: 16px;
    line-height: 1.6;
    color: #374151;
}

.simple-meal-section {
    margin-bottom: 24px;
}

.simple-meal-header {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 4px;
}

.simple-meal-content {
    margin: 0 0 8px 20px;
    font-size: 15px;
    line-height: 1.6;
    color: #4b5563;
    padding-right: 20px;
}

/* Legacy Meal Styles */
.meal-section-container {
    margin-bottom: 32px;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.meal-type-header {
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.meal-type-header.breakfast {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
}

.meal-type-header.lunch {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.meal-type-header.dinner {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.meal-type-header.snack {
    background: linear-gradient(135deg, #f472b6 0%, #ec4899 100%);
    color: white;
}

.meal-type-header.pre-workout {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.meal-type-header.post-workout {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.meal-type-header.other {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
}

.meal-type-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.meal-calories {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
}

.meal-content {
    padding: 24px;
}

.meal-ingredients-section,
.meal-instructions-section {
    margin-bottom: 20px;
}

.meal-ingredients-section:last-child,
.meal-instructions-section:last-child {
    margin-bottom: 0;
}

.meal-ingredients-section h5,
.meal-instructions-section h5 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: #374151;
    font-weight: 600;
}

.meal-ingredients,
.meal-instructions {
    font-size: 15px;
    line-height: 1.6;
    color: #4b5563;
}

.meal-item {
    margin-bottom: 24px;
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.meal-header {
    background: #1f2937;
    color: white;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.meal-name {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.meal-section {
    margin-bottom: 16px;
}

.meal-section:last-child {
    margin-bottom: 0;
}

.meal-section h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #374151;
    font-weight: 600;
}

.instructions-toggle {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.instructions-toggle:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.instructions-content {
    margin-top: 12px;
    padding: 16px;
    background: #ffffff;
    border-radius: 6px;
    border-left: 4px solid #3b82f6;
    display: none;
}

.instructions-content.show {
    display: block;
}

/* Video Links */
.video-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    border-bottom: 2px solid #3b82f6;
}

.video-link:hover {
    background: #dbeafe;
    color: #1d4ed8;
    transform: translateY(-1px);
}

/* Client Info Styling */
.client-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.client-info-item {
    background: #f8fafc;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

.client-info-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
    margin-bottom: 4px;
}

.client-info-value {
    font-size: 16px;
    color: #1f2937;
    font-weight: 600;
}

/* Notes Section */
.notes-section {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 20px;
    margin-top: 32px;
}

.notes-section h3 {
    margin: 0 0 12px 0;
    color: #92400e;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notes-section p {
    margin: 8px 0;
    color: #78350f;
    line-height: 1.6;
}

/* Print Styles */
@media print {
    .pdf-viewer {
        box-shadow: none;
        padding: 24px;
    }
    
    .pdf-content {
        background: white;
        padding: 0;
    }
    
    .instructions-toggle {
        display: none;
    }
    
    .instructions-content {
        display: block !important;
    }
    
    .pdf-logo {
        max-height: 80px !important;
        max-width: 160px !important;
        object-fit: contain !important;
        border-radius: 8px !important;
        border: 2px solid #e5e7eb !important;
        background: white !important;
        padding: 8px !important;
        display: block !important;
    }
    
    .pdf-logo-container {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        min-width: 160px !important;
    }
}

@media (max-width: 768px) {
    .plan-options {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .plan-card {
        padding: 16px;
    }
    
    .pdf-modal {
        width: 95vw;
    }
    
    .pdf-actions {
        flex-direction: column;
        gap: 6px;
    }
    
    .pdf-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .pdf-client-info {
        text-align: center;
    }
}

/* Delivery Modal Styles */
.delivery-option {
    margin-bottom: 24px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

.delivery-option h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

.delivery-option p {
    margin: 0 0 12px 0;
    color: #6b7280;
    font-size: 14px;
}

.delivery-option .btn {
    margin-top: 8px;
}

/* Enhanced delivery modal styles */
.enhanced-option {
    position: relative;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.enhanced-option:hover {
    border-color: #3b82f6;
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

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

.delivery-header h4 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.delivery-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.delivery-badge.recommended {
    background: #dcfce7;
    color: #166534;
}

.delivery-badge.quick {
    background: #dbeafe;
    color: #1d4ed8;
}

.delivery-badge.manual {
    background: #f3f4f6;
    color: #374151;
}

.delivery-badge.best-experience {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    animation: pulse 2s infinite;
}

.delivery-description {
    font-size: 13px;
    color: #6b7280;
    margin: 8px 0 16px 0;
    font-style: italic;
}

.delivery-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.delivery-actions .btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.delivery-tips {
    margin-top: 24px;
    padding: 16px;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
}

.delivery-tips h5 {
    margin: 0 0 12px 0;
    color: #92400e;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.delivery-tips ul {
    margin: 0;
    padding-left: 20px;
    color: #92400e;
}

.delivery-tips li {
    margin-bottom: 4px;
    font-size: 13px;
}

.delivery-tips strong {
    color: #78350f;
}

/* Preview modal styles */
.email-preview, .sms-preview {
    text-align: left;
}

.email-header {
    font-size: 14px;
    padding: 12px;
    background: #f1f5f9;
    border-radius: 6px;
    margin-bottom: 16px;
}

.email-body {
    font-size: 13px;
    line-height: 1.5;
}

.sms-bubble {
    margin: 0 auto 12px 0;
    display: inline-block;
    font-size: 14px;
    line-height: 1.4;
}

/* Favorites Grid Styles */
.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
    width: 100%;
}

.favorite-item {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 20px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.favorite-item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: #d1d5db;
}

.favorite-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.favorite-item-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    line-height: 1.3;
}

.favorite-item-actions {
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.favorite-item:hover .favorite-item-actions {
    opacity: 1;
}

.favorite-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.favorite-tag {
    background: #f3f4f6;
    color: #374151;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.favorite-tag.type {
    background: #eff6ff;
    color: #1d4ed8;
}

.favorite-tag.difficulty {
    background: #fef3c7;
    color: #d97706;
}

.favorite-tag.duration {
    background: #f0fdf4;
    color: #15803d;
}

.favorite-tag.calories {
    background: #fce7f3;
    color: #be185d;
}

.favorite-item-description {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.favorite-item-details {
    font-size: 13px;
    color: #9ca3af;
}

.favorites-empty {
    text-align: center;
    padding: 80px 40px;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    grid-column: 1 / -1;
}

.favorites-empty i {
    font-size: 64px;
    color: var(--primary-color);
    margin-bottom: 24px;
    opacity: 0.3;
}

.favorites-empty h3 {
    margin: 0 0 12px 0;
    color: var(--text-primary);
    font-size: 20px;
}

.favorites-empty p {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
}

/* Scrollable Form Content */
.favorite-form,
.video-form {
    max-height: 70vh;
    overflow-y: auto;
}

.favorite-form::-webkit-scrollbar,
.video-form::-webkit-scrollbar {
    width: 6px;
}

.favorite-form::-webkit-scrollbar-track,
.video-form::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.favorite-form::-webkit-scrollbar-thumb,
.video-form::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.favorite-form::-webkit-scrollbar-thumb:hover,
.video-form::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

@media (max-width: 768px) {
    /* Enhanced Form Mobile Styles */
    .send-form .form-row,
    .favorite-form .form-row,
    .video-form .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .send-form .form-content,
    .favorite-form .form-content,
    .video-form .form-content {
        padding: 20px 16px;
    }
    
    .modal-content {
        width: 95vw;
        max-height: 90vh;
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 20px 16px;
    }
    
    .modal-header h3 {
        font-size: 16px;
    }
    
    .modal-footer {
        padding: 16px;
        flex-direction: column-reverse;
    }
    
    .modal-footer .btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 16px;
        justify-content: center;
    }
    
    .form-info {
        padding: 0 16px;
    }
    
    .info-box {
        padding: 16px;
        flex-direction: column;
        gap: 12px;
    }
    
    #emailGroup,
    #smsGroup {
        padding: 16px;
    }
    
    /* Favorites Mobile */
    .favorites-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .favorite-item {
        padding: 16px;
    }
    
    .favorite-item-actions {
        opacity: 1; /* Always visible on mobile */
    }
    
    .favorites-empty {
        padding: 60px 20px;
    }
}

/* Settings Styles */
.settings-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e5e7eb;
}

.settings-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.settings-section h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-section p {
    margin: 0 0 20px 0;
    color: #6b7280;
    font-size: 14px;
}

/* Logo Upload Styles */
.logo-upload-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.current-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 120px;
    height: 120px;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    background: #f9fafb;
    transition: all 0.2s ease;
}

.current-logo.has-logo {
    border-style: solid;
    border-color: #e5e7eb;
    background: #ffffff;
}

.logo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #9ca3af;
    text-align: center;
}

.logo-placeholder i {
    font-size: 32px;
}

.logo-placeholder span {
    font-size: 12px;
    font-weight: 500;
}

.current-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

.logo-upload-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.logo-info {
    padding: 12px;
    background: #f3f4f6;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

.logo-info small {
    color: #6b7280;
    line-height: 1.5;
}

/* Trainer Info Form */
.trainer-info-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.trainer-info-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.trainer-info-form label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.trainer-info-form input,
.trainer-info-form textarea {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.trainer-info-form input:focus,
.trainer-info-form textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.trainer-info-form textarea {
    resize: vertical;
    min-height: 60px;
}

@media (max-width: 768px) {
    .trainer-info-form .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .logo-upload-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .logo-upload-controls .btn {
        justify-content: center;
    }
}

/* Client Bar Styles */
.client-bar {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.client-bar:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
    border-color: #d1d5db;
}

.client-bar-content {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    gap: 16px;
}

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

.client-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.client-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.client-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.client-info h3 {
    margin: 0 0 4px 0;
    color: var(--text-primary);
    font-size: 18px;
}

.client-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.client-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.stat-item {
    text-align: center;
    padding: 8px;
    background: var(--background-color);
    border-radius: 6px;
}

.stat-value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 16px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.client-goals {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.goal-tag {
    background: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: #ffffff;
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 0 24px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

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

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--hover-color);
    color: var(--text-primary);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 24px;
    border-top: 1px solid var(--border-color);
    margin-top: 24px;
}

/* Client Form */
.client-form {
    padding: 0 24px;
}

/* Form Navigation */
.form-nav {
    display: flex;
    background: #f8fafc;
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 24px;
    gap: 4px;
    border: 1px solid #e2e8f0;
}

.form-nav-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
}

.form-nav-btn:hover {
    background: var(--hover-color);
    color: var(--text-primary);
}

.form-nav-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.form-nav-btn.completed {
    background: #10b981;
    color: white;
}

.step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
}

.form-nav-btn.active .step-number,
.form-nav-btn.completed .step-number {
    background: rgba(255, 255, 255, 0.3);
}

.step-text {
    font-size: 12px;
    font-weight: 500;
}

/* Form Steps */
.form-steps {
    min-height: 400px;
}

.form-step {
    display: none;
    animation: slideIn 0.3s ease-out;
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
}

.form-step.active {
    display: block;
    background: #ffffff;
}

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

.step-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.step-header h4 {
    margin: 0 0 8px 0;
    color: #1f2937;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

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

.form-content {
    padding: 0;
}

/* Form Navigation Buttons */
.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-top: 24px;
    border-top: 1px solid var(--border-color);
}

.step-indicator {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.form-grid {
    display: grid;
    gap: 32px;
}

.form-section {
    background: var(--surface-color);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.form-section h4 {
    margin: 0 0 20px 0;
    color: var(--text-primary);
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

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

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

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #374151;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: #ffffff;
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
    background: #fef2f2;
}

.form-group input.error:focus,
.form-group select.error:focus,
.form-group textarea.error:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 12px;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Settings Section */
.settings-section {
    margin-bottom: 32px;
    padding: 24px;
    background: var(--surface-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.settings-section h3 {
    margin: 0 0 12px 0;
    color: var(--text-primary);
    font-size: 18px;
}

.settings-section p {
    margin: 0;
    color: var(--text-secondary);
}

/* Client Bar Content */
.client-main-info {
    flex: 1;
    min-width: 0;
}

.client-name {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.client-email {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.client-phone {
    font-size: 13px;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.client-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    min-width: 120px;
}

.client-goal {
    font-size: 13px;
    font-weight: 500;
    color: #3b82f6;
    background: #eff6ff;
    padding: 4px 8px;
    border-radius: 6px;
    margin-bottom: 4px;
    white-space: nowrap;
}

.client-activity {
    font-size: 12px;
    color: #9ca3af;
}

.client-generate {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.client-generate .btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.client-generate .btn-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.client-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.client-bar:hover .client-actions {
    opacity: 1;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: #f3f4f6;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.btn-icon:hover {
    background: #e5e7eb;
    color: #374151;
}

.btn-icon.btn-danger:hover {
    background: #fee2e2;
    color: #dc2626;
}

.client-status-indicator {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #10b981;
    border-radius: 0 2px 2px 0;
}

/* Empty State for Clients */
.clients-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 40px;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.clients-empty i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.clients-empty h3 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
}

.clients-empty p {
    margin: 0;
}

/* Additional Responsive Design */
@media (max-width: 768px) {
    .tab-navigation {
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    
    .tab-btn {
        flex-shrink: 0;
        min-width: 120px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .clients-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 16px 16px 0 16px;
    }
    
    .client-form {
        padding: 0 16px;
    }
    
    .modal-footer {
        padding: 16px;
        flex-direction: column-reverse;
    }
    
    .client-stats {
        grid-template-columns: 1fr;
    }
    
    .form-nav {
        flex-direction: column;
        gap: 8px;
    }
    
    .form-nav-btn {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
        gap: 12px;
    }
    
    .step-text {
        font-size: 14px;
    }
    
    .form-navigation {
        flex-direction: column;
        gap: 16px;
    }
    
    .form-navigation .step-indicator {
        order: -1;
    }
}

/* PDF Editing Styles */
.editable {
    position: relative;
    transition: all 0.2s ease;
    min-height: 20px;
    padding: 4px;
    border-radius: 4px;
}

.editable:hover {
    background-color: rgba(66, 153, 225, 0.1);
    outline: 1px dashed rgba(66, 153, 225, 0.3);
    cursor: text;
}

.editable:focus,
.editable.editing {
    background-color: rgba(66, 153, 225, 0.15);
    outline: 2px solid rgba(66, 153, 225, 0.5);
    box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.2);
}

.editable:focus::before,
.editable.editing::before {
    content: "✏️ Editing";
    position: absolute;
    top: -25px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    z-index: 10;
    opacity: 0.9;
}

/* Button states for editing */
.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Edit mode notification */
.edit-mode-active .pdf-viewer {
    border: 2px dashed rgba(66, 153, 225, 0.3);
    border-radius: 8px;
    position: relative;
}

.edit-mode-active .pdf-viewer::before {
    content: "📝 Edit Mode Active - Click on any text to modify it";
    position: absolute;
    top: -35px;
    left: 0;
    right: 0;
    text-align: center;
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
    padding: 8px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    z-index: 5;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Enhanced styling for editable workout items */
.workout-item.editable {
    margin: 4px 0;
    padding: 6px 8px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.workout-item.editable:hover {
    border-left-color: var(--primary-color);
    background-color: rgba(66, 153, 225, 0.05);
}

/* Enhanced styling for editable meal content */
.simple-meal-content.editable {
    padding: 8px;
    border-radius: 4px;
    margin-top: 4px;
}

.simple-meal-content.editable:hover {
    background-color: rgba(72, 187, 120, 0.1);
    outline: 1px dashed rgba(72, 187, 120, 0.3);
}

.simple-meal-content.editable:focus,
.simple-meal-content.editable.editing {
    background-color: rgba(72, 187, 120, 0.15);
    outline: 2px solid rgba(72, 187, 120, 0.5);
    box-shadow: 0 0 0 2px rgba(72, 187, 120, 0.2);
}

/* Header editing styles */
.pdf-header .editable {
    text-align: center;
}

.pdf-header h1.editable:hover {
    color: var(--primary-color);
}

/* Section content editing */
.pdf-section .editable:hover {
    background-color: rgba(128, 90, 213, 0.1);
    outline: 1px dashed rgba(128, 90, 213, 0.3);
}

.pdf-section .editable:focus,
.pdf-section .editable.editing {
    background-color: rgba(128, 90, 213, 0.15);
    outline: 2px solid rgba(128, 90, 213, 0.5);
    box-shadow: 0 0 0 2px rgba(128, 90, 213, 0.2);
}

/* Responsive editing styles */
@media (max-width: 768px) {
    .editable:focus::before,
    .editable.editing::before {
        font-size: 10px;
        padding: 1px 6px;
        top: -22px;
    }
    
    .edit-mode-active .pdf-viewer::before {
        font-size: 12px;
        padding: 6px;
        top: -30px;
    }
}

/* ==============================================
   AUTHENTICATION STYLES
   ============================================== */

/* User Profile in Header */
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: white;
}

.user-email {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.sign-in-section {
    display: flex;
    align-items: center;
}

/* Terms Agreement Styles */
.terms-agreement {
    margin: 16px 0;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.terms-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: #6b7280;
    text-align: center;
}

.terms-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.terms-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Authentication Modal */
.auth-modal {
    max-width: 500px;
    width: 90%;
}

.auth-content {
    padding: 24px;
}

.auth-toggle {
    display: flex;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 24px;
}

.auth-toggle-btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    background: none;
    border-radius: 6px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-toggle-btn.active {
    background: white;
    color: #1f2937;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.social-auth {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 24px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    color: #374151;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.social-btn:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

.google-btn {
    border-color: #db4437;
}

.google-btn:hover {
    border-color: #c33d2e;
    background: #fef7f7;
}

.apple-btn {
    border-color: #000;
    color: #000;
}

.apple-btn:hover {
    border-color: #333;
    background: #f8f8f8;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: #6b7280;
    font-size: 14px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.auth-divider span {
    padding: 0 16px;
    background: white;
}

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

.auth-form .form-group {
    margin-bottom: 16px;
}

.auth-form .form-group:last-child {
    margin-bottom: 0;
}

.signup-only {
    display: block;
}

.signup-only.hidden {
    display: none;
}

.auth-submit {
    width: 100%;
    padding: 12px 24px;
    font-weight: 500;
}

/* Email Verification Section */
.verification-section {
    margin: 20px 0;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-align: center;
}

.verification-section.hidden {
    display: none;
}

.verification-section.active {
    display: block;
}

.verification-info {
    margin-bottom: 20px;
    color: #374151;
}

.verification-info i {
    font-size: 24px;
    color: #3b82f6;
    margin-bottom: 8px;
}

.verification-info p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.verification-section .form-group {
    margin-bottom: 16px;
}

.verification-section .form-group input {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 2px;
}

.verification-section .btn {
    margin-top: 8px;
}

.phone-auth {
    margin-bottom: 24px;
}

.phone-btn {
    width: 100%;
    padding: 12px 24px;
    margin-top: 12px;
}

.phone-verify {
    margin-top: 16px;
    padding: 16px;
    background: #f3f4f6;
    border-radius: 8px;
}

.phone-verify .form-group {
    margin-bottom: 12px;
}

.phone-verify .btn {
    margin-right: 8px;
    margin-bottom: 8px;
}

.auth-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    color: #6b7280;
    font-size: 14px;
}

.auth-loading .fa-spinner {
    font-size: 18px;
}

/* Authentication Overlay */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.auth-overlay.hidden {
    display: none;
}

.auth-overlay-content {
    background: white;
    padding: 48px 32px;
    border-radius: 12px;
    text-align: center;
    max-width: 400px;
    margin: 20px;
}

.auth-overlay-content i {
    font-size: 48px;
    color: #fbbf24;
    margin-bottom: 16px;
}

.auth-overlay-content h3 {
    margin-bottom: 12px;
    color: #1f2937;
}

.auth-overlay-content p {
    margin-bottom: 24px;
    color: #6b7280;
}

/* Authentication Settings */
.auth-settings {
    margin-top: 16px;
}

.user-profile-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 20px;
}

.user-avatar-large {
    width: 64px;
    height: 64px;
    background: #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 24px;
}

.user-avatar-large img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.user-details-large h4 {
    margin: 0 0 4px 0;
    color: #1e293b;
    font-size: 18px;
    font-weight: 600;
}

.user-details-large p {
    margin: 0 0 2px 0;
    color: #64748b;
    font-size: 14px;
}

.auth-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.auth-actions .btn {
    flex: 1;
    min-width: 140px;
}

.auth-signin-prompt {
    text-align: center;
    padding: 40px 20px;
}

.signin-prompt-content i {
    font-size: 48px;
    color: #fbbf24;
    margin-bottom: 16px;
}

.signin-prompt-content h4 {
    margin-bottom: 12px;
    color: #1f2937;
}

.signin-prompt-content p {
    margin-bottom: 24px;
    color: #6b7280;
}

/* Responsive Authentication */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .header-left {
        text-align: center;
        width: 100%;
    }
    
    .header-right {
        width: 100%;
        justify-content: center;
    }
    
    .user-profile {
        width: 100%;
        justify-content: center;
    }
    
    .user-details {
        align-items: center;
    }
    
    .auth-modal {
        margin: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .auth-content {
        padding: 20px;
    }
    
    .social-auth {
        gap: 8px;
    }
    
    .social-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .auth-actions {
        flex-direction: column;
    }
    
    .auth-actions .btn {
        width: 100%;
        min-width: unset;
    }
    
    .user-profile-card {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }
    
    .auth-overlay-content {
        padding: 32px 24px;
        margin: 16px;
    }
}

/* ==============================================
   ACCOUNT MANAGEMENT MODAL STYLES
   ============================================== */

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-danger {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.alert i {
    font-size: 16px;
}

.form-group small {
    color: #6b7280;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

/* ==============================================
   SETTINGS MODAL STYLES
   ============================================== */

/* Settings Button */
#settingsBtn {
    padding: 8px 12px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#settingsBtn i {
    font-size: 16px;
}

/* Settings Modal */
.settings-modal {
    max-width: 800px;
    width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
}

.settings-content {
    padding: 0;
    max-height: 70vh;
    overflow-y: auto;
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s ease;
}

.section-header:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.section-header.expandable {
    justify-content: space-between;
}

.section-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-header i:first-child {
    color: #3b82f6;
    font-size: 18px;
}

.section-header i:last-child {
    color: #6b7280;
    font-size: 14px;
    transition: transform 0.2s ease;
}

.section-header.expanded i:last-child {
    transform: rotate(180deg);
}

/* Settings Sections */
.settings-section {
    margin-bottom: 0;
    border-bottom: 1px solid #e5e7eb;
}

.settings-section:last-child {
    border-bottom: none;
}

/* Contact Section */
.contact-section .contact-content {
    padding: 24px;
}

.contact-content p {
    margin: 0 0 20px 0;
    color: #6b7280;
    font-size: 14px;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.contact-method:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.contact-method i {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.contact-method div {
    flex: 1;
}

.contact-method strong {
    display: block;
    margin-bottom: 4px;
    color: #1f2937;
    font-size: 16px;
    font-weight: 600;
}

.contact-method p {
    margin: 0;
    color: #4b5563;
    font-size: 15px;
}

.contact-method a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.contact-method a:hover {
    text-decoration: underline;
}

/* FAQ Section */
.faq-section .faq-content {
    padding: 24px;
}

.faq-content > p {
    margin: 0 0 24px 0;
    color: #6b7280;
    font-size: 15px;
    text-align: center;
}

/* FAQ Categories */
.faq-category {
    margin-bottom: 32px;
}

.faq-category:last-child {
    margin-bottom: 0;
}

.faq-category h5 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

.faq-category h5 i {
    color: #3b82f6;
    font-size: 16px;
}

/* FAQ Items */
.faq-item {
    margin-bottom: 12px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: all 0.2s ease;
}

.faq-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f8fafc;
}

.faq-question:hover {
    background: #f1f5f9;
}

.faq-question span {
    font-size: 15px;
    font-weight: 500;
    color: #1f2937;
    flex: 1;
    margin-right: 12px;
}

.faq-question i {
    color: #6b7280;
    font-size: 14px;
    transition: transform 0.2s ease;
}

.faq-item.expanded .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #ffffff;
}

.faq-item.expanded .faq-answer {
    padding: 20px;
    max-height: 500px;
}

.faq-answer p {
    margin: 0 0 12px 0;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.6;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-answer ul {
    margin: 12px 0;
    padding-left: 20px;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.6;
}

.faq-answer li {
    margin-bottom: 6px;
}

.faq-answer strong {
    color: #1f2937;
    font-weight: 600;
}

/* Policy and Terms Sections */
.policy-section .policy-content,
.terms-section .terms-content {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #ffffff;
}

.policy-section.expanded .policy-content,
.terms-section.expanded .terms-content {
    padding: 24px;
    max-height: 500px;
}

/* Legal Document Preview */
.legal-document-preview {
    background: #f8fafc;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e5e7eb;
}

.legal-document-preview h5 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.legal-document-preview h6 {
    margin: 16px 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.legal-document-preview p {
    margin: 0 0 12px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #4b5563;
}

.legal-document-preview ul {
    margin: 8px 0 16px 0;
    padding-left: 20px;
}

.legal-document-preview li {
    margin: 4px 0;
    font-size: 13px;
    line-height: 1.4;
    color: #4b5563;
}

.legal-document-actions {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.legal-document-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    padding: 8px 16px;
}

.policy-content p,
.terms-content p {
    margin: 0 0 12px 0;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.6;
}

.policy-content p:last-child,
.terms-content p:last-child {
    margin-bottom: 0;
}

.policy-content em,
.terms-content em {
    color: #6b7280;
    font-style: italic;
}

/* Responsive Settings Modal */
@media (max-width: 768px) {
    .settings-modal {
        width: 95vw;
        max-height: 90vh;
    }
    
    .settings-content {
        max-height: 75vh;
    }
    
    .section-header {
        padding: 16px 20px;
    }
    
    .section-header h4 {
        font-size: 16px;
    }
    
    .contact-section .contact-content,
    .faq-section .faq-content {
        padding: 20px 16px;
    }
    
    .contact-method {
        padding: 16px;
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .contact-method i {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .faq-question {
        padding: 14px 16px;
    }
    
    .faq-question span {
        font-size: 14px;
    }
    
    .faq-item.expanded .faq-answer {
        padding: 16px;
    }
    
    .faq-category h5 {
        font-size: 15px;
    }
    
    .policy-section.expanded .policy-content,
    .terms-section.expanded .terms-content {
        padding: 20px 16px;
    }
}

/* ==============================================
   SUBSCRIPTION STYLES
   ============================================== */

/* Subscription Info Section */
.subscription-info {
    background: #f8fafc;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e2e8f0;
}

.current-plan-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
}

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

.plan-header h4 {
    margin: 0;
    color: #1e293b;
    font-size: 18px;
    font-weight: 600;
}

.plan-price {
    font-size: 24px;
    font-weight: 700;
    color: #3b82f6;
}

.plan-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    background: #10b981;
    color: white;
}

.status-badge.cancelled {
    background: #ef4444;
}

.status-badge.cancelled.active {
    background: #f59e0b;
}

.status-badge.expired {
    background: #6b7280;
}

.status-badge.past_due {
    background: #f59e0b;
}

.status-badge.trial {
    background: #9c27b0;
}

.next-billing {
    font-size: 14px;
    color: #64748b;
}

/* Usage Statistics */
.usage-stats {
    margin-bottom: 24px;
}

.usage-stats h5 {
    margin: 0 0 16px 0;
    color: #1e293b;
    font-size: 16px;
    font-weight: 600;
}

.usage-grid {
    display: grid;
    gap: 16px;
}

.usage-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.usage-label {
    font-weight: 500;
    color: #374151;
}

.usage-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 140px;
}

.progress-bar {
    width: 80px;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #3b82f6;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-fill.warning {
    background: #f59e0b;
}

.progress-fill.danger {
    background: #ef4444;
}

.usage-text {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    min-width: 60px;
    text-align: right;
}

.usage-text.locked {
    color: #ef4444;
}

/* Plan Actions */
.plan-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.plan-actions .btn {
    flex: 1;
    min-width: 140px;
}

/* Subscription Modal */
.subscription-modal-content {
    max-width: 1800px;
    width: 98vw;
    max-height: 98vh;
    overflow-y: auto;
    padding: 80px;
    min-height: 800px;
}

/* Billing Toggle */
.billing-toggle {
    display: flex;
    justify-content: center;
    margin: 30px 0 50px 0;
    padding: 0;
    width: 100%;
}

.toggle-container {
    display: flex;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 4px;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    max-width: 320px;
    width: 100%;
    margin: 0 auto;
}

.toggle-btn {
    background: none;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-height: 60px;
    justify-content: center;
}

.toggle-btn.active {
    background: #3b82f6;
    color: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.toggle-btn:hover:not(.active) {
    color: #374151;
    background: #f9fafb;
}

.discount-badge {
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Yearly Pricing Styles */
.yearly-savings-tag {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.savings-tag {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.yearly-plans .plan-title-price {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    margin-bottom: 16px;
}

.yearly-plans .plan-title-price h4 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    text-align: left;
}

.yearly-plans .plan-price {
    display: flex;
    align-items: baseline;
    text-align: right;
}

.yearly-plans .plan-price .price {
    font-size: 28px;
    font-weight: 800;
    color: #10b981;
}

.yearly-plans .plan-price .period {
    font-size: 14px;
    color: #64748b;
    margin-left: 4px;
}

.subscription-modal-content h3 {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.subscription-modal-content h3 i {
    color: #3b82f6;
}

/* Override modal header for subscription modal */
.subscription-modal-content .modal-header {
    text-align: center;
    justify-content: center;
}

.subscription-modal-content .modal-header h3 {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin: 30px 0 50px 0;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

.plans-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 40px 0;
    padding: 20px 0;
}

.plan-card {
    position: relative;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px 16px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 380px;
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.plan-card.popular {
    border-color: #3b82f6;
    transform: scale(1.05);
}

.plan-card.popular:hover {
    transform: scale(1.05) translateY(-4px);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #3b82f6;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-card .plan-header {
    text-align: center;
    margin-bottom: 20px;
}

.plan-card .plan-header h4 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
}

.plan-card .plan-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    margin-bottom: 12px;
}

.plan-card .plan-price .price {
    font-size: 36px;
    font-weight: 800;
    color: #1e293b;
}

.plan-card .plan-price .period {
    font-size: 16px;
    color: #64748b;
    margin-left: 6px;
}



.plan-features {
    flex: 1;
    margin-bottom: 24px;
    padding: 0 10px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.feature-item:last-child {
    border-bottom: none;
}

.feature-item i {
    width: 20px;
    height: 20px;
    color: #10b981;
    font-size: 16px;
    flex-shrink: 0;
}

.feature-item.limited i {
    color: #ef4444;
}

.feature-item span {
    color: #374151;
    font-size: 14px;
    line-height: 1.4;
}

.feature-item.limited span {
    color: #9ca3af;
}

.plan-btn {
    width: 100%;
    padding: 10px 20px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.subscription-footer {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
}

.subscription-footer p {
    margin: 4px 0;
}

.subscription-footer i {
    color: #10b981;
    margin-right: 8px;
}

/* Free Plan Styles */
.free-plan {
    border-color: #e2e8f0;
}

.free-plan.trial-active {
    border-color: #9c27b0;
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.15);
}

.free-plan .plan-price .price {
    color: #64748b;
}

/* Basic Plan Styles */
.basic-plan {
    border-color: #10b981;
}

.basic-plan:hover {
    border-color: #059669;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.15);
}

.basic-plan .plan-price .price {
    color: #10b981;
}

.basic-plan .plan-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
}

.basic-plan .plan-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
}

/* Pro Plan Styles */
.pro-plan {
    border-color: #3b82f6;
}

.pro-plan .plan-price .price {
    color: #3b82f6;
}

/* Enterprise Plan Styles */
.enterprise-plan {
    border-color: #7c3aed;
}

.enterprise-plan .plan-price .price {
    color: #7c3aed;
}



/* Feature Lock Overlay */
.feature-locked {
    position: relative;
    opacity: 0.8;
}



.feature-locked .tab-btn {
    position: relative;
}

.feature-locked .tab-btn::after {
    content: '🔒';
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 12px;
    opacity: 0.7;
}

/* Tab Lock Overlay */
.tab-lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.95) 0%, rgba(147, 51, 234, 0.95) 100%);
    backdrop-filter: blur(10px);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    padding: 40px 20px;
}

.tab-lock-content {
    text-align: center;
    color: white;
    max-width: 500px;
}

.lock-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px auto;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.lock-icon i {
    font-size: 36px;
    color: #fbbf24;
}

.tab-lock-content h3 {
    margin: 0 0 12px 0;
    font-size: 28px;
    font-weight: 700;
    color: white;
}

.tab-lock-content > p {
    margin: 0 0 32px 0;
    font-size: 16px;
    opacity: 0.9;
    line-height: 1.5;
}

.lock-features {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.lock-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.lock-feature-item:last-child {
    border-bottom: none;
}

.lock-feature-item i {
    color: #10b981;
    font-size: 16px;
    min-width: 16px;
}

.lock-feature-item span {
    font-size: 14px;
    font-weight: 500;
}

.lock-upgrade-btn {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border: none;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.4);
    margin-bottom: 16px;
}

.lock-upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(251, 191, 36, 0.5);
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.lock-subtitle {
    margin: 0;
    font-size: 14px;
    opacity: 0.8;
    font-style: italic;
}

/* Old feature lock styles for backwards compatibility */
.feature-lock-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 2;
    text-align: center;
    border: 2px solid #f59e0b;
}

.feature-lock-message h4 {
    margin: 0 0 8px 0;
    color: #1e293b;
    font-size: 16px;
}

.feature-lock-message p {
    margin: 0 0 12px 0;
    color: #64748b;
    font-size: 14px;
}

.feature-lock-message .btn {
    padding: 8px 16px;
    font-size: 14px;
}

/* Responsive adjustments for plan cards */
@media (max-width: 1200px) {
    .plans-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .plan-card {
        padding: 18px 14px;
        min-height: 360px;
    }
    
    .plan-card .plan-header h4 {
        font-size: 20px;
    }
    
    .plan-card .plan-price .price {
        font-size: 28px;
    }
    
    .feature-item span {
        font-size: 13px;
    }
}

@media (max-width: 1200px) {
    .plans-container {
        gap: 14px;
    }
    
    .plan-card {
        padding: 18px 14px;
        min-height: 360px;
    }
    
    .plan-card .plan-header h4 {
        font-size: 20px;
    }
    
    .plan-card .plan-price .price {
        font-size: 28px;
    }
    
    .feature-item span {
        font-size: 12px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .subscription-modal-content {
        width: 95vw;
        margin: 20px;
    }
    
    .plans-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .plan-card {
        padding: 16px 14px;
        min-height: 350px;
    }
    
    .plan-card .plan-header h4 {
        font-size: 20px;
    }
    
    .plan-card .plan-price .price {
        font-size: 28px;
    }
    
    .plan-card .plan-price .period {
        font-size: 14px;
    }
    
    .feature-item {
        padding: 10px 0;
        gap: 10px;
    }
    
    .feature-item span {
        font-size: 13px;
    }
    
    .plan-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .plan-card.popular {
        transform: none;
    }
    
    .plan-card.popular:hover {
        transform: translateY(-4px);
    }
    
    .usage-grid {
        gap: 12px;
    }
    
    .usage-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .usage-progress {
        width: 100%;
        justify-content: space-between;
    }
    
    .progress-bar {
        flex: 1;
        margin-right: 12px;
    }
    
    .plan-actions {
        flex-direction: column;
    }
    
    .plan-actions .btn {
        width: 100%;
    }
    
    /* Tab lock overlay responsive */
    .tab-lock-overlay {
        padding: 20px 16px;
    }
    
    .lock-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 16px;
    }
    
    .lock-icon i {
        font-size: 24px;
    }
    
    .tab-lock-content h3 {
        font-size: 20px;
    }
    
    .tab-lock-content > p {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .lock-features {
        padding: 16px;
        margin-bottom: 20px;
    }
    
    .lock-feature-item span {
        font-size: 13px;
    }
    
    .lock-upgrade-btn {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    /* Promo code responsive styles */
    .promo-plan-selection {
        flex-direction: column;
        gap: 10px;
    }
    
    .promo-plan-btn {
        width: 100%;
    }
}

/* Promo Code Section */
.promo-code-form {
    max-width: 400px;
}

.promo-code-form .form-row {
    margin-bottom: 15px;
}

.promo-code-form input {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    letter-spacing: 1px;
}

.promo-success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border-radius: 12px;
    padding: 25px;
    color: white;
    text-align: center;
    margin-top: 20px;
    animation: slideInUp 0.3s ease-out;
}

.promo-success .success-icon {
    font-size: 48px;
    margin-bottom: 15px;
    color: #fff;
}

.promo-success h4 {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 600;
}

.promo-success p {
    margin: 0 0 20px 0;
    opacity: 0.9;
}

.promo-plan-selection {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.promo-plan-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white !important;
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.promo-plan-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.promo-error {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    border-radius: 12px;
    padding: 20px;
    color: white;
    text-align: center;
    margin-top: 20px;
    animation: shake 0.5s ease-in-out;
}

.promo-error .error-icon {
    font-size: 36px;
    margin-bottom: 10px;
    color: #fff;
}

.promo-error p {
    margin: 0;
    font-weight: 500;
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
