/**
 * gitwriter Admin Styles
 *
 * Styles for admin pages using the doc-style layout.
 */

/* Admin Page Header */
.admin-page-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--bf-gray-200);
}

.admin-page-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.125rem;
}

.admin-page-subtitle {
    font-size: 0.875rem;
    color: var(--bf-gray-600);
    margin-bottom: 0;
}

/* Stat Cards */
.stat-card {
    border: 1px solid var(--bf-gray-200);
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 2px;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.bg-primary-subtle {
    background: rgba(37, 99, 235, 0.1);
    color: var(--bf-primary);
}

.bg-success-subtle {
    background: rgba(16, 185, 129, 0.1);
    color: var(--bf-success);
}

.bg-warning-subtle {
    background: rgba(245, 158, 11, 0.1);
    color: var(--bf-warning);
}

.bg-info-subtle {
    background: rgba(59, 130, 246, 0.1);
    color: var(--bf-info);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--bf-gray-600);
}

/* Activity List */
.activity-list {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--bf-gray-200);
}

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

.activity-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 2px;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-text {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.activity-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--bf-gray-500);
}

/* Tables */
.bf-doc-content .table th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bf-gray-600);
    background: var(--bf-gray-50);
    border-bottom-width: 1px;
}

.bf-doc-content .table td {
    vertical-align: middle;
    padding: 0.75rem 1rem;
}

/* Book Cover */
.book-cover-sm {
    width: 40px;
    height: 50px;
    border-radius: 2px;
    overflow: hidden;
    background: var(--bf-gray-100);
}

.book-cover-sm img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--bf-gray-500);
}

/* Organization Cards */
.org-card {
    transition: box-shadow 0.15s ease;
}

.org-card:hover {
    box-shadow: var(--bf-shadow);
}

/* User Menu Button (legacy compat) */
.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    color: var(--bf-gray-700);
}

.user-menu-btn:hover {
    color: var(--bf-gray-900);
}

/* Clickable table rows */
.book-row {
    cursor: pointer;
}

/* Row action buttons — all actions visible, never hidden in a dropdown */
.row-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    justify-content: flex-end;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: var(--bf-radius);
    background: transparent;
    color: var(--bf-gray-600);
    transition: background-color var(--bf-transition-fast), color var(--bf-transition-fast), border-color var(--bf-transition-fast);
}

.action-btn:hover,
.action-btn:focus-visible {
    background: var(--bf-gray-100);
    border-color: var(--bf-gray-300);
    color: var(--bf-gray-900);
    outline: none;
}

.action-btn-warning:hover,
.action-btn-warning:focus-visible {
    background: rgba(255, 193, 7, 0.12);
    border-color: var(--bf-warning);
    color: #b8860b;
}

.action-btn-danger:hover,
.action-btn-danger:focus-visible {
    background: rgba(220, 53, 69, 0.1);
    border-color: var(--bf-danger);
    color: var(--bf-danger);
}

/* Responsive */
@media (max-width: 768px) {
    .stat-card .stat-value {
        font-size: 1.5rem;
    }
}
