/* 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: 2rem;
    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;
}

.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);
}

.upload-section form input[type="file"],
.upload-section form select {
    width: 100%;
    padding: 12px;
    margin-bottom: 1rem;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
}

.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: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.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;
}

.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: linear-gradient(145deg, color-mix(in oklab, var(--panel) 80%, rgba(62, 230, 176, 0.12)), color-mix(in oklab, var(--panel-2) 70%, rgba(15, 23, 42, 0.55)));
    border: 1px solid color-mix(in oklab, var(--mint) 20%, 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: linear-gradient(90deg, rgba(62, 230, 176, 0.85), rgba(62, 230, 176, 0.45));
    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 .upload-section form input[type="file"],
html.light .upload-section form select {
    background: rgba(255, 255, 255, 0.8);
    border-color: var(--border);
    color: rgba(10, 30, 28, 0.95);
}

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);
}
