/* Admin Panel Styles */

.admin-section {
    margin-bottom: 24px;
}

.admin-section-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-text);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 14px 8px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-card--alert {
    border-color: var(--color-danger);
    background: #ffebee;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.stat-card--alert .stat-value {
    color: var(--color-danger);
}

.stat-label {
    font-size: 13px;
    color: var(--color-text-secondary);
}

/* Tabs */
.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.admin-tab {
    flex: 1;
    min-width: 80px;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-surface);
    color: var(--color-text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}

.admin-tab.active {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: white;
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
}

/* Admin Cards */
.admin-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
}

.admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.admin-card-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    flex: 1;
}

.admin-card-actions {
    display: flex;
    gap: 6px;
}

.admin-card-meta {
    font-size: 13px;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
}

.admin-card-desc {
    font-size: 14px;
    color: var(--color-text);
    margin-bottom: 10px;
    line-height: 1.4;
}

/* Small buttons */
.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 8px;
    width: auto;
}

.btn--secondary {
    background: var(--color-bg);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn--secondary:hover {
    background: var(--color-border);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-body {
    position: relative;
    background: var(--color-surface);
    border-radius: 20px 20px 0 0;
    padding: 20px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.2s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: 16px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-actions .btn {
    flex: 1;
}

/* Status badges */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge--active {
    background: #e8f5e9;
    color: var(--color-primary-dark);
}

.badge--inactive {
    background: #f5f5f5;
    color: var(--color-text-secondary);
}

.badge--alert {
    background: #ffebee;
    color: var(--color-danger);
}

.badge--resolved {
    background: #e8f5e9;
    color: var(--color-primary-dark);
}

.badge--info {
    background: #e3f2fd;
    color: #1565c0;
}

/* User row */
.user-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    margin-bottom: 8px;
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-primary-light);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    font-size: var(--font-size-base);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-meta {
    font-size: 13px;
    color: var(--color-text-secondary);
}

/* Responsive */
@media (max-width: 360px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
