/* ═══════════════════════════════════════════════
 * PermisOK – Easysystème Student Dashboard
 * ═══════════════════════════════════════════════ */

.pkesy-dash {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    max-width: 900px;
    margin: 0 auto;
}

/* ── Header ──────────────────────────────────── */

.pkesy-dash__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.pkesy-dash__title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.pkesy-dash__title svg {
    color: #E7B104;
}

.pkesy-dash__title h2 {
    font-size: 22px;
    font-weight: 800;
    color: #021A58;
    margin: 0;
    letter-spacing: -0.3px;
}

.pkesy-dash__title p {
    font-size: 13px;
    color: #64748b;
    margin: 2px 0 0;
}

/* ── Badge ───────────────────────────────────── */

.pkesy-badge--active {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
    border: 1px solid rgba(5, 150, 105, 0.25);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pkesy-badge--expired {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(220, 38, 38, 0.08);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Stats ───────────────────────────────────── */

.pkesy-dash__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.pkesy-dash__stat {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 22px 20px;
    text-align: center;
    transition: border-color 0.2s, transform 0.2s;
}

.pkesy-dash__stat:hover {
    border-color: #021A58;
    transform: translateY(-2px);
}

.pkesy-dash__stat-num {
    font-size: 26px;
    font-weight: 800;
    color: #021A58;
    margin-bottom: 4px;
}

.pkesy-dash__stat-num--good { color: #059669; }
.pkesy-dash__stat-num--warn { color: #d97706; }
.pkesy-dash__stat-num--bad  { color: #dc2626; }

.pkesy-dash__stat-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.pkesy-dash__card {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 18px;
    padding: 28px;
    margin-bottom: 20px;
}

.pkesy-dash__card--info {
    text-align: center;
    padding: 48px 32px;
}

.pkesy-dash__card-icon {
    color: #E7B104;
    margin-bottom: 16px;
}

.pkesy-dash__card--info h3 {
    font-size: 20px;
    font-weight: 800;
    color: #021A58;
    margin: 0 0 12px;
}

.pkesy-dash__card--info p {
    color: #64748b;
    font-size: 14px;
    max-width: 500px;
    margin: 0 auto 20px;
    line-height: 1.6;
}

.pkesy-dash__card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.pkesy-dash__card-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #021A58;
    margin: 0;
}

/* ── Access Card ─────────────────────────────── */

.pkesy-dash__card--access {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    background: linear-gradient(135deg, #021A58 0%, #0a2d7a 100%);
    border: none;
}

.pkesy-dash__access-info h3 {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 8px;
}

.pkesy-dash__access-info p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    margin: 0 0 14px;
    line-height: 1.5;
}

.pkesy-dash__dates {
    display: flex;
    gap: 20px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.pkesy-dash__dates strong {
    color: #E7B104;
}

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

.pkesy-dash .pkesy-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    background: #E7B104;
    color: #021A58;
    white-space: nowrap;
    flex-shrink: 0;
}

.pkesy-dash .pkesy-btn:hover {
    background: #f0c020;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(231, 177, 4, 0.4);
}

.pkesy-dash .pkesy-btn--primary {
    background: #E7B104;
    color: #021A58;
    padding: 14px 28px;
    font-size: 15px;
}

.pkesy-dash .pkesy-btn--sm {
    padding: 6px 14px;
    font-size: 12px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.pkesy-dash .pkesy-btn--sm:hover {
    background: #e2e8f0;
    transform: none;
    box-shadow: none;
}

/* ── Results Table ───────────────────────────── */

.pkesy-results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.pkesy-results-table thead th {
    text-align: left;
    padding: 10px 12px;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
}

.pkesy-results-table tbody td {
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

.pkesy-results-table tbody tr:last-child td {
    border-bottom: none;
}

.pkesy-results-table tbody tr:hover {
    background: #fafbfd;
}

/* ── Tags ────────────────────────────────────── */

.pkesy-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.pkesy-tag--test {
    background: #eff6ff;
    color: #2563eb;
}

.pkesy-tag--thematic {
    background: #fef3c7;
    color: #d97706;
}

/* ── Result badges ───────────────────────────── */

.pkesy-result {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
}

.pkesy-result--pass {
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
}

.pkesy-result--fail {
    background: rgba(220, 38, 38, 0.08);
    color: #dc2626;
}

/* ── Empty state ─────────────────────────────── */

.pkesy-dash__empty {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
}

.pkesy-dash__empty svg {
    margin-bottom: 12px;
    color: #cbd5e1;
}

.pkesy-dash__empty p {
    font-size: 14px;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

.pkesy-dash__more {
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
    padding: 12px 0 0;
    margin: 0;
}

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

@media (max-width: 768px) {
    .pkesy-dash__header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    .pkesy-dash__stats {
        grid-template-columns: 1fr;
    }
    .pkesy-dash__card--access {
        flex-direction: column;
        text-align: center;
    }
    .pkesy-dash__dates {
        justify-content: center;
    }
    .pkesy-results-table {
        font-size: 12px;
    }
    .pkesy-results-table thead th,
    .pkesy-results-table tbody td {
        padding: 8px 6px;
    }
}
