/* === Legacy Style Bridge === */
/* This file provides backward compatibility for templates that haven't been migrated yet.
   New templates should use classes from the modular CSS files. */

/* Legacy alert-error → maps to alert-danger */
.alert-error {
    background: var(--color-danger-light);
    color: #991B1B;
    border: 1px solid #FECACA;
}

/* Legacy .table class (templates using bare "table") */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem 1rem;
    text-align: right;
    border-bottom: 1px solid var(--color-border-light);
    font-size: var(--font-size-sm);
}

.table th {
    background: var(--color-surface-hover);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-secondary);
}

/* Legacy dashboard-card class used in portal templates */
.dashboard-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border-light);
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.dashboard-card h3 {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
    margin-bottom: var(--space-1);
}

.dashboard-card h4 {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-2);
}

.dashboard-card p {
    font-size: var(--font-size-sm);
    color: var(--color-muted);
    margin-bottom: var(--space-1);
}

/* Legacy stat classes used in portal templates */
.stat-value {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    line-height: var(--line-height-tight);
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--color-muted);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-1) 0;
}

.stat-block {
    padding: var(--space-3);
    background: var(--color-surface-hover);
    border-radius: var(--radius-md);
}

.stat-block h4 {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-2);
}

/* Legacy badge classes */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.badge-success {
    background: var(--color-success-light);
    color: #065F46;
}

.badge-danger {
    background: var(--color-danger-light);
    color: #991B1B;
}

/* Legacy card-details and detail-item */
.card-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    margin-top: var(--space-2);
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: var(--space-1) 0;
    font-size: var(--font-size-sm);
    border-bottom: 1px solid var(--color-border-light);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--color-text-secondary);
}

/* Legacy dashboard-section class */
.dashboard-section {
    margin-top: var(--space-6);
    margin-bottom: var(--space-6);
}

.dashboard-section h2 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-2);
    border-bottom: 2px solid var(--color-border-light);
}

/* Legacy dashboard-value and dashboard-meta */
.dashboard-value {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
}

.dashboard-value.positive { color: var(--color-success); }
.dashboard-value.negative { color: var(--color-danger); }

.dashboard-meta {
    font-size: var(--font-size-xs);
    color: var(--color-muted);
}

/* Legacy form-control used in attendance */
.form-control {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    color: var(--color-text);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    text-align: right;
    transition: border-color var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

/* Legacy action-links */
.action-links {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-top: var(--space-5);
}
