/* NSLDNK Activity Board — Component Styles */

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all var(--transition);
}

.card:hover {
    border-color: rgba(59, 130, 246, 0.3);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-actions {
    display: flex;
    gap: 4px;
}

.card-body {
    min-height: 200px;
    position: relative;
}

/* KPI Cards */
.kpi-card {
    display: flex;
    flex-direction: column;
}

.kpi-value {
    font-size: 32px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-primary);
    line-height: 1.2;
}

.kpi-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.kpi-change {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
}

.kpi-change.positive { color: var(--accent-success); }
.kpi-change.negative { color: var(--accent-danger); }

.kpi-sparkline {
    height: 40px;
    margin-top: auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-icon {
    padding: 6px;
    aspect-ratio: 1;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
}

.btn-ghost:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.btn-ghost.active {
    background: var(--bg-card);
    color: var(--accent-primary);
}

/* Badges & Pills */
.badge, .pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 500;
}

.pill-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-success);
}

.pill-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-warning);
}

.pill-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-danger);
}

.pill-info {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-primary);
}

/* Data Tables */
.table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th {
    text-align: left;
    padding: 10px 12px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card);
    position: sticky;
    top: 0;
}

.data-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.data-table th.sortable:hover {
    color: var(--text-secondary);
}

.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}

.data-table tbody tr:hover td {
    background: var(--bg-card-hover);
}

.data-table tbody tr[style*="cursor"] td {
    cursor: pointer;
}

/* Inputs */
.search-input {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 8px 12px 8px 36px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    width: 240px;
    transition: all var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.select-input {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 8px 12px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
}

/* Date Picker */
.date-picker {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.date-preset {
    font-size: 12px;
    padding: 4px 10px;
}

.date-input {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    color: var(--text-primary);
    font-size: 12px;
    font-family: inherit;
}

.date-input::-webkit-calendar-picker-indicator {
    filter: invert(0.7);
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    font-size: 12px;
    color: var(--text-secondary);
}

.filter-pill .remove {
    cursor: pointer;
    opacity: 0.6;
    font-size: 14px;
    line-height: 1;
}

.filter-pill .remove:hover {
    opacity: 1;
    color: var(--accent-danger);
}

/* Loading States */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-card) 25%,
        var(--bg-card-hover) 50%,
        var(--bg-card) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius);
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    animation: fadeIn 200ms ease;
    max-width: 360px;
}

.toast-success { border-left: 3px solid var(--accent-success); }
.toast-error { border-left: 3px solid var(--accent-danger); }
.toast-info { border-left: 3px solid var(--accent-primary); }

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    animation: fadeIn 150ms ease;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    color: var(--text-muted);
    text-align: center;
}

.empty-state h2 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

/* Chart Container */
.chart-container {
    width: 100%;
    min-height: 280px;
    position: relative;
}

/* Keyboard Help */
.shortcut-help-overlay kbd {
    display: inline-block;
    padding: 2px 6px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 11px;
}

/* Status indicators */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.online { background: var(--accent-success); }
.status-dot.offline { background: var(--accent-danger); }
.status-dot.pending { background: var(--accent-warning); }
