/* ══════════════════════════════════════════════
   LiveMentor LMS — Design System
   Modern SaaS-style component library
   ══════════════════════════════════════════════ */

/* ── CSS Custom Properties (Design Tokens) ── */
:root {
    /* Brand */
    --lms-primary: #6366f1;
    --lms-primary-dark: #4f46e5;
    --lms-primary-light: #eef2ff;
    --lms-primary-ring: rgba(99, 102, 241, 0.25);

    /* Semantic */
    --lms-success: #22c55e;
    --lms-success-bg: #f0fdf4;
    --lms-success-border: #bbf7d0;
    --lms-warning: #eab308;
    --lms-warning-bg: #fefce8;
    --lms-warning-border: #fde68a;
    --lms-error: #ef4444;
    --lms-error-bg: #fef2f2;
    --lms-error-border: #fecaca;

    /* Neutrals */
    --lms-white: #ffffff;
    --lms-bg: #f8fafc;
    --lms-surface: #ffffff;
    --lms-border: #e2e8f0;
    --lms-border-light: #f1f5f9;

    /* Text */
    --lms-text-primary: #0f172a;
    --lms-text-secondary: #475569;
    --lms-text-muted: #94a3b8;
    --lms-text-inverse: #ffffff;

    /* Typography */
    --lms-font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
    --lms-font-mono: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;
    --lms-font-size-xs: 11px;
    --lms-font-size-sm: 13px;
    --lms-font-size-base: 14px;
    --lms-font-size-lg: 16px;
    --lms-font-size-xl: 20px;
    --lms-font-size-2xl: 24px;
    --lms-font-size-3xl: 28px;

    /* Spacing */
    --lms-space-1: 4px;
    --lms-space-2: 8px;
    --lms-space-3: 12px;
    --lms-space-4: 16px;
    --lms-space-5: 20px;
    --lms-space-6: 24px;
    --lms-space-8: 32px;
    --lms-space-10: 40px;

    /* Radius */
    --lms-radius-sm: 6px;
    --lms-radius-md: 8px;
    --lms-radius-lg: 12px;
    --lms-radius-xl: 16px;
    --lms-radius-full: 9999px;

    /* Shadows */
    --lms-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --lms-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --lms-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
    --lms-shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --lms-transition-fast: 0.15s ease;
    --lms-transition-base: 0.2s ease;
}

/* ── Reset Context ── */
.lms-ui {
    box-sizing: border-box;
    font-family: var(--lms-font-sans);
    color: var(--lms-text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.lms-ui *,
.lms-ui *::before,
.lms-ui *::after {
    box-sizing: border-box;
}

/* ══════════════════════════════════════════════
   COMPONENTS
   ══════════════════════════════════════════════ */

/* ── Card ── */
.lms-card {
    background: var(--lms-surface);
    border: 1px solid var(--lms-border);
    border-radius: var(--lms-radius-lg);
    box-shadow: var(--lms-shadow-sm);
    transition: box-shadow var(--lms-transition-base);
}
.lms-card:hover {
    box-shadow: var(--lms-shadow-md);
}
.lms-card-header {
    display: flex;
    align-items: center;
    gap: var(--lms-space-3);
    padding: var(--lms-space-5) var(--lms-space-6);
    border-bottom: 1px solid var(--lms-border-light);
}
.lms-card-header h2,
.lms-card-header h3 {
    margin: 0;
    font-size: var(--lms-font-size-lg);
    font-weight: 700;
    color: var(--lms-text-primary);
}
.lms-card-body {
    padding: var(--lms-space-6);
}

/* ── Stat Card ── */
.lms-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--lms-space-4);
}
.lms-stat-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--lms-space-4);
    padding: var(--lms-space-5);
    background: var(--lms-surface);
    border: 1px solid var(--lms-border);
    border-radius: var(--lms-radius-lg);
    box-shadow: var(--lms-shadow-sm);
    border-left: 3px solid var(--lms-primary);
    transition: box-shadow var(--lms-transition-base);
}
.lms-stat-card:hover {
    box-shadow: var(--lms-shadow-md);
}
.lms-stat-card-info {
    flex: 1;
    min-width: 0;
}
.lms-stat-card-label {
    font-size: var(--lms-font-size-xs);
    font-weight: 600;
    color: var(--lms-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 var(--lms-space-1);
}
.lms-stat-card-value {
    font-size: var(--lms-font-size-2xl);
    font-weight: 800;
    color: var(--lms-text-primary);
    margin: 0;
    line-height: 1.2;
}
.lms-stat-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--lms-radius-md);
    background: var(--lms-primary-light);
    color: var(--lms-primary);
    flex-shrink: 0;
}

/* ── Button ── */
.lms-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--lms-space-2);
    padding: 9px 18px;
    font-size: var(--lms-font-size-sm);
    font-weight: 600;
    font-family: var(--lms-font-sans);
    line-height: 1.4;
    border-radius: var(--lms-radius-md);
    border: 1.5px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--lms-transition-fast);
    white-space: nowrap;
    user-select: none;
}
.lms-btn:active {
    transform: scale(0.98);
}
.lms-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}
.lms-btn-primary {
    background: linear-gradient(135deg, var(--lms-primary), #8b5cf6);
    color: var(--lms-text-inverse);
    border: none;
}
.lms-btn-primary:hover:not(:disabled) {
    opacity: 0.9;
    box-shadow: 0 4px 14px var(--lms-primary-ring);
}
.lms-btn-secondary {
    background: var(--lms-white);
    color: var(--lms-text-secondary);
    border-color: var(--lms-border);
}
.lms-btn-secondary:hover:not(:disabled) {
    background: var(--lms-bg);
    border-color: #cbd5e1;
}
.lms-btn-danger {
    background: var(--lms-error-bg);
    color: var(--lms-error);
    border-color: var(--lms-error-border);
}
.lms-btn-danger:hover:not(:disabled) {
    background: var(--lms-error);
    color: var(--lms-text-inverse);
    border-color: var(--lms-error);
}
.lms-btn-ghost {
    background: transparent;
    color: var(--lms-text-secondary);
    border-color: transparent;
}
.lms-btn-ghost:hover:not(:disabled) {
    background: var(--lms-bg);
    color: var(--lms-text-primary);
}
.lms-btn-sm {
    padding: 5px 12px;
    font-size: var(--lms-font-size-xs);
}
.lms-btn-xs {
    padding: 3px 8px;
    font-size: 10px;
}
.lms-btn-lg {
    padding: 12px 24px;
    font-size: var(--lms-font-size-base);
}
.lms-btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
}
.lms-btn-icon.lms-btn-sm {
    width: 28px;
    height: 28px;
}

/* ── Badge ── */
.lms-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    font-size: var(--lms-font-size-xs);
    font-weight: 600;
    border-radius: var(--lms-radius-full);
    line-height: 1.5;
    white-space: nowrap;
}
.lms-badge-success {
    background: var(--lms-success-bg);
    color: #16a34a;
}
.lms-badge-warning {
    background: var(--lms-warning-bg);
    color: #b45309;
}
.lms-badge-error {
    background: var(--lms-error-bg);
    color: var(--lms-error);
}
.lms-badge-info {
    background: #eef2ff;
    color: var(--lms-primary);
}
.lms-badge-neutral {
    background: var(--lms-bg);
    color: var(--lms-text-secondary);
}

/* ── Table ── */
.lms-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--lms-border);
    border-radius: var(--lms-radius-lg);
    background: var(--lms-surface);
}
.lms-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--lms-font-size-sm);
}
.lms-table thead {
    background: var(--lms-bg);
}
.lms-table th {
    text-align: left;
    padding: var(--lms-space-3) var(--lms-space-4);
    font-size: var(--lms-font-size-xs);
    font-weight: 700;
    color: var(--lms-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--lms-border);
}
.lms-table td {
    padding: var(--lms-space-3) var(--lms-space-4);
    color: var(--lms-text-secondary);
    border-bottom: 1px solid var(--lms-border-light);
    vertical-align: middle;
}
.lms-table tbody tr:last-child td {
    border-bottom: none;
}
.lms-table tbody tr:hover td {
    background: var(--lms-bg);
}
.lms-table td:first-child {
    font-weight: 600;
    color: var(--lms-text-primary);
}

/* ── Empty State ── */
.lms-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--lms-space-3);
    padding: var(--lms-space-10) var(--lms-space-6);
    text-align: center;
    color: var(--lms-text-muted);
}
.lms-empty-icon {
    font-size: 40px;
    line-height: 1;
    opacity: 0.5;
}
.lms-empty h3 {
    font-size: var(--lms-font-size-lg);
    font-weight: 700;
    color: var(--lms-text-primary);
    margin: 0;
}
.lms-empty p {
    font-size: var(--lms-font-size-sm);
    color: var(--lms-text-muted);
    margin: 0;
    max-width: 360px;
}

/* ── Alert / Message ── */
.lms-alert {
    display: flex;
    align-items: flex-start;
    gap: var(--lms-space-3);
    padding: var(--lms-space-4);
    border-radius: var(--lms-radius-md);
    font-size: var(--lms-font-size-sm);
    line-height: 1.5;
}
.lms-alert-success {
    background: var(--lms-success-bg);
    color: #166534;
    border: 1px solid var(--lms-success-border);
}
.lms-alert-error {
    background: var(--lms-error-bg);
    color: #991b1b;
    border: 1px solid var(--lms-error-border);
}
.lms-alert-warning {
    background: var(--lms-warning-bg);
    color: #b45309;
    border: 1px solid var(--lms-warning-border);
}
.lms-alert-info {
    background: var(--lms-primary-light);
    color: var(--lms-primary-dark);
    border: 1px solid #c7d2fe;
}

/* ── Form ── */
.lms-form-group {
    margin-bottom: var(--lms-space-5);
}
.lms-form-label {
    display: block;
    font-size: var(--lms-font-size-sm);
    font-weight: 600;
    color: var(--lms-text-primary);
    margin-bottom: var(--lms-space-1);
}
.lms-form-label .lms-required {
    color: var(--lms-error);
}
.lms-form-hint {
    font-size: var(--lms-font-size-xs);
    color: var(--lms-text-muted);
    margin-top: var(--lms-space-1);
}
.lms-input {
    width: 100%;
    padding: 9px 12px;
    font-size: var(--lms-font-size-sm);
    font-family: var(--lms-font-sans);
    color: var(--lms-text-primary);
    background: var(--lms-white);
    border: 1.5px solid var(--lms-border);
    border-radius: var(--lms-radius-md);
    transition: all var(--lms-transition-fast);
    outline: none;
}
.lms-input:focus {
    border-color: var(--lms-primary);
    box-shadow: 0 0 0 3px var(--lms-primary-ring);
    background: var(--lms-white);
}
.lms-input::placeholder {
    color: var(--lms-text-muted);
}
.lms-input-sm {
    padding: 6px 10px;
    font-size: var(--lms-font-size-xs);
}
.lms-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* ── Tabs ── */
.lms-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--lms-border);
    margin-bottom: 0;
    overflow-x: auto;
}
.lms-tab {
    padding: 10px 20px;
    font-size: var(--lms-font-size-sm);
    font-weight: 600;
    color: var(--lms-text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: all var(--lms-transition-fast);
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--lms-space-2);
}
.lms-tab:hover {
    color: var(--lms-text-primary);
}
.lms-tab.active,
.lms-tab-active {
    color: var(--lms-primary);
    border-bottom-color: var(--lms-primary);
}
.lms-tab-content {
    display: none;
    padding: var(--lms-space-6) 0;
}
.lms-tab-content.active,
.lms-tab-content-active {
    display: block;
}

/* ── Progress Bar ── */
.lms-progress {
    width: 100%;
    height: 6px;
    background: var(--lms-border-light);
    border-radius: var(--lms-radius-full);
    overflow: hidden;
}
.lms-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--lms-primary), #8b5cf6);
    border-radius: var(--lms-radius-full);
    transition: width 0.5s ease;
}
.lms-progress-lg {
    height: 10px;
}
.lms-progress-complete .lms-progress-fill {
    background: linear-gradient(90deg, var(--lms-success), #16a34a);
}

/* ── Loading / Skeleton ── */
.lms-skeleton {
    background: linear-gradient(90deg, var(--lms-border-light) 25%, var(--lms-border) 50%, var(--lms-border-light) 75%);
    background-size: 200% 100%;
    animation: lms-shimmer 1.5s infinite;
    border-radius: var(--lms-radius-sm);
}
@keyframes lms-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.lms-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--lms-space-3);
    padding: var(--lms-space-10);
    color: var(--lms-text-muted);
    font-size: var(--lms-font-size-sm);
}

/* ── Status Badge (conectado/desconectado) ── */
.lms-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: var(--lms-radius-full);
    background: var(--lms-text-muted);
}
.lms-status-connected .lms-status-dot {
    background: var(--lms-success);
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
}
.lms-status-disconnected .lms-status-dot {
    background: var(--lms-text-muted);
}

/* ── Grid ── */
.lms-grid {
    display: grid;
    gap: var(--lms-space-4);
}
.lms-grid-2 { grid-template-columns: repeat(2, 1fr); }
.lms-grid-3 { grid-template-columns: repeat(3, 1fr); }
.lms-grid-4 { grid-template-columns: repeat(4, 1fr); }
.lms-grid-auto { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* ── Modal / Drawer ── */
.lms-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 100000;
    display: none;
    overflow-y: auto;
}
.lms-overlay.active {
    display: block;
}
.lms-modal {
    background: var(--lms-surface);
    border-radius: var(--lms-radius-xl);
    max-width: 640px;
    margin: 60px auto;
    box-shadow: var(--lms-shadow-xl);
    position: relative;
}
.lms-modal-header {
    display: flex;
    align-items: center;
    gap: var(--lms-space-3);
    padding: var(--lms-space-5) var(--lms-space-6);
    border-bottom: 1px solid var(--lms-border-light);
}
.lms-modal-header h3 {
    margin: 0;
    font-size: var(--lms-font-size-lg);
    font-weight: 700;
    flex: 1;
}
.lms-modal-body {
    padding: var(--lms-space-6);
}

/* ── Avatar ── */
.lms-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--lms-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--lms-text-inverse);
    background: linear-gradient(135deg, var(--lms-primary), #8b5cf6);
    flex-shrink: 0;
    overflow: hidden;
}
.lms-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.lms-avatar-lg {
    width: 48px;
    height: 48px;
    font-size: 18px;
}
.lms-avatar-sm {
    width: 28px;
    height: 28px;
    font-size: 11px;
}

/* ── Lucide Icons ── */
.lms-spin {
    animation: lms-icon-spin 1s linear infinite;
}
@keyframes lms-icon-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ── Lucide Icons ── */
.lms-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.lms-icon svg {
    width: 100%;
    height: 100%;
}
.lms-stat-card-icon .lms-icon {
    width: 22px;
    height: 22px;
}
.lms-dash-panel-header .lms-icon {
    width: 18px;
    height: 18px;
}
.lms-dash-quick .lms-icon {
    width: 16px;
    height: 16px;
}

/* ── Utilities ── */
.lms-flex { display: flex; }
.lms-flex-col { flex-direction: column; }
.lms-flex-wrap { flex-wrap: wrap; }
.lms-items-center { align-items: center; }
.lms-justify-between { justify-content: space-between; }
.lms-gap-1 { gap: var(--lms-space-1); }
.lms-gap-2 { gap: var(--lms-space-2); }
.lms-gap-3 { gap: var(--lms-space-3); }
.lms-gap-4 { gap: var(--lms-space-4); }
.lms-gap-6 { gap: var(--lms-space-6); }
.lms-flex-1 { flex: 1; }
.lms-shrink-0 { flex-shrink: 0; }

.lms-mt-0 { margin-top: 0; }
.lms-mt-2 { margin-top: var(--lms-space-2); }
.lms-mt-4 { margin-top: var(--lms-space-4); }
.lms-mb-0 { margin-bottom: 0; }
.lms-mb-4 { margin-bottom: var(--lms-space-4); }
.lms-mb-6 { margin-bottom: var(--lms-space-6); }

.lms-text-center { text-align: center; }
.lms-text-sm { font-size: var(--lms-font-size-sm); }
.lms-text-xs { font-size: var(--lms-font-size-xs); }
.lms-text-muted { color: var(--lms-text-muted); }
.lms-text-secondary { color: var(--lms-text-secondary); }
.lms-font-bold { font-weight: 700; }
.lms-font-mono { font-family: var(--lms-font-mono); }

.lms-w-full { width: 100%; }
.lms-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Metric Grid (simple KPI cards) ── */
.lms-metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.lms-metric-card {
    background: var(--lms-surface);
    border: 1px solid var(--lms-border);
    border-radius: var(--lms-radius-lg);
    padding: 14px;
}
.lms-metric-card .lms-metric-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--lms-text);
    line-height: 1.2;
}
.lms-metric-card .lms-metric-label {
    font-size: 10px;
    color: var(--lms-text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-top: 2px;
}

/* ── KPI Cards (Reports) ── */
.lms-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.lms-kpi {
    background: var(--lms-surface);
    border: 1px solid var(--lms-border);
    border-radius: var(--lms-radius-lg);
    padding: 14px;
}
.lms-kpi .lms-kpi-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--lms-text);
    line-height: 1.2;
}
.lms-kpi .lms-kpi-label {
    font-size: 10px;
    color: var(--lms-text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-top: 2px;
}
@media(max-width:768px){
    .lms-kpi-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Search / Filter Bar ── */
.lms-search-box {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}
.lms-search-box input,
.lms-search-box select {
    padding: 6px 10px;
    border: 1.5px solid var(--lms-border);
    border-radius: var(--lms-radius-md);
    font-size: 12px;
    background: var(--lms-surface);
    color: var(--lms-text);
}
.lms-search-box input:focus,
.lms-search-box select:focus {
    border-color: var(--lms-primary);
    outline: none;
    box-shadow: 0 0 0 3px var(--lms-primary-ring);
}

/* ── Pagination ── */
.lms-pagination {
    display: flex;
    gap: 4px;
    margin-top: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
.lms-pagination a,
.lms-pagination span {
    padding: 5px 11px;
    border: 1px solid var(--lms-border);
    border-radius: var(--lms-radius-md);
    font-size: 12px;
    text-decoration: none;
    color: var(--lms-text-secondary);
    transition: .15s;
}
.lms-pagination a:hover {
    background: var(--lms-bg);
    border-color: var(--lms-primary);
    color: var(--lms-primary);
}
.lms-pagination .current {
    background: var(--lms-primary);
    color: var(--lms-text-inverse);
    border-color: var(--lms-primary);
}

/* ── Status Badge Aliases (dynamic status mapping) ── */
.lms-badge-green,
.lms-badge-paid,
.lms-badge-active,
.lms-badge-connected { background: #f0fdf4; color: #16a34a; }
.lms-badge-yellow,
.lms-badge-pending { background: #fefce8; color: #ca8a04; }
.lms-badge-red,
.lms-badge-failed,
.lms-badge-cancelled { background: #fef2f2; color: #dc2626; }
.lms-badge-gray,
.lms-badge-refunded,
.lms-badge-disconnected { background: #f1f5f9; color: #64748b; }

/* ── Gateway Card ── */
.lms-gw-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--lms-border);
    border-radius: var(--lms-radius-lg);
    margin-bottom: 10px;
    background: var(--lms-surface);
}
.lms-gw-card .lms-gw-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--lms-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--lms-text-inverse);
    flex-shrink: 0;
}
.lms-gw-card .lms-gw-info {
    flex: 1;
}
.lms-gw-card .lms-gw-info strong {
    display: block;
    font-size: 14px;
    color: var(--lms-text);
}
.lms-gw-card .lms-gw-info small {
    font-size: 11px;
    color: var(--lms-text-muted);
}
.lms-gw-card .lms-gw-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* ── Tab Panel (alias for tab-content) ── */
.lms-tab-panel { display: none; }
.lms-tab-panel.active { display: block; }

/* ── Subtitle ── */
.lms-subtitle {
    font-size: 11px;
    color: var(--lms-text-muted);
    margin: -8px 0 12px;
}

/* ── Header Bar (shared page header) ── */
.lms-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--lms-border);
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}
.lms-page-header h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--lms-text);
}
.lms-page-header .lms-page-actions {
    display: flex;
    gap: 6px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .lms-grid-3,
    .lms-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .lms-grid-2,
    .lms-grid-3,
    .lms-grid-4 {
        grid-template-columns: 1fr;
    }
    .lms-stat-grid {
        grid-template-columns: 1fr 1fr;
    }
    .lms-modal {
        margin: 20px;
        border-radius: var(--lms-radius-lg);
    }
    .lms-hide-mobile {
        display: none !important;
    }
}
