:root {
    /* Clean, Business-Professional Light Palette (from namu-website) */
    --namu-bg: #FFFFFF;
    --namu-bg-alt: #F8FAFC;
    --namu-navy: #0F172A;
    --namu-slate: #475569;
    --namu-accent: #0284C7;
    --namu-accent-hover: #0369A1;
    --namu-accent-soft: rgba(2, 132, 199, 0.05);
    --namu-border: #E2E8F0;
    
    /* Secondary / Brand Colors */
    --namu-sky: #4CC9F0;
    --namu-white: #FFFFFF;
    
    /* Gradients */
    --bg-gradient: radial-gradient(circle at top left, #F8FAFC, #EFF6FF);
    --accent-gradient: linear-gradient(135deg, #0369A1 0%, #0284C7 100%);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 1);
    --glass-glow: 0 15px 45px -15px rgba(15, 23, 42, 0.12);

    /* Typography */
    --font-primary: 'DM Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-gradient);
    color: var(--namu-slate);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 850px;
    width: 90%;
    margin: 40px auto;
    padding: 48px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.08);
    border-radius: 32px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.container:hover {
    box-shadow: 0 35px 70px -15px rgba(15, 23, 42, 0.12);
}

.header {
    text-align: center;
    margin-bottom: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.brand-logo {
    margin-bottom: 24px;
}

.brand-logo svg {
    max-width: 220px;
    height: auto;
}

.ai-assistant-intro {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.05) 0%, rgba(44, 62, 80, 0.05) 100%);
    border: 1px solid rgba(52, 152, 219, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: left;
}

.ai-assistant-title {
    color: #3498db;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ai-assistant-text {
    color: #5a6c7d;
    font-size: 0.95rem;
    font-style: italic;
    line-height: 1.6;
    margin: 0;
}

.ai-disclaimer {
    margin: 24px 0 0 0;
    padding: 14px 18px;
    background: #FFFBEB;
    border: 1px solid #FEF3C7;
    border-left: 4px solid #F59E0B;
    border-radius: 12px;
    font-size: 0.9rem;
    color: #92400E;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.ai-disclaimer strong {
    color: #78350F;
}

.drop-zone-full {
    grid-column: 1 / -1;
}

.header h1 {
    color: var(--namu-navy);
    font-size: 2.2rem;
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.header p {
    color: var(--namu-slate);
    font-size: 1.05rem;
    font-weight: 400;
}

.upload-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.drop-zone {
    border: 2px dashed var(--namu-border);
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    background: var(--namu-bg-alt);
    position: relative;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 24px;
}

.drop-zone:hover {
    border-color: var(--namu-accent);
    background: var(--namu-bg);
    box-shadow: 0 10px 25px -10px rgba(2, 132, 199, 0.15);
    transform: translateY(-4px);
}

.drop-zone.dragover {
    border-color: #3498db;
    background: #eaf4f9;
    transform: scale(1.02);
}

.drop-zone.has-file {
    border-color: #27ae60;
    background: #f1f8e9;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 6px 14px;
    align-items: center;
    justify-items: stretch;
    min-height: 0;
    padding: 14px 18px;
    margin-bottom: 16px;
    text-align: left;
    transform: none;
    box-shadow: 0 2px 12px rgba(39, 174, 96, 0.18);
}

.drop-zone.has-file:hover {
    transform: none;
}

.drop-zone.has-file .drop-zone-hint {
    display: none;
}

.drop-zone.has-file .drop-zone-icon {
    grid-column: 1;
    grid-row: 1 / -1;
    align-self: center;
    font-size: 1.75rem;
    margin-bottom: 0;
    opacity: 0.85;
}

.drop-zone.has-file h3 {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.3;
}

.drop-zone.has-file .file-info {
    grid-column: 2;
    grid-row: 2;
    margin-top: 0;
    padding: 8px 12px;
    font-size: 0.85rem;
}

.drop-zone-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--namu-slate);
    opacity: 0.5;
    transition: all 0.4s ease;
}

.drop-zone:hover .drop-zone-icon {
    color: var(--namu-accent);
    opacity: 1;
    transform: scale(1.1);
}

.drop-zone h3 {
    color: var(--namu-navy);
    margin-bottom: 12px;
    font-size: 1.4rem;
    font-weight: 700;
}

.drop-zone p {
    color: var(--namu-slate);
    font-size: 0.95rem;
    line-height: 1.6;
}

.file-input {
    display: none;
}

.file-info {
    margin-top: 15px;
    padding: 10px;
    background: rgba(39, 174, 96, 0.1);
    border-radius: 8px;
    font-size: 0.9rem;
    color: #27ae60;
}

.upload-button {
    width: 100%;
    padding: 16px;
    background: var(--namu-navy);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 24px;
}

.upload-button:hover:not(:disabled) {
    background: var(--namu-accent);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -10px rgba(15, 23, 42, 0.4);
}

.upload-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.program-code-field {
    margin-top: 28px;
    padding: 20px 22px;
    background: var(--namu-bg-alt, #f8fafc);
    border: 1px solid var(--namu-border, #e2e8f0);
    border-radius: 16px;
}

.program-code-label {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--namu-navy);
    margin-bottom: 8px;
}

.program-code-input {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    font-size: 1rem;
    border: 1px solid var(--namu-border, #cbd5e1);
    border-radius: 10px;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.program-code-input:focus {
    outline: none;
    border-color: var(--namu-accent, #0284c7);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.program-code-hint {
    margin: 10px 0 0;
    font-size: 0.85rem;
    color: var(--namu-slate);
    line-height: 1.45;
}

.analyze-button {
    width: 100%;
    padding: 16px;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px -10px rgba(2, 132, 199, 0.5);
    margin-top: 24px;
    display: none;
}

.analyze-button:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px -10px rgba(2, 132, 199, 0.6);
}

.analyze-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.checklist-section {
    margin-top: 40px;
    padding: 32px;
    background: var(--namu-bg-alt);
    border-radius: 24px;
    display: none;
    border: 1px solid var(--namu-border);
}

.checklist-title {
    text-align: center;
    color: var(--namu-navy);
    font-size: 1.8rem;
    margin-bottom: 28px;
    font-weight: 700;
}

.analysis-overview {
    background: var(--namu-bg);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.1);
    border: 1px solid var(--namu-border);
}

.overview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.overview-title {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.overall-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.overall-status.ok {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.overall-status.issues_found {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.metric-card {
    background: var(--namu-bg);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
    border: 1px solid var(--namu-border);
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
    border-color: var(--namu-accent);
}

.metric-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1;
}

.metric-number.passed {
    color: #28a745;
}

.metric-number.failed {
    color: #dc3545;
}

.metric-number.warning {
    color: #ffc107;
}

.metric-number.info {
    color: #17a2b8;
}

.metric-label {
    font-size: 0.85rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.highlights-section {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid #007bff;
}

.highlights-title {
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.highlights-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.highlights-list li {
    padding: 8px 0;
    color: #495057;
    position: relative;
    padding-left: 20px;
}

.highlights-list li::before {
    content: "▶";
    position: absolute;
    left: 0;
    color: #007bff;
    font-size: 0.8rem;
}

.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    padding: 6px;
    background: var(--namu-bg-alt);
    border-radius: 14px;
    border: 1px solid var(--namu-border);
}

.filter-tab {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--namu-slate);
}

.filter-tab.active {
    background: var(--namu-bg);
    color: var(--namu-navy);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.filter-tab:hover {
    color: #2c3e50;
}

.checklist-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    position: relative;
    margin-top: 32px;
}

.checklist-sidebar {
    width: 200px;
    flex-shrink: 0;
    position: sticky;
    top: 24px;
    align-self: flex-start;
    background: white;
    border: 1px solid var(--namu-border);
    border-radius: 12px;
    padding: 16px 8px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
    z-index: 10;
}

.sidebar-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--namu-navy);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    padding: 0 8px;
}

.sidebar-item {
    font-size: 0.85rem;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--namu-slate);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 1px solid transparent;
}

.sidebar-item:hover {
    background: var(--namu-bg-alt);
    color: var(--namu-navy);
}

.sidebar-item.active {
    background: var(--namu-accent-soft);
    color: var(--namu-accent);
    border-color: var(--namu-accent);
    font-weight: 600;
}

.sidebar-item.viewed {
    opacity: 0.8;
}

.sidebar-item.viewed::before {
    content: "✓";
    margin-right: 8px;
    color: var(--namu-accent);
    font-weight: 700;
}

.checklist-grid {
    flex: 1;
    display: grid;
    gap: 20px;
}

/* Check Card Base Styles */
.check-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
    transition: all 0.3s ease;
    border: 1px solid var(--namu-border);
    margin-bottom: 24px;
    /* overflow: hidden; Removed to prevent tooltip clipping */
    position: relative;
}

.check-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.check-card.action-needed {
    border-left: 4px solid #dc3545;
    box-shadow: 0 4px 16px rgba(220, 53, 69, 0.15);
}

.check-card.action-needed:hover {
    box-shadow: 0 6px 24px rgba(220, 53, 69, 0.2);
}

.check-card.satisfied {
    border-left: 4px solid #28a745;
}

.check-card.warning {
    border-left: 4px solid #ffc107;
}

.check-card.highlighted-card {
    border-color: var(--namu-accent);
    box-shadow: 0 0 0 2px var(--namu-accent-soft), 0 10px 30px rgba(15, 23, 42, 0.12);
    transform: scale(1.01);
}

/* Check Card Header */
.check-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.check-title {
    flex: 1;
    min-width: 0;
}

.check-name {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.check-description {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 0;
    line-height: 1.4;
}

.check-status {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.status-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    color: white;
}

.status-badge.satisfied {
    background: #28a745;
}

.status-badge.missing,
.status-badge.noncompliant {
    background: #dc3545;
}

.status-badge.not_applicable {
    background: #6c757d;
}

.status-badge.insufficient_info {
    background: #ffc107;
    color: #212529;
}

.severity-indicator {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.severity-indicator.high {
    background: #dc3545;
    color: white;
}

.severity-indicator.medium {
    background: #fd7e14;
    color: white;
}

.severity-indicator.low {
    background: #28a745;
    color: white;
}

/* Check Card Body */
.check-body {
    padding: 16px 20px;
}

.check-info {
    display: none;
}

.check-info.show {
    display: block;
}

.info-section {
    margin-bottom: 12px;
}

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

.info-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.info-content {
    font-size: 0.9rem;
    color: #212529;
    line-height: 1.4;
}

/* Action Needed Alert */
.action-alert {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 12px;
}

.action-alert .info-label {
    color: #856404;
}

.action-alert .info-content {
    color: #856404;
    font-weight: 500;
}

.suggested-text-box {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 8px 12px;
    margin-top: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Post-it note style comment section */
.check-comment-section {
    padding: 12px 20px 16px;
    border-top: 1px solid #f8f9fa;
}

.comment-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #856404;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.comment-textarea.post-it-note {
    width: 100%;
    min-height: 70px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #fffef0 0%, #fff9c4 50%, #fff59d 100%);
    border: 1px solid #e6d96a;
    border-radius: 4px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #5d4e00;
    resize: vertical;
    box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.comment-textarea.post-it-note::placeholder {
    color: #8b7b00;
    opacity: 0.8;
}

.comment-textarea.post-it-note:focus {
    outline: none;
    border-color: #d4b106;
    box-shadow: 1px 2px 6px rgba(212, 177, 6, 0.25);
}

.endorsement-section {
    text-align: center;
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    border-radius: 10px;
    display: none;
}

.endorsement-message {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 500;
}

.generate-endorsement-button {
    padding: 12px 30px;
    background: white;
    color: #d35400;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.generate-endorsement-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.download-section {
    text-align: center;
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    border-radius: 10px;
    display: none;
}

.download-message {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 500;
}

.download-button {
    padding: 12px 30px;
    background: white;
    color: #27ae60;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.download-button:disabled {
    background: #ecf0f1;
    color: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Endorsement document section (for failed items) */
.endorsement-document-section {
    margin-top: 24px;
    padding: 20px;
    background: linear-gradient(135deg, #8e44ad 0%, #6c3483 100%);
    border-radius: 10px;
    text-align: center;
}

.endorsement-document-message {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 500;
}

.generate-endorsement-doc-button {
    padding: 12px 30px;
    background: white;
    color: #6c3483;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.generate-endorsement-doc-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.generate-endorsement-doc-button:disabled {
    background: #ecf0f1;
    color: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

.generating-endorsement-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    margin-top: 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

.generating-endorsement-section .generating-message {
    color: white;
    font-size: 1rem;
    font-weight: 500;
}

.download-endorsement-section {
    text-align: center;
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    border-radius: 10px;
    display: none;
}

[data-tooltip] {
    position: relative;
    cursor: pointer;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 8px 12px;
    background: rgba(15, 23, 42, 0.95);
    color: white;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-12px);
}

.backend-status {
    position: absolute;
    top: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--namu-border);
    transition: all 0.3s ease;
    z-index: 100;
}

.backend-status:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.status-message {
    margin-top: 32px;
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    font-weight: 600;
    display: none;
    animation: fadeIn 0.3s ease;
}

.status-message.loading {
    background: var(--namu-bg);
    color: var(--namu-navy);
    border: 1px solid var(--namu-border);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.progress-container {
    width: 100%;
    background-color: var(--namu-bg-alt);
    border-radius: 20px;
    height: 12px;
    margin: 16px 0;
    overflow: hidden;
    border: 1px solid var(--namu-border);
}

.progress-bar {
    background: var(--accent-gradient);
    height: 100%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(2, 132, 199, 0.3);
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--namu-border);
    border-top: 3px solid var(--namu-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 12px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

/* Chat Interface Styles */
.chat-interface {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 420px;
    max-height: 600px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
    border: 1px solid var(--glass-border);
    display: none;
    flex-direction: column;
    z-index: 1000;
    animation: slideInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.chat-header {
    padding: 20px 24px;
    background: var(--namu-navy);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 700;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.chat-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    max-height: 300px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-message {
    max-width: 85%;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.chat-message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.assistant {
    align-self: flex-start;
    background: #f8f9fa;
    color: #2c3e50;
    border: 1px solid #e9ecef;
    border-bottom-left-radius: 4px;
}

.chat-message.system {
    align-self: center;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    font-size: 0.8rem;
    padding: 8px 10px;
    border-radius: 15px;
    max-width: 100%;
    text-align: center;
}

.chat-input-area {
    padding: 15px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.chat-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    font-size: 0.9rem;
    resize: none;
    max-height: 80px;
    min-height: 40px;
    outline: none;
    font-family: inherit;
}

.chat-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.chat-send {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-size: 1rem;
}

.chat-send:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.chat-send:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.chat-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 64px;
    height: 64px;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 10px 24px rgba(2, 132, 199, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 999;
}

.chat-toggle:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 14px 30px rgba(2, 132, 199, 0.5);
}

.chat-toggle.pulse {
    animation: chatPulse 2s infinite;
}

@keyframes chatPulse {
    0% { box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3); }
    50% { box-shadow: 0 4px 25px rgba(102, 126, 234, 0.6); }
    100% { box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3); }
}

.chat-loading {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    align-self: flex-start;
    max-width: 85%;
}

.chat-loading-dots {
    display: flex;
    gap: 2px;
}

.chat-loading-dot {
    width: 6px;
    height: 6px;
    background: #6c757d;
    border-radius: 50%;
    animation: chatLoading 1.4s infinite ease-in-out both;
}

.chat-loading-dot:nth-child(1) { animation-delay: -0.32s; }
.chat-loading-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes chatLoading {
    0%, 80%, 100% { 
        transform: scale(0);
        opacity: 0.5;
    } 
    40% { 
        transform: scale(1);
        opacity: 1;
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .upload-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .container {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 2rem;
    }

    .backend-status {
        top: 10px;
        right: 10px;
        font-size: 0.7rem;
        padding: 6px 10px;
    }

    .backend-status::after {
        display: none;
    }

    .ai-assistant-intro {
        padding: 15px;
        margin-bottom: 20px;
    }

    .ai-assistant-title {
        font-size: 0.8rem;
    }

    .ai-assistant-text {
        font-size: 0.9rem;
    }

    .analysis-overview {
        padding: 20px;
        margin-bottom: 20px;
    }

    .overview-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .overview-title {
        font-size: 1.3rem;
    }

    .status-metrics {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .metric-card {
        padding: 15px;
    }

    .metric-number {
        font-size: 2rem;
    }

    .filter-tabs {
        flex-direction: column;
        gap: 8px;
    }

    .filter-tab {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .checklist-layout {
        flex-direction: column;
    }

    .checklist-sidebar {
        width: 100%;
        max-height: 200px;
        position: static;
        margin-bottom: 16px;
    }

    .check-card {
        border-radius: 10px;
        margin-bottom: 12px;
    }

    .check-header {
        padding: 12px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .check-status {
        align-self: flex-end;
    }

    .status-badge {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }

    .check-name {
        font-size: 0.95rem;
    }

    .check-description {
        font-size: 0.8rem;
    }

    .check-body {
        padding: 12px 16px;
    }

    .highlights-section {
        padding: 15px;
    }

    .highlights-title {
        font-size: 1rem;
    }

    .highlights-list li {
        font-size: 0.9rem;
    }

    .action-alert {
        padding: 10px;
        margin-top: 12px;
    }

    /* Chat mobile responsiveness */
    .chat-interface {
        width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
        bottom: 20px;
        max-height: 60vh;
    }

    .chat-toggle {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
        bottom: 15px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .status-metrics {
        grid-template-columns: 1fr;
    }

    .metric-card {
        padding: 12px;
    }

    .metric-number {
        font-size: 1.8rem;
    }

    .filter-tabs {
        padding: 3px;
    }

    .filter-tab {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

/* Tooltip global z-index fix */
[data-tooltip]::after {
    z-index: 2000 !important;
}

/* Action Footer Styles - Redesigned for Vertical Simplicity */
.action-footer {
    grid-column: 1 / -1;
    margin-top: 48px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.action-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--namu-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
}

.action-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--namu-navy);
    margin-bottom: 8px;
}

.action-card p {
    font-size: 0.85rem;
    color: var(--namu-slate);
    margin-bottom: 16px;
}

.action-card .action-btn {
    width: 100%;
    padding: 16px;
    background: var(--namu-accent);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2);
}

.action-card .action-btn:hover {
    background: var(--namu-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.3);
}

.action-card .action-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.action-card.generated {
    border-color: #28a745;
    background: #f8fff9;
}

.endorsement-status-container {
    width: 100%;
    margin-top: 12px;
}

.progress-container {
    background: #e9ecef;
    border-radius: 10px;
    height: 12px;
    overflow: hidden;
    margin: 15px 0;
}

.progress-bar {
    background: var(--accent-gradient);
    height: 100%;
    transition: width 0.5s ease;
}

