/* Tenant Security Deposit Generator Styles */

/* Premium Evidence System */
.evidence-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.evidence-card {
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    position: relative;
}

.evidence-card:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.evidence-card.selected {
    border-color: #667eea;
    background-color: #f7f9ff;
    box-shadow: 0 2px 12px rgba(102, 126, 234, 0.15);
}

.evidence-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.strength-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.strength-badge.essential {
    background-color: #fee2e2;
    color: #991b1b;
}

.strength-badge.very-strong {
    background-color: #dcfce7;
    color: #166534;
}

.strength-badge.strong {
    background-color: #dbeafe;
    color: #1e40af;
}

.strength-badge.moderate {
    background-color: #fef3c7;
    color: #92400e;
}

.evidence-content h6 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.evidence-content p {
    margin: 0 0 0.75rem 0;
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.4;
}

.evidence-tip {
    font-size: 0.75rem;
    color: #059669;
    background-color: #ecfdf5;
    padding: 0.5rem;
    border-radius: 4px;
    border-left: 3px solid #059669;
    margin-top: 0.5rem;
}

.premium-tip {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.75rem;
    border-radius: 6px;
    font-weight: 500;
    margin: 0.5rem 0 1rem 0;
    border: none;
}

.highlighted-section {
    background-color: #fffbeb;
    border: 1px solid #fbbf24;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
}

.info-box {
    background-color: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 6px;
    padding: 1rem;
    margin: 0.5rem 0;
}

.info-box p {
    margin: 0.25rem 0;
    font-size: 0.875rem;
    color: #0c4a6e;
}

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.5;
    color: #1a2332;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* App Container */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow-x: hidden;
}

/* Force grid layout in iframes */
.app-container .main-container {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0px !important;
}

/* Header */
.app-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.app-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.05"><polygon points="36 34 24 34 24 22 36 22"/></g></g></svg>');
    opacity: 0.3;
}

.app-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
    letter-spacing: -0.025em;
}

.app-header p {
    font-size: 1.125rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    font-weight: 400;
}

/* Main Container */
.main-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0px;
    flex: 1;
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem;
    height: 700px;
    max-height: 700px;
    min-width: 0;
}

/* Ensure side-by-side layout for desktop and iframe */
@media (min-width: 768px) {
    .main-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0px;
        height: 700px;
        max-height: 700px;
        min-width: 0;
    }
    
    .form-pane {
        order: 1; /* Form inputs on the left */
        min-width: 0;
        overflow: hidden;
    }
    
    .preview-pane {
        order: 2; /* Live preview on the right */
        min-width: 0;
        overflow: hidden;
    }
}

/* Form Pane */
.form-pane {
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 10px 40px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
    max-height: 700px;
    min-width: 0;
    max-width: 100%;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    background: #fafbfc;
    border-bottom: 1px solid #e2e8f0;
    overflow-x: auto;
    position: relative;
}

.tab-button {
    flex: 1;
    min-width: 160px;
    padding: 1.25rem 1rem;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    white-space: nowrap;
    position: relative;
}

.tab-button:hover {
    background: rgba(30, 64, 175, 0.04);
    color: #475569;
}

.tab-button.active {
    background: white;
    color: #1e40af;
    font-weight: 600;
    box-shadow: inset 0 -2px 0 #1e40af;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: white;
}

.tab-button i {
    width: 16px;
    height: 16px;
}

/* Tab Content Container */
.tab-content-container {
    flex: 1;
    padding: 1.25rem;
    overflow-y: auto;
    max-height: 55vh;
}

.tab-content h3 {
    color: #1a2332;
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.015em;
}

.tab-content h4 {
    color: #1e293b;
    margin: 1rem 0 0.75rem 0;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.015em;
}

/* Form Groups */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #1e293b;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #1a2332;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
    background: #fefefe;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: #9ca3af;
}

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

.help-text {
    font-size: 0.8125rem;
    color: #64748b;
    margin-top: 0.375rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

/* Checkbox and Radio Styles - Compact Design */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.375rem;
    margin-bottom: 0.75rem;
}

.checkbox-item,
.radio-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.checkbox-item:hover,
.radio-item:hover {
    border-color: #1e40af;
    background: #fafbff;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.08);
    transform: translateY(-1px);
}

.checkbox-item.selected,
.radio-item.selected {
    border-color: #1e40af;
    background: linear-gradient(135deg, #1e40af08, #1e3a8a08);
    box-shadow: 0 2px 12px rgba(30, 64, 175, 0.12);
}

.checkbox-item input[type="checkbox"],
.radio-item input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: #1e40af;
    transform: scale(1.1);
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin-bottom: 0.75rem;
}

/* Compact Radio Group for Letter Tone */
.compact-radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.375rem;
    margin-bottom: 1rem;
}

.compact-radio-group .radio-item {
    padding: 0.375rem 0.5rem;
    font-size: 0.8125rem;
}

.compact-radio-group .radio-content strong {
    font-size: 0.8125rem;
    margin-bottom: 0.125rem;
}

.compact-radio-group .radio-content p {
    font-size: 0.75rem;
    line-height: 1.2;
}

.radio-content {
    flex: 1;
    pointer-events: none;
}

.radio-content strong {
    display: block;
    color: #1a2332;
    margin-bottom: 0.25rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.radio-content p {
    color: #64748b;
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.3;
}

/* Info Boxes */
.info-box {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 0 8px 8px 0;
}

.info-box h4 {
    color: #1976d2;
    margin: 0 0 0.5rem 0;
}

.info-box ul {
    margin: 0;
    padding-left: 1.5rem;
}

.info-box li {
    margin-bottom: 0.25rem;
    color: #1565c0;
}

/* Risk Assessment */
.risk-assessment {
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 2px solid;
}

.risk-assessment.green {
    background: #e8f5e8;
    border-color: #4caf50;
    color: #2e7d32;
}

.risk-assessment.yellow {
    background: #fff8e1;
    border-color: #ff9800;
    color: #f57c00;
}

.risk-assessment.red {
    background: #ffebee;
    border-color: #f44336;
    color: #c62828;
}

.risk-assessment h4 {
    margin: 0 0 1rem 0;
    font-size: 1.3rem;
}

.assessment-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.assessment-item {
    font-size: 0.9rem;
}

/* Calculation Summary */
.calculation-summary {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.calculation-summary h4 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
}

.calculation-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.calculation-row:last-child {
    border-bottom: none;
}

.calculation-row.total {
    border-top: 2px solid #2c3e50;
    margin-top: 0.5rem;
    padding-top: 1rem;
    font-size: 1.1rem;
}

.warning {
    color: #dc3545;
    font-weight: 600;
    margin-top: 1rem;
    padding: 0.5rem;
    background: #f8d7da;
    border-radius: 4px;
}

/* Next Steps */
.next-steps {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.next-steps ol {
    margin: 0;
    padding-left: 1.5rem;
}

.next-steps li {
    margin-bottom: 0.5rem;
    color: #495057;
}

/* Disclaimer */
.disclaimer {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1.5rem;
}

.disclaimer p {
    margin: 0;
    font-size: 0.9rem;
    color: #856404;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: #fafbfc;
    border-top: 1px solid #e2e8f0;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    text-decoration: none;
    min-width: 90px;
    justify-content: center;
    letter-spacing: 0.015em;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: white;
    box-shadow: 0 1px 3px rgba(30, 64, 175, 0.2);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(30, 64, 175, 0.25);
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover:not(:disabled) {
    background: #e2e8f0;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-accent {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.2);
}

.btn-accent:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.25);
}

/* Preview Pane */
.preview-pane {
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 10px 40px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
    max-height: 700px;
    min-width: 0;
    max-width: 100%;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.preview-header h3 {
    color: #2c3e50;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.preview-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background: white;
    font-family: Arial, sans-serif;
    font-size: 11pt;
    line-height: 1.8;
    color: #000;
    max-height: 70vh;
}

/* Preview Content Styles */
.preview-content h1 {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 2rem;
    color: #000;
}

.preview-content h2 {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 1.5rem 0 1rem 0;
    color: #000;
    text-transform: uppercase;
}

.preview-content p {
    margin-bottom: 1rem;
    text-align: justify;
}

.preview-content ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.preview-content li {
    margin-bottom: 0.5rem;
}

.preview-content .letterhead {
    text-align: center;
    margin-bottom: 2rem;
}

.preview-content .date {
    margin-bottom: 2rem;
}

.preview-content .address {
    margin-bottom: 2rem;
}

.preview-content .signature-block {
    margin-top: 3rem;
}

.preview-content .enclosures {
    margin-top: 2rem;
}

.preview-content .demand-amount {
    font-weight: bold;
    background: #fff3cd;
    padding: 2px 4px;
    border-radius: 3px;
}

.preview-content .legal-citation {
    font-style: italic;
}

.preview-content .deadline-notice {
    font-weight: bold;
    background: #f8d7da;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Highlighting - Stripe-style implementation */
.highlighted-text {
    background-color: #fff9c4;
    display: inline;
    padding: 2px 0;
    animation: highlight 8s ease-out;
}

@keyframes highlight {
    0% { background-color: #ffeb3b; }
    20% { background-color: #fff9c4; }
    100% { background-color: #fff9c4; }
}

/* Legacy highlight support */
.highlight {
    background: #ffeb3b;
    transition: background 0.3s ease;
    animation: highlightFade 2s ease-out;
}

@keyframes highlightFade {
    0% { background: #ffeb3b; }
    100% { background: transparent; }
}

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

/* Responsive Design - Mobile Only */
@media (max-width: 767px) {
    .app-container .main-container {
        display: flex !important;
        grid-template-columns: none !important;
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
        height: auto;
        max-height: none;
    }
    
    .preview-pane {
        max-height: 60vh;
    }
    
    .evidence-grid {
        grid-template-columns: 1fr;
    }
    
    .disputed-charges-grid {
        grid-template-columns: 1fr;
    }
}

/* Tablet Optimization */
@media (max-width: 768px) {
    .app-header {
        padding: 1.5rem 1rem;
    }
    
    .app-header h1 {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    
    .app-header p {
        font-size: 0.95rem;
    }
    
    .main-container {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .tab-navigation {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-button {
        min-width: 120px;
        font-size: 0.8125rem;
        padding: 0.75rem 0.5rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .tab-content-container {
        padding: 1rem;
        max-height: 65vh;
        overflow-y: auto;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .checkbox-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .action-buttons {
        padding: 0.75rem;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }
    
    .btn {
        font-size: 0.8125rem;
        padding: 0.625rem 0.875rem;
        min-width: 100px;
    }
    
    .assessment-details {
        grid-template-columns: 1fr;
    }
    
    .preview-header {
        padding: 0.5rem 0.75rem;
    }
    
    .preview-header h3 {
        font-size: 0.9375rem;
    }
    
    .preview-content {
        padding: 0.75rem;
        font-size: 0.875rem;
        line-height: 1.6;
        max-height: 65vh;
    }
    
    /* Evidence cards mobile optimization */
    .evidence-card {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .evidence-detail-fields {
        padding: 0.75rem;
    }
    
    .evidence-field .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Professional tips mobile */
    .professional-tip {
        font-size: 0.8125rem;
        padding: 0.625rem;
        margin: 0.5rem 0;
    }
    
    /* Disputed charge cards mobile */
    .disputed-charge-card {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .legal-arguments li {
        font-size: 0.8125rem;
        line-height: 1.4;
    }
}

/* Mobile Phone Optimization */
@media (max-width: 480px) {
    .app-header {
        padding: 1rem 0.75rem;
        text-align: center;
    }
    
    .app-header h1 {
        font-size: 1.5rem;
        line-height: 1.3;
        margin-bottom: 0.5rem;
    }
    
    .app-header p {
        font-size: 0.875rem;
        line-height: 1.4;
    }
    
    .main-container {
        padding: 0.5rem;
        gap: 0.5rem;
    }
    
    .form-pane,
    .preview-pane {
        border-radius: 12px;
    }
    
    .tab-navigation {
        padding: 0 0.25rem;
    }
    
    .tab-button {
        min-width: 100px;
        font-size: 0.75rem;
        padding: 0.625rem 0.375rem;
        gap: 0.25rem;
    }
    
    .tab-button i {
        width: 14px;
        height: 14px;
    }
    
    .tab-content-container {
        padding: 0.75rem;
        max-height: 70vh;
    }
    
    .tab-content h3 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .tab-content h4 {
        font-size: 0.9375rem;
        margin: 0.75rem 0 0.5rem 0;
    }
    
    .form-group label {
        font-size: 0.8125rem;
        margin-bottom: 0.375rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.75rem;
        border-radius: 8px;
    }
    
    .help-text {
        font-size: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .action-buttons {
        padding: 0.75rem 0.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn {
        width: 100%;
        min-width: auto;
        font-size: 0.8125rem;
        padding: 0.75rem;
        justify-content: center;
    }
    
    .preview-content {
        padding: 0.5rem;
        font-size: 0.8125rem;
        line-height: 1.5;
        max-height: 70vh;
    }
    
    /* Evidence system mobile optimization */
    .evidence-grid {
        gap: 0.5rem;
    }
    
    .evidence-card {
        padding: 0.625rem;
        margin-bottom: 0.5rem;
    }
    
    .evidence-content h6 {
        font-size: 0.9375rem;
    }
    
    .evidence-content p {
        font-size: 0.8125rem;
    }
    
    .evidence-tip {
        font-size: 0.75rem;
        padding: 0.375rem;
    }
    
    .evidence-detail-fields {
        padding: 0.5rem;
        margin-top: 0.5rem;
    }
    
    .evidence-field label {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }
    
    .evidence-field .form-control {
        font-size: 16px;
        padding: 0.5rem;
    }
    
    /* Professional tips mobile */
    .professional-tip {
        font-size: 0.75rem;
        padding: 0.5rem;
        margin: 0.375rem 0;
        line-height: 1.3;
    }
    
    .premium-tip {
        font-size: 0.75rem;
        padding: 0.5rem;
    }
    
    /* Disputed charges mobile */
    .disputed-charges-grid {
        gap: 0.5rem;
    }
    
    .disputed-charge-card {
        padding: 0.625rem;
        margin-bottom: 0.5rem;
    }
    
    .charge-header h6 {
        font-size: 0.875rem;
    }
    
    .charge-description {
        font-size: 0.8125rem;
    }
    
    .legal-arguments strong {
        font-size: 0.8125rem;
    }
    
    .legal-arguments li {
        font-size: 0.75rem;
        line-height: 1.3;
        margin-bottom: 0.25rem;
    }
    
    .evidence-tag {
        font-size: 0.6875rem;
        padding: 0.1875rem 0.375rem;
    }
    
    /* Custom charges mobile */
    .custom-charges-section {
        padding: 0.75rem;
        margin-top: 1rem;
    }
    
    .custom-charge-item {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .custom-charge-item .btn-danger {
        font-size: 0.6875rem;
        padding: 0.25rem 0.375rem;
        top: 0.375rem;
        right: 0.375rem;
    }
    
    /* Lease citation mobile */
    .lease-violation-section {
        padding: 0.75rem;
        margin-top: 1rem;
    }
    
    .lease-clause-item {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    /* Delivery tips mobile */
    .delivery-tips {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .delivery-tips h6 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .delivery-tips li {
        font-size: 0.8125rem;
        margin-bottom: 0.5rem;
        line-height: 1.4;
    }
}

/* Scenario Cards - Ultra Compact Design */
.scenarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.375rem;
    margin-bottom: 0.5rem;
}

.scenario-card {
    padding: 0.5rem;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.scenario-card:hover {
    border-color: #1e40af;
    box-shadow: 0 4px 20px rgba(30, 64, 175, 0.1);
    transform: translateY(-2px);
}

.scenario-card.selected {
    border-color: #1e40af;
    background: linear-gradient(135deg, #1e40af08, #1e3a8a08);
    box-shadow: 0 4px 20px rgba(30, 64, 175, 0.15);
}

.scenario-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.375rem;
}

.scenario-header h4 {
    margin: 0;
    color: #1a2332;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.1;
}

.tone-badge {
    padding: 0.125rem 0.375rem;
    border-radius: 8px;
    font-size: 0.5625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.tone-badge.tone-professional {
    background: #e0f2fe;
    color: #0277bd;
}

.tone-badge.tone-firm {
    background: #fff3e0;
    color: #f57c00;
}

.tone-badge.tone-litigation {
    background: #ffebee;
    color: #c62828;
}

.tone-badge.tone-complete-non-return {
    background: #ffebee;
    color: #c62828;
}

.tone-badge.tone-improper-wear-tear {
    background: #fff3e0;
    color: #f57c00;
}

.tone-badge.tone-no-itemization {
    background: #fce4ec;
    color: #ad1457;
}

.tone-badge.tone-excessive-fees {
    background: #e8f5e8;
    color: #2e7d32;
}

.tone-badge.tone-partial-non-return {
    background: #fff8e1;
    color: #f57c00;
}

.scenario-description {
    color: #64748b;
    margin-bottom: 0.375rem;
    line-height: 1.3;
    font-size: 0.75rem;
}

.scenario-use-case {
    margin-bottom: 0.375rem;
    padding: 0.375rem;
    background: #f8fafc;
    border-radius: 3px;
    font-size: 0.6875rem;
}

.scenario-use-case strong {
    color: #1e293b;
    font-size: 0.6875rem;
}

.scenario-sample {
    margin-bottom: 0.5rem;
    padding: 0.375rem;
    background: #f1f5f9;
    border-radius: 3px;
    font-size: 0.6875rem;
    border-left: 2px solid #1e40af;
}

.scenario-sample em {
    color: #475569;
    font-style: italic;
}

.scenario-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.scenario-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.25);
}

/* Case Assessment Styles */
.analysis-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #fafbfc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.analysis-section h4 {
    margin: 0 0 1rem 0;
    color: #1a2332;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.analysis-list {
    margin: 0;
    padding-left: 1.5rem;
}

.analysis-list li {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.analysis-list.strengths li {
    color: #059669;
}

.analysis-list.weaknesses li {
    color: #dc2626;
}

.analysis-list.recommendations li {
    color: #7c2d12;
}

.state-details p {
    margin-bottom: 0.75rem;
    color: #475569;
}

.state-details strong {
    color: #1e293b;
}

/* Step-by-Step Questionnaire Styles */
.step-by-step-questions {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    border-left: 3px solid #1e40af;
}

.step-by-step-questions h5 {
    margin-bottom: 0.75rem;
    color: #1a2332;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.question-item {
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: white;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.question-item:last-child {
    margin-bottom: 0;
}

.question-item label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.375rem;
}

.question-item input[type="number"],
.question-item input[type="text"],
.question-item select {
    width: 100%;
    padding: 0.375rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.8125rem;
    background: white;
}

.question-item input[type="number"] {
    width: auto;
    min-width: 100px;
}

.question-item .radio-options {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.question-item .radio-option {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0;
}

.question-item .radio-option input[type="radio"] {
    margin: 0;
    width: 16px;
    height: 16px;
}

.question-item .radio-option label {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
}

/* Scenario Expanded Options - Ultra Compact Design */
.scenario-expanded-options {
    margin-top: 0.375rem !important;
    margin-bottom: 0.5rem !important;
    padding: 0.5rem !important;
    background: #f8fafc !important;
    border-radius: 3px !important;
    border: 1px solid #e2e8f0 !important;
}

.scenario-expanded-options h5 {
    margin-bottom: 0.375rem !important;
    color: #1e293b !important;
    font-size: 0.6875rem !important;
    font-weight: 600 !important;
}

.scenario-expanded-options > div {
    margin-bottom: 0.375rem !important;
}

.scenario-expanded-options label {
    font-size: 0.6875rem !important;
    margin-bottom: 0.125rem !important;
    line-height: 1.2 !important;
}

.scenario-expanded-options input[type="number"] {
    padding: 0.1875rem 0.25rem !important;
    font-size: 0.6875rem !important;
    width: 60px !important;
    height: auto !important;
}

.scenario-expanded-options select {
    padding: 0.1875rem 0.25rem !important;
    font-size: 0.6875rem !important;
    height: auto !important;
}

/* Disputed Charges System */
.disputed-charges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.disputed-charge-card {
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    position: relative;
}

.disputed-charge-card:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.disputed-charge-card.selected {
    border-color: #667eea;
    background-color: #f7f9ff;
    box-shadow: 0 2px 12px rgba(102, 126, 234, 0.15);
}

.charge-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.charge-header input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.charge-header h6 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.charge-description {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.legal-arguments {
    margin-bottom: 1rem;
}

.legal-arguments strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #059669;
    margin-bottom: 0.5rem;
}

.legal-arguments ul {
    margin: 0;
    padding-left: 1.25rem;
    list-style-type: disc;
}

.legal-arguments li {
    font-size: 0.8125rem;
    color: #374151;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.evidence-suggestions strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #7c2d12;
    margin-bottom: 0.5rem;
}

.evidence-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.evidence-tag {
    background-color: #fef3c7;
    color: #92400e;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Custom Disputed Charges */
.custom-charges-section {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.custom-charges-section h6 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.custom-charges-list {
    margin-top: 1rem;
}

.custom-charge-item {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.custom-charge-item .btn-danger {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Enhanced form controls for disputed charges */
.custom-charge-item .form-group label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.375rem;
}

.custom-charge-item .form-control {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
}

.custom-charge-item textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* Lease Violation Claims */
.lease-violation-section {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f0f9ff;
    border-radius: 8px;
    border: 1px solid #0ea5e9;
    border-left: 4px solid #0ea5e9;
}

.lease-violation-section h6 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #0c4a6e;
}

.lease-clause-item {
    background: white;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.lease-clause-item .form-group label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #0c4a6e;
    margin-bottom: 0.375rem;
}

.lease-clause-item .form-control {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-color: #0ea5e9;
}

.lease-clause-item .form-control:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Strategic Tips */
.strategic-tip {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0.75rem 0;
    border: none;
}

.strategic-tip::before {
    content: "💡 ";
    margin-right: 0.5rem;
}

/* Professional Tips and Evidence Details */
.professional-tip {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    margin: 0.75rem 0;
    line-height: 1.4;
}

.evidence-detail-fields {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.evidence-detail-fields h7 {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

.evidence-field {
    margin-bottom: 0.75rem;
}

.evidence-field:last-child {
    margin-bottom: 0;
}

.evidence-field label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.375rem;
}

.evidence-field .form-control {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    width: 100%;
}

.evidence-field .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.evidence-field textarea.form-control {
    resize: vertical;
    min-height: 60px;
}

/* Enhanced Evidence Cards */
.evidence-card {
    transition: all 0.3s ease;
}

.evidence-card.selected {
    transform: scale(1.02);
}

.evidence-card.selected .evidence-detail-fields {
    animation: slideIn 0.3s ease-out;
}

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

/* Professional delivery tips */
.delivery-tips {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.delivery-tips h6 {
    margin: 0 0 1rem 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.delivery-tips ul {
    margin: 0;
    padding-left: 1.5rem;
}

.delivery-tips li {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.delivery-tips strong {
    text-decoration: underline;
}

/* Print Styles */
@media print {
    .app-header,
    .tab-navigation,
    .action-buttons,
    .preview-header {
        display: none;
    }
    
    .main-container {
        flex-direction: column;
        padding: 0;
    }
    
    .form-pane {
        display: none;
    }
    
    .preview-pane {
        box-shadow: none;
        border-radius: 0;
    }
    
    .preview-content {
        padding: 0;
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .highlight {
        background: transparent;
    }
}