/* Dashboard landing page styles */

.content {
    flex: 1;
    padding: 1rem;
    max-width: none;
    margin: 0;
}

.content h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    color: var(--mint);
}

.content p {
    margin-bottom: 1.5rem;
    color: var(--muted);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    width: 100%;
}

.dashboard-left {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dashboard-left>section {
    width: 100%;
}

.upload-section,
.transformation-section,
.reports-section {
    background-color: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.upload-section,
.transformation-section {
    align-self: stretch;
}

.transformation-section h2 {
    margin: 0 0 0.6rem;
    color: var(--mint);
}

.transformation-subtitle {
    margin: 0 0 1rem;
    color: var(--muted);
}

.transformation-section .compare-container-compact {
    margin-top: 0;
}

.reports-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Full-width transformation section (below the main grid) */
.transformation-fullwidth {
    margin-top: 2rem;
}

/* Full-width Platform Insights (below transformation section) */
.platform-insights-fullwidth {
    margin-top: 2rem;
    background-color: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.platform-insights-fullwidth .insight-cards {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.platform-insights-fullwidth .insight-columns {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* Empty State */
.history-item.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem 1.5rem;
    gap: 0.5rem;
    border-style: dashed;
}

.empty-state-icon {
    color: var(--mint);
    opacity: 0.7;
    margin-bottom: 0;
}

.empty-state-heading {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.empty-state-desc {
    font-size: 0.875rem;
    color: var(--muted);
    margin: 0;
    max-width: 280px;
}

.empty-state-cta {
    margin-top: 0.5rem;
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    border: 1px solid rgba(62, 230, 176, 0.35);
    color: var(--mint);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.empty-state-cta:hover {
    background: rgba(62, 230, 176, 0.08);
    border-color: rgba(62, 230, 176, 0.6);
}

/* Upload section pulse highlight */
@keyframes uploadPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(62, 230, 176, 0.55);
    }

    50% {
        box-shadow: 0 0 0 12px rgba(62, 230, 176, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(62, 230, 176, 0);
    }
}

.upload-section.pulse-highlight {
    animation: uploadPulse 0.7s ease 5;
}


.reports-section-header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.reports-section-header h2 {
    margin: 0;
    font-size: 1.6rem;
    color: var(--mint);
}

.reports-section-header p {
    margin: 0;
    color: var(--muted);
}

.upload-section h2,
.reports-section h2,
.reports-section h3,
.reports-section h4 {
    margin: 0 0 0.75rem;
    color: var(--mint);
}

.upload-section form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--muted);
}

.file-upload-container {
    margin-bottom: 0.75rem;
    position: relative;
}

.file-input {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.4rem 1.5rem;
    background: var(--panel-2);
    border: 2px dashed var(--border);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.file-upload-label:hover,
.file-upload-label.dragover {
    border-color: var(--mint);
    background: rgba(62, 230, 176, 0.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.upload-icon {
    width: 48px;
    height: 48px;
    background: rgba(62, 230, 176, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    color: var(--mint);
    transition: transform 0.2s ease, background 0.2s ease;
}

.file-upload-label:hover .upload-icon {
    transform: translateY(-4px) scale(1.05);
    background: rgba(62, 230, 176, 0.2);
}

.upload-text strong {
    display: block;
    font-size: 1.15rem;
    color: var(--text);
    margin-bottom: 0.35rem;
}

.upload-text span {
    font-size: 0.85rem;
    color: var(--muted);
    display: block;
}

.file-name-display {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: var(--muted);
    padding: 0.6rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    text-align: center;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.file-name-display.selected {
    color: var(--mint);
    border-color: rgba(62, 230, 176, 0.2);
    background: rgba(62, 230, 176, 0.05);
}

.upload-section form select {
    width: 100%;
    padding: 10px 14px;
    margin-bottom: 0.75rem;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-weight: 500;
}

.upload-section form button {
    display: block;
    width: 100%;
    padding: 12px;
    border: 1px solid color-mix(in oklab, var(--mint) 32%, var(--border));
    border-radius: 8px;
    font-weight: 600;
    background: var(--mint);
    color: #051e14;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
    transition: background 0.18s ease, transform 0.1s ease, box-shadow 0.18s ease;
}

.upload-section form button:hover {
    background: color-mix(in oklab, var(--mint) 85%, #ffffff);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.5);
}

.upload-section form button:active {
    transform: translateY(1px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.48);
}

.reports-section p {
    color: var(--muted);
}

.reports-history {
    list-style: none;
    margin: 0;
    padding: 3px 4px 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    max-height: 340px;
    overflow-y: auto;
}

.reports-history::-webkit-scrollbar {
    width: 4px;
}

.reports-history::-webkit-scrollbar-track {
    background: transparent;
}

.reports-history::-webkit-scrollbar-thumb {
    background: rgba(62, 230, 176, 0.25);
    border-radius: 999px;
}

.reports-history::-webkit-scrollbar-thumb:hover {
    background: rgba(62, 230, 176, 0.45);
}

.history-item {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: border-color 0.18s ease, transform 0.18s ease;
}

.history-item:hover {
    border-color: color-mix(in oklab, var(--mint) 55%, var(--border));
    transform: translateY(-1px);
}

.history-item.empty {
    justify-content: center;
    align-items: center;
    color: var(--muted);
    text-align: center;
}

.history-info {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.history-primary {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
}

.history-primary strong {
    font-size: 1.05rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
    white-space: normal;
}

.history-language {
    font-size: 0.8rem;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    background: color-mix(in oklab, var(--panel-2) 50%, var(--mint) 15%);
}

.history-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.history-tags {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: color-mix(in oklab, var(--mint) 20%, var(--panel));
    color: var(--text);
    text-transform: capitalize;
}

.history-link {
    align-self: center;
    font-weight: 600;
    text-decoration: none;
    color: var(--mint);
    white-space: nowrap;
}

.reports-insights {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.reports-insights h3 {
    font-size: 1.3rem;
}

.insight-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.insight-card {
    position: relative;
    padding: 1.1rem 1.25rem;
    border-radius: 16px;
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.insight-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(62, 230, 176, 0.16);
    color: var(--mint);
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
}

.insight-label {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.insight-value {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.15;
}

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

.insight-column {
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.15rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.insight-column h4 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--mint);
}

.insight-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.insight-list li {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.insight-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.insight-name {
    color: var(--text);
}

.insight-count {
    font-weight: 600;
    color: var(--text);
}

.insight-bar {
    position: relative;
    height: 6px;
    border-radius: 999px;
    background: color-mix(in oklab, var(--panel) 70%, rgba(62, 230, 176, 0.08));
    overflow: hidden;
}

.insight-bar .insight-progress {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--mint);
    transition: width 0.4s ease;
}

.insight-empty {
    font-size: 0.85rem;
    color: var(--muted);
}

.history-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    max-width: fit-content;
}

.history-tags span {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: color-mix(in oklab, var(--mint) 18%, var(--panel));
    color: var(--text);
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.footer {
    background-color: var(--panel-2);
    padding: 2rem;
    margin-top: auto;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto 1.5rem;
}

.footer-col h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--mint);
}

.footer-col p,
.footer-col a {
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.4;
}

.footer-col a {
    text-decoration: none;
}

.footer-col a:hover {
    color: var(--mint);
}

.footer-bottom {
    text-align: center;
    font-size: 0.8rem;
    color: var(--muted);
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

@media (max-width: 600px) {
    .navbar-brand img {
        height: 42px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .navbar {
        flex-wrap: wrap;
    }

    .nav-links {
        flex-basis: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }

    .nav-auth {
        flex-basis: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }

    .content {
        padding: 1rem;
    }

    .history-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .history-link {
        padding-top: 0.4rem;
    }
}

/* ========================================
   Light Mode Overrides
   ======================================== */

html.light .content h2 {
    color: var(--mint);
}

html.light .content p {
    color: rgba(10, 30, 28, 0.68);
}

html.light .upload-section,
html.light .transformation-section,
html.light .reports-section {
    background: var(--panel);
    border-color: var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

html.light .transformation-section h2 {
    color: var(--mint);
}

html.light .transformation-subtitle {
    color: rgba(10, 30, 28, 0.68);
}

html.light .reports-section-header h2 {
    color: var(--mint);
}

html.light .reports-section-header p {
    color: rgba(10, 30, 28, 0.68);
}

html.light .upload-section h2,
html.light .reports-section h2,
html.light .reports-section h3,
html.light .reports-section h4 {
    color: var(--mint);
}

html.light .upload-section form label {
    color: rgba(10, 30, 28, 0.68);
}

html.light .file-upload-label {
    background: #f8fafc;
    border-color: #e2e8f0;
}

html.light .file-upload-label:hover {
    background: rgba(16, 185, 129, 0.04);
    border-color: var(--mint);
}

html.light .upload-text strong {
    color: #1a2e28;
}

html.light .upload-text span {
    color: #64748b;
}

html.light .file-name-display {
    background: #f1f5f9;
    color: #64748b;
}

html.light .file-name-display.selected {
    background: rgba(16, 185, 129, 0.08);
    color: #059669;
}

html.light .upload-section form select {
    background: #ffffff;
    border-color: var(--border);
    color: #1a2e28;
}

html.light .upload-section form button {
    background: var(--mint);
    color: #051e14;
    border-color: color-mix(in oklab, var(--mint) 32%, var(--border));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

html.light .upload-section form button:hover {
    background: color-mix(in oklab, var(--mint) 85%, #ffffff);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

html.light .upload-section form button:active {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

html.light .reports-section p {
    color: rgba(10, 30, 28, 0.68);
}

html.light .history-item {
    background: rgba(255, 255, 255, 0.85);
    border-color: var(--border);
}

html.light .history-item:hover {
    border-color: color-mix(in oklab, var(--mint) 55%, var(--border));
}

html.light .history-item.empty {
    color: rgba(10, 30, 28, 0.68);
}

html.light .history-primary strong {
    color: rgba(10, 30, 28, 0.95);
}

html.light .history-language {
    color: rgba(10, 30, 28, 0.75);
    border-color: var(--border);
    background: rgba(62, 230, 176, 0.08);
}

html.light .history-meta {
    color: rgba(10, 30, 28, 0.68);
}

html.light .history-tags {
    background: rgba(62, 230, 176, 0.12);
    color: rgba(10, 30, 28, 0.85);
}

html.light .history-link {
    color: var(--mint);
}

html.light .reports-insights h3 {
    color: var(--mint);
}

html.light .insight-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.9));
    border-color: var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

html.light .insight-icon {
    background: rgba(62, 230, 176, 0.12);
    color: var(--mint);
}

html.light .insight-label {
    color: rgba(10, 30, 28, 0.68);
}

html.light .insight-value {
    color: rgba(10, 30, 28, 0.95);
}

html.light .insight-column {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

html.light .insight-column h4 {
    color: var(--mint);
}

html.light .insight-name,
html.light .insight-count {
    color: rgba(10, 30, 28, 0.95);
}

html.light .insight-bar {
    background: rgba(62, 230, 176, 0.08);
}

html.light .insight-bar .insight-progress {
    background: linear-gradient(90deg, rgba(62, 230, 176, 0.85), rgba(62, 230, 176, 0.45));
}

html.light .insight-empty {
    color: rgba(10, 30, 28, 0.68);
}

html.light .history-tags span {
    background: rgba(62, 230, 176, 0.12);
    color: rgba(10, 30, 28, 0.85);
}

html.light .footer {
    background: var(--panel);
    border-top-color: var(--border);
}

html.light .footer-col h4 {
    color: var(--mint);
}

html.light .footer-col p,
html.light .footer-col a {
    color: rgba(10, 30, 28, 0.68);
}

html.light .footer-col a:hover {
    color: var(--mint);
}

html.light .footer-bottom {
    color: rgba(10, 30, 28, 0.68);
    border-top-color: var(--border);
}