/* Status badges */
.badge {
    display: inline-block;
    padding: 0.15em 0.55em;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.badge-active   { background: #2ecc40; color: #fff; }
.badge-created  { background: #0074d9; color: #fff; }
.badge-expired  { background: #ff851b; color: #fff; }
.badge-revoked  { background: #ff4136; color: #fff; }
.badge-pending  { background: #aaa;    color: #fff; }

/* Stats bar */
.stats-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.stat-card {
    flex: 1;
    min-width: 120px;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: var(--pico-card-background-color);
    border: 1px solid var(--pico-muted-border-color);
    text-align: center;
}
.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
}
.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--pico-muted-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Credential card */
.credential-card {
    background: var(--pico-card-background-color);
    border: 2px solid #2ecc40;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
}
.credential-card h4 {
    margin: 0 0 1rem;
    color: #2ecc40;
}
.credential-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--pico-background-color);
    border-radius: 4px;
    font-family: monospace;
}
.credential-field .label {
    font-weight: 600;
    min-width: 100px;
    color: var(--pico-muted-color);
    font-family: inherit;
}
.credential-field .value {
    flex: 1;
    user-select: all;
}
.credential-field button {
    width: auto;
    margin: 0;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Countdown */
.countdown {
    font-size: 1.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.countdown.urgent {
    color: #ff4136;
}

/* Toast notifications */
#toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}
.toast {
    pointer-events: auto;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    background: var(--pico-card-background-color);
    border-left: 4px solid #0074d9;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: toast-in 0.3s ease-out;
    max-width: 360px;
}
.toast.success { border-left-color: #2ecc40; }
.toast.error   { border-left-color: #ff4136; }
.toast.warning { border-left-color: #ff851b; }
.toast-title {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
}
.toast-body {
    font-size: 0.8rem;
    color: var(--pico-muted-color);
}

@keyframes toast-in {
    from { opacity: 0; transform: translateX(100%); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes toast-out {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(100%); }
}

/* Session detail grid */
.session-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.session-meta dt {
    font-size: 0.8rem;
    color: var(--pico-muted-color);
    text-transform: uppercase;
    margin-bottom: 0.2rem;
}
.session-meta dd {
    margin: 0 0 0.75rem;
    font-weight: 500;
}

/* Actions row */
.actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}
.actions button {
    width: auto;
}

/* Login card centering */
.login-card {
    max-width: 420px;
    margin: 3rem auto;
}

/* Table tweaks */
table td, table th {
    white-space: nowrap;
}
table .clickable {
    cursor: pointer;
}
table .clickable:hover {
    text-decoration: underline;
    color: var(--pico-primary);
}

/* Filter bar */
.filter-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    align-items: center;
    flex-wrap: wrap;
}
.filter-bar select {
    width: auto;
    margin: 0;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--pico-muted-color);
}
.empty-state p {
    font-size: 1.1rem;
}
