﻿/* Admin dashboard specific styles (prefer theme utilities where possible) */
.admin-dashboard {
    padding: 2rem 1rem;
}

.dashboard-header {
    margin-bottom: 1.25rem;
}

.dashboard-title {
    font-size: 1.75rem;
    margin: 0;
}

.dashboard-sub {
    color: #6c757d;
    margin-top: 0.25rem;
}

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

.card {
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 6px 18px rgba(15,23,42,0.06);
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary,#6f42c1);
}

.stat-label {
    color: #6c757d;
    margin-top: 0.25rem;
}

.panels {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1rem;
    align-items: start;
}

.panel {
    background: var(--color2);
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 6px 18px rgba(15,23,42,0.04);
}

    .panel h3 {
        margin-top: 0;
    }

.summary-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

    .summary-list li {
        padding: 0.35rem 0;
        border-bottom: 1px dashed rgba(0,0,0,0.04);
    }

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

    .recent-list li {
        padding: 0.35rem 0;
    }

.legend {
    list-style: none;
    padding: 0;
    margin-top: 0.75rem;
    display: flex;
    gap: 1rem;
}

    .legend li {
        display: flex;
        gap: 0.5rem;
        align-items: center;
        color: #495057;
    }

.swatch {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    display: inline-block;
}

.swatch-admin {
    background: #6f42c1;
}

.swatch-public {
    background: #20c997;
}

@media (max-width: 900px) {
    .panels {
        grid-template-columns: 1fr;
    }
}

/* Additional dashboard styles */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
}

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

.mini-card {
    display: flex;
    gap: .5rem;
    align-items: flex-start;
    padding: .5rem;
    border-radius: .5rem;
    background: rgba(0,0,0,0.02);
}

    .mini-card img {
        width: 72px;
        height: 56px;
        object-fit: cover;
        border-radius: .25rem;
    }

.mini-body h4 {
    margin: 0;
    font-size: 1rem
}

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

.job-row {
    display: flex;
    justify-content: space-between;
    padding: .5rem 0;
    border-bottom: 1px dashed rgba(0,0,0,0.04);
}

.team-preview {
    display: flex;
    gap: .5rem;
    margin-top: .5rem;
    flex-wrap: wrap
}

.team-pill {
    display: flex;
    gap: .5rem;
    align-items: center;
    padding: .25rem;
    border-radius: .5rem;
    background: rgba(0,0,0,0.02);
}

    .team-pill img {
        width: 40px;
        height: 40px;
        object-fit: cover;
        border-radius: 50%;
    }

.portfolio-row {
    display: flex;
    gap: .5rem;
    overflow: auto;
    padding-bottom: .25rem
}

.portfolio-card {
    width: 160px;
    margin: 0;
}

    .portfolio-card img {
        width: 100%;
        height: 100px;
        object-fit: cover;
        border-radius: .4rem;
    }

.timeline {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.timeline-item {
    display: flex;
    gap: .75rem;
}

    .timeline-item .year {
        font-weight: 700;
        color: var(--color-primary,#6f42c1);
        min-width: 64px
    }

.tag-cloud {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap
}

.tag {
    background: rgba(0,0,0,0.04);
    padding: .25rem .5rem;
    border-radius: 999px;
}

.actions-row {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap
}

.btn {
    display: inline-block;
    padding: .5rem .75rem;
    border-radius: .375rem;
    background: var(--color-primary,#6f42c1);
    color: #fff;
    text-decoration: none
}

    .btn.muted {
        background: transparent;
        color: var(--muted,#6c757d);
        border: 1px solid rgba(0,0,0,0.04)
    }

/* small utilities */
.muted {
    color: #6c757d
}

.small {
    font-size: .85rem
}

.in-view {
    transform: none;
    opacity: 1
}

.stat-card {
    transform: translateY(8px);
    opacity: 0;
    transition: all .6s cubic-bezier(.2,.8,.2,1)
}

    .stat-card.in-view {
        transform: none;
        opacity: 1
    }

@media (max-width: 1000px) {
    .grid-3 {
        grid-template-columns: 1fr;
    }

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

/* heatmap */
.heatgrid {
    display: grid;
    grid-template-columns: repeat(15, 1fr);
    gap: 4px;
}

.heatcell {
    width: 18px;
    height: 18px;
    border-radius: 3px;
}

/* general math card spacing */
.math-block {
    display: flex;
    gap: 1rem;
    align-items: center
}

/* floating appended cards styling */
.admin-dashboard > .card.panel {
    transition: transform .28s ease, opacity .28s ease;
}

 
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 1200;
    visibility: hidden;
    opacity: 0;
    transition: opacity .18s ease
}

    .modal-overlay[aria-hidden="false"] {
        visibility: visible;
        opacity: 1
    }

.modal-content {
    background: white;
    border-radius: 8px;
    max-width: 720px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eee
}

.modal-body {
    padding: 1rem 1.25rem;
    max-height: 60vh;
    overflow: auto
}

.modal-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid #eee;
    text-align: right
}

.modal-close {
    background: transparent;
    border: 0;
    font-size: 20px;
    line-height: 1;
    cursor: pointer
}

.btn-help {
    background: #6f42c1;
    color: #fff;
    border: 0;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer
}