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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(to bottom, #eff6ff 0%, #dbeafe 50%, #bfdbfe 100%);
    background-attachment: fixed;
}

/* Page Management */
.page {
    display: none;
}

.page.active {
    display: block;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

/* Landing Page */
.landing-header {
    background: #1e3a8a;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.hero {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.95) 0%, rgba(96, 165, 250, 0.9) 100%);
    color: white;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(147, 197, 253, 0.3) 0%, transparent 50%),
                radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.4) 0%, transparent 50%);
    pointer-events: none;
}

.hero-image-container {
    margin: 2rem auto;
    max-width: 300px;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.hero-main-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.hero-image-container:hover .hero-main-image {
    transform: scale(1.02);
}

.hero-content {
    max-width: 1200px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 3rem;
    opacity: 0.95;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.feature-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    padding: 1.5rem 1.25rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.feature-icon-img {
    width: 60px;
    height: 60px;
    margin: 0 auto 0.75rem;
    display: block;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.1));
    transition: transform 0.3s ease;
    background: white !important;
    border-radius: 8px;
    padding: 8px;
    object-fit: contain;
}

.feature-card:hover .feature-icon-img {
    transform: scale(1.05) translateY(-5px);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    opacity: 0.9;
    font-size: 0.95rem;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-small, .btn-large, .btn-block {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-secondary {
    background: white;
    color: #1e3a8a;
    border: 2px solid #1e3a8a;
}

.btn-secondary:hover {
    background: #f0f4ff;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.25rem;
}

.btn-block {
    width: 100%;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.close {
    float: right;
    font-size: 2rem;
    font-weight: 700;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #333;
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    color: #1e3a8a;
}

.modal-footer {
    margin-top: 1rem;
    text-align: center;
    color: #666;
}

.modal-footer a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

.modal-footer a:hover {
    text-decoration: underline;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
}

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

/* Dashboard */
.dashboard-header {
    background: #1e3a8a;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dashboard-container {
    display: flex;
    min-height: calc(100vh - 80px);
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: white;
    border-right: 1px solid #e5e7eb;
    padding: 2rem 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: #f9fafb;
    color: #1e3a8a;
}

.nav-item.active {
    background: #eff6ff;
    color: #1e3a8a;
    border-left-color: #3b82f6;
    font-weight: 600;
}

.nav-icon {
    font-size: 1.25rem;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

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

.view-header h1 {
    color: #1e3a8a;
    font-size: 2rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Welcome Section */
.welcome-section {
    background: white;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.welcome-section h2 {
    color: #1e3a8a;
    margin-bottom: 1rem;
}

.welcome-section p {
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

/* Claims List */
.claims-list {
    display: grid;
    gap: 1rem;
}

.claim-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid #3b82f6;
}

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

.claim-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.claim-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e3a8a;
}

.claim-card-number {
    color: #666;
    font-size: 0.875rem;
}

.claim-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.claim-status.draft {
    background: #f3f4f6;
    color: #6b7280;
}

.claim-status.submitted {
    background: #dbeafe;
    color: #1e40af;
}

.claim-status.approved {
    background: #d1fae5;
    color: #065f46;
}

.claim-status.denied {
    background: #fee2e2;
    color: #991b1b;
}

.claim-card-meta {
    display: flex;
    gap: 2rem;
    color: #666;
    font-size: 0.875rem;
}

.empty-state {
    background: white;
    padding: 4rem 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: #1e3a8a;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #666;
    margin-bottom: 2rem;
}

/* Claim Detail */
.claim-detail-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.claim-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

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

.claim-section h2 {
    color: #1e3a8a;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

/* Upload Area */
.upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.upload-area:hover {
    border-color: #3b82f6;
    background: #f9fafb;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.upload-hint {
    color: #9ca3af;
    font-size: 0.875rem;
}

/* Documents List */
.documents-list {
    display: grid;
    gap: 0.5rem;
    margin-top: 1rem;
}

.document-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.document-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.document-icon {
    font-size: 1.5rem;
}

.document-name {
    font-weight: 600;
    color: #333;
}

.document-size {
    color: #666;
    font-size: 0.875rem;
}

.document-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.25rem;
    transition: transform 0.2s ease;
}

.btn-icon:hover {
    transform: scale(1.2);
}

/* Narrative Box */
.narrative-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    min-height: 200px;
    white-space: pre-wrap;
    line-height: 1.8;
}

/* Validation Results */
.validation-results {
    background: #f9fafb;
    border-radius: 6px;
    padding: 1.5rem;
}

.validation-item {
    display: flex;
    align-items: start;
    gap: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

.validation-item.success {
    background: #d1fae5;
    color: #065f46;
}

.validation-item.error {
    background: #fee2e2;
    color: #991b1b;
}

.validation-icon {
    font-size: 1.25rem;
}

/* Claim Actions */
.claim-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .hero-features {
        grid-template-columns: 1fr;
    }

    .dashboard-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }

    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
    }

    .nav-item {
        border-left: none;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
    }

    .nav-item.active {
        border-left: none;
        border-bottom-color: #3b82f6;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .claim-actions {
        flex-direction: column;
    }

    .view-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

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

/* Footer */
.app-footer {
    background: #1e3a8a;
    color: white;
    padding: 2rem;
    text-align: center;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content p {
    margin: 0.5rem 0;
}

.footer-content a {
    color: #93c5fd;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.footer-content a:hover {
    color: white;
}

.footer-subdomain {
    font-size: 0.875rem;
    opacity: 0.8;
    font-family: monospace;
}

.landing-page .app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    font-size: 0.875rem;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.alert.info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #3b82f6;
}
