﻿/* 🎨 Tema principale (variabili colore) */
:root {
    --bg: #fafafa;
    --panel: #ffffff;
    --text: #111111;
    --muted-text: #333333;
    --border: #e6e6e6;
    --soft-border: #f0f0f0;
    --header-bg: #f5f5f5;
    --hover: #f7f7f7;
    --accent: #111111; /* black accent */
}

/* 🌍 Reset base per compatibilità con Bootstrap */
html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* 🔹 Layout wrappers */
.page {
    background: var(--bg);
    color: var(--text);
}

.content {
    /* Solo padding orizzontale per non bloccare py-* Bootstrap */
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.top-row {
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Solo padding orizzontale */
    padding-left: 1rem;
    padding-right: 1rem;
}

.sidebar {
    background: var(--panel);
    border-right: 1px solid var(--border);
}

/* 📊 Table container */
.table-container {
    background: var(--panel);
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 2rem;
}

.table {
    margin-bottom: 0;
    width: 100%;
    border-collapse: collapse;
}

    .table thead {
        background: var(--header-bg);
        color: var(--text);
        border-bottom: 1px solid var(--border);
    }

        .table thead th {
            border: none;
            padding: 1rem 1.25rem;
            font-weight: 600;
            text-transform: uppercase;
            font-size: 0.82rem;
            letter-spacing: 0.3px;
            text-align: left;
        }

    .table tbody tr {
        border-bottom: 1px solid var(--soft-border);
        transition: background-color 0.15s ease;
    }

        .table tbody tr:hover {
            background: var(--hover);
        }

    .table tbody td {
        padding: 0.9rem 1.25rem;
        vertical-align: middle;
    }

/* 🧩 Sessions panel */
.sessions-panel {
    background: var(--panel);
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.sessions-header {
    background: var(--accent);
    color: #fff;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    .sessions-header h5 {
        margin: 0;
        font-size: 1rem;
        font-weight: 600;
    }

.sessions-body {
    padding: 1.5rem;
}

/* 🗂️ Sessions grid/cards */
.sessions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.session-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

    .session-card:hover {
        background: var(--hover);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
        transform: translateY(-1px);
    }

.session-card-header {
    background: #f7f7f7;
    padding: 0.6rem 0.9rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text);
    display: flex;
    align-items: center;
}

.session-card-body {
    padding: 0.9rem;
}

/* 🧾 Fields */
.session-field {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--soft-border);
}

    .session-field:last-child {
        border-bottom: none;
    }

.field-label {
    font-weight: 600;
    color: var(--text);
}

.field-value {
    color: var(--muted-text);
    text-align: right;
    word-break: break-word;
}

/* 🏷️ Badges & buttons */
.badge {
    padding: 0.35rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 500;
    background: var(--header-bg);
    color: var(--text);
    border-radius: 6px;
}

.btn-action {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    text-decoration: none !important;
}

    .btn-action:hover:not(:disabled) {
        transform: translateY(-1px);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    }

    .btn-action:disabled {
        cursor: not-allowed;
        opacity: 0.6;
    }

/* Override per link come bottoni */
a.btn-action,
a.btn-action:hover,
a.btn-action:focus,
a.btn-action:active {
    color: #fff !important;
    text-decoration: none !important;
}

/* Bootstrap-friendly override per outline-primary */
.btn-outline-primary {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    margin-right: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

    .btn-outline-primary:hover {
        background: var(--accent);
        color: #fff;
        transform: translateY(-1px);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    }

.btn.btn-primary.btn-action:focus,
.btn.btn-primary.btn-action:active,
.btn.btn-primary.btn-action:focus-visible,
.btn-check:focus + .btn.btn-primary.btn-action {
    background-color: var(--accent, #111) !important;
    border-color: var(--accent, #111) !important;
    color: #fff !important;
    box-shadow: none !important;
}

.btn.btn-outline-primary {
    color: #555 !important;
    border-color: #777 !important;
    background-color: transparent !important;
    transition: all 0.15s ease;
}

    /* Hover → grigio chiaro */
    .btn.btn-outline-primary:hover:not(:disabled) {
        background-color: #e0e0e0 !important;
        border-color: #777 !important;
        color: #111 !important;
        transform: translateY(-1px);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    }

    /* Active/Focus → resta grigio, no blu */
    .btn.btn-outline-primary:focus,
    .btn.btn-outline-primary:active,
    .btn.btn-outline-primary:focus-visible,
    .btn-check:focus + .btn.btn-outline-primary {
        background-color: #d9d9d9 !important;
        border-color: #777 !important;
        color: #111 !important;
        box-shadow: none !important;
    }
/* 🔗 Link in top-row o pannelli */
.top-row a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
}

    .top-row a:hover {
        color: #000;
    }









.user-detail-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px 40px;
}

.page-header {
    margin-bottom: 32px;
}

.page-title {
    font-size: 28px;
    font-weight: 600;
    color: #111;
    margin: 0;
}

/* Loading state */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.loading-text {
    margin-top: 16px;
    color: #666;
    font-size: 14px;
}

/* User info grid */
.user-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 48px;
}

.info-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s ease;
}

    .info-card:hover {
        border-color: #d0d0d0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    .info-card.highlight {
        background: #111;
        border-color: #111;
    }

        .info-card.highlight .info-label {
            color: rgba(255, 255, 255, 0.7);
        }

        .info-card.highlight .info-value {
            color: #fff;
        }

.info-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    margin-bottom: 8px;
}

.info-value {
    font-size: 16px;
    font-weight: 500;
    color: #111;
    word-break: break-word;
}

/* Sessions section */
.sessions-section {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: #111;
    margin: 0;
}

.btn-export {
    display: flex;
    align-items: center;
    font-size: 14px;
    padding: 10px 20px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

    .empty-state i {
        font-size: 48px;
        margin-bottom: 16px;
        opacity: 0.5;
    }

    .empty-state p {
        margin: 0;
        font-size: 15px;
    }

/* Table */
.table-wrapper {
    overflow-x: auto;
}

.sessions-table {
    width: 100%;
    border-collapse: collapse;
}

    .sessions-table thead {
        background: #fafafa;
    }

        .sessions-table thead th {
            padding: 16px 12px;
            text-align: center;
            font-size: 12px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: #666;
            border-bottom: 1px solid #e5e5e5;
        }

    .sessions-table tbody tr {
        border-bottom: 1px solid #f0f0f0;
        transition: background-color 0.15s ease;
    }

        .sessions-table tbody tr:hover {
            background-color: #fafafa;
        }

        .sessions-table tbody tr:has(td:empty) {
            display: none;
        }

    .sessions-table tbody td {
        padding: 16px 12px;
        text-align: center;
    }

.table-cell {
    font-size: 14px;
    color: #111;
    text-align: center;
}

    .table-cell.text-muted {
        color: #999;
    }

/* Table footer */
.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.btn-outline-secondary {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    color: #111;
    background: #fff;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

    .btn-outline-secondary:hover {
        background: #fafafa;
        border-color: #d0d0d0;
        color: #000;
    }

/* Responsive */
@media (max-width: 768px) {
    .user-info-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .btn-export {
        width: 100%;
        justify-content: center;
    }

    .table-footer {
        flex-direction: column;
        gap: 16px;
    }

    .btn-outline-secondary {
        width: 100%;
        justify-content: center;
    }
}
