/* ── Admin Dashboard Styles ──────────────────────────────────────────── */

.admin-shell {
    display: flex;
    min-height: calc(100vh - 64px);
    background: #0d0d0d;
    color: #e0e0e0;
}

/* ── Sidebar ───────────────────────────────────────────────────────── */

.admin-sidebar {
    width: 240px;
    background: #111;
    border-right: 1px solid #222;
    padding: 1rem 0;
    flex-shrink: 0;
    overflow-y: auto;
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
}

.admin-sidebar__header {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #222;
    margin-bottom: 0.5rem;
}

.admin-sidebar__title {
    font-family: 'Fredoka One', sans-serif;
    font-size: 1.1rem;
    color: #CC2936;
    margin: 0;
}

.admin-sidebar__role {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.admin-sidebar__section {
    padding: 0.5rem 1.25rem 0.25rem;
    font-size: 0.65rem;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.admin-sidebar__link {
    display: block;
    padding: 0.5rem 1.25rem;
    color: #aaa;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}

.admin-sidebar__link:hover {
    background: #1a1a1a;
    color: #fff;
}

.admin-sidebar__link--active {
    background: rgba(204, 41, 54, 0.1);
    color: #CC2936;
    border-left-color: #CC2936;
    font-weight: 600;
}

/* ── Main Content ──────────────────────────────────────────────────── */

.admin-content {
    flex: 1;
    padding: 1.5rem 2rem;
    overflow-y: auto;
    min-width: 0;
}

.admin-content__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.admin-content__title {
    font-family: 'Fredoka One', sans-serif;
    font-size: 1.5rem;
    color: #fff;
    margin: 0;
}

/* ── Stat Cards ────────────────────────────────────────────────────── */

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.admin-stat-card {
    background: #161616;
    border: 1px solid #222;
    border-radius: 12px;
    padding: 1.25rem;
    transition: border-color 0.15s;
}

.admin-stat-card:hover {
    border-color: #333;
}

.admin-stat-card__label {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.admin-stat-card__value {
    font-family: 'Fredoka One', sans-serif;
    font-size: 1.75rem;
    color: #fff;
    line-height: 1;
}

.admin-stat-card__value--red {
    color: #CC2936;
}

.admin-stat-card__value--green {
    color: #4ade80;
}

.admin-stat-card__value--gold {
    color: #FFB347;
}

.admin-stat-card__delta {
    font-size: 0.7rem;
    margin-top: 0.35rem;
}

.admin-stat-card__delta--up {
    color: #4ade80;
}

.admin-stat-card__delta--down {
    color: #f87171;
}

/* ── Data Table ────────────────────────────────────────────────────── */

.admin-table-wrapper {
    background: #161616;
    border: 1px solid #222;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.admin-table th {
    background: #111;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #222;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.admin-table th:hover {
    color: #ccc;
}

.admin-table td {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid #1a1a1a;
    color: #ccc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.admin-table tr:hover td {
    background: #1a1a1a;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

/* ── Pagination ────────────────────────────────────────────────────── */

.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-top: 1px solid #222;
    font-size: 0.8rem;
    color: #888;
}

.admin-pagination__buttons {
    display: flex;
    gap: 0.5rem;
}

.admin-pagination__btn {
    padding: 0.35rem 0.75rem;
    background: #222;
    border: 1px solid #333;
    border-radius: 6px;
    color: #ccc;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.15s;
}

.admin-pagination__btn:hover:not(:disabled) {
    background: #333;
    color: #fff;
}

.admin-pagination__btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Buttons ───────────────────────────────────────────────────────── */

.admin-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    font-family: 'Nunito', sans-serif;
}

.admin-btn--primary {
    background: #CC2936;
    color: #fff;
}

.admin-btn--primary:hover {
    background: #A82020;
}

.admin-btn--secondary {
    background: #222;
    color: #ccc;
    border: 1px solid #333;
}

.admin-btn--secondary:hover {
    background: #333;
    color: #fff;
}

.admin-btn--danger {
    background: #7f1d1d;
    color: #fca5a5;
}

.admin-btn--danger:hover {
    background: #991b1b;
}

.admin-btn--success {
    background: #14532d;
    color: #86efac;
}

.admin-btn--success:hover {
    background: #166534;
}

.admin-btn--sm {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
}

.admin-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Badges ────────────────────────────────────────────────────────── */

.admin-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.admin-badge--active { background: #14532d; color: #86efac; }
.admin-badge--suspended { background: #78350f; color: #fbbf24; }
.admin-badge--banned { background: #7f1d1d; color: #fca5a5; }
.admin-badge--pending { background: #1e3a5f; color: #93c5fd; }
.admin-badge--completed { background: #14532d; color: #86efac; }
.admin-badge--disputed { background: #7f1d1d; color: #fca5a5; }
.admin-badge--held { background: #78350f; color: #fbbf24; }
.admin-badge--released { background: #14532d; color: #86efac; }
.admin-badge--open { background: #1e3a5f; color: #93c5fd; }
.admin-badge--closed { background: #333; color: #888; }

/* ── Filters / Toolbar ─────────────────────────────────────────────── */

.admin-toolbar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.admin-input {
    padding: 0.5rem 0.75rem;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 0.85rem;
    font-family: 'Nunito', sans-serif;
    outline: none;
    transition: border-color 0.15s;
}

.admin-input:focus {
    border-color: #CC2936;
}

.admin-input--search {
    min-width: 240px;
}

.admin-select {
    padding: 0.5rem 0.75rem;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 0.85rem;
    font-family: 'Nunito', sans-serif;
    outline: none;
    cursor: pointer;
}

.admin-select:focus {
    border-color: #CC2936;
}

/* ── Charts ────────────────────────────────────────────────────────── */

.admin-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.admin-chart-card {
    background: #161616;
    border: 1px solid #222;
    border-radius: 12px;
    padding: 1.25rem;
}

.admin-chart-card__title {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 1rem;
    font-weight: 600;
}

.admin-chart-canvas {
    width: 100%;
    height: 200px;
    display: block;
}

/* ── Confirm Dialog / Modal ────────────────────────────────────────── */

.admin-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.admin-modal {
    background: #161616;
    border: 1px solid #333;
    border-radius: 16px;
    padding: 2rem;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.admin-modal__title {
    font-family: 'Fredoka One', sans-serif;
    font-size: 1.25rem;
    color: #fff;
    margin: 0 0 0.5rem;
}

.admin-modal__body {
    color: #aaa;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.admin-modal__actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* ── Detail Panel ──────────────────────────────────────────────────── */

.admin-detail {
    background: #161616;
    border: 1px solid #222;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.admin-detail__row {
    display: flex;
    padding: 0.5rem 0;
    border-bottom: 1px solid #1a1a1a;
}

.admin-detail__row:last-child {
    border-bottom: none;
}

.admin-detail__label {
    width: 160px;
    flex-shrink: 0;
    color: #888;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.admin-detail__value {
    color: #e0e0e0;
    font-size: 0.85rem;
}

/* ── Loading / Empty ───────────────────────────────────────────────── */

.admin-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #888;
    font-size: 0.9rem;
}

.admin-empty {
    text-align: center;
    padding: 3rem;
    color: #555;
    font-size: 0.9rem;
}

/* ── Section spacing ───────────────────────────────────────────────── */

.admin-section {
    margin-bottom: 2rem;
}

.admin-section__title {
    font-size: 1rem;
    color: #ccc;
    font-weight: 700;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #222;
}

/* ── Form ──────────────────────────────────────────────────────────── */

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 480px;
}

.admin-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.admin-form-group__label {
    font-size: 0.75rem;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
}

.admin-textarea {
    padding: 0.5rem 0.75rem;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 0.85rem;
    font-family: 'Nunito', sans-serif;
    outline: none;
    resize: vertical;
    min-height: 80px;
}

.admin-textarea:focus {
    border-color: #CC2936;
}

/* ── Responsive ────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .admin-shell {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid #222;
    }

    .admin-content {
        padding: 1rem;
    }

    .admin-charts {
        grid-template-columns: 1fr;
    }
}

/* ── Photo Moderation Grid ─────────────────────────────────────────── */

.mod-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.mod-photo-card {
    background: #1e1e1e;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: opacity 0.3s;
}

.mod-photo-card--removed {
    opacity: 0.4;
    border-color: #F44336;
}

.mod-photo-card__img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
}

.mod-photo-card__actions {
    padding: 0.75rem;
    text-align: center;
}

.mod-photo-card__removed-label {
    color: #F44336;
    font-size: 0.85rem;
    font-weight: 600;
}

.admin-error {
    color: #F44336;
    background: rgba(244, 67, 54, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    margin-top: 0.5rem;
}

.admin-hint {
    color: #aaa;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}
