/* ==========================================================================
   Pedro Pina Registry - Backoffice Styles
   Extends the main site's design tokens from ../styles.css
   ========================================================================== */

/* Passcode Gate */
.bo-gate {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.bo-gate-card {
    max-width: 420px;
    width: 100%;
    background: var(--bg-modal);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 40px 32px;
    text-align: center;
}

.bo-gate-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: var(--radius-full);
    background: var(--primary-glow);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.bo-gate-card h1 {
    font-size: 22px;
    margin-bottom: 8px;
}

.bo-gate-card p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
}

#bo-gate-form {
    display: flex;
    gap: 10px;
}

#bo-gate-input {
    flex: 1;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    font-size: 14px;
}

#bo-gate-input:focus {
    outline: none;
    border-color: var(--border-hover);
}

.bo-gate-error {
    display: block;
    color: #f87171;
    font-size: 13px;
    margin-top: 14px;
}

.bo-gate-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    text-align: left;
    margin-top: 24px !important;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-dim) !important;
    font-size: 12px !important;
    line-height: 1.5;
}

.bo-gate-note i {
    color: var(--warning);
    margin-top: 2px;
}

/* Stats grid reuse, tightened for backoffice header */
.bo-stats-grid {
    margin-bottom: 28px;
}

/* Filter Tabs */
.bo-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.bo-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.bo-tab:hover {
    color: var(--text-main);
}

.bo-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.bo-tab-count {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    font-size: 12px;
    font-weight: 600;
    padding: 1px 8px;
    border-radius: var(--radius-full);
}

.bo-tab.active .bo-tab-count {
    background: var(--primary-glow);
    color: var(--primary);
}

/* Table */
.bo-table-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 40px;
}

.bo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.bo-table th {
    text-align: left;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-dim);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.bo-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.bo-table tbody tr:last-child td {
    border-bottom: none;
}

.bo-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.bo-row-pending {
    background: rgba(245, 158, 11, 0.05);
}

.bo-thumb {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    display: block;
}

.bo-name-cell {
    display: flex;
    flex-direction: column;
}

.bo-name-cell strong {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

.bo-name-cell span {
    font-size: 12px;
    color: var(--text-dim);
}

.bo-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.bo-status-badge.pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.bo-status-badge.approved {
    background: var(--accent-glow);
    color: var(--accent);
}

.bo-actions-col {
    text-align: right;
}

.bo-row-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.bo-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.bo-btn:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.06);
}

.bo-btn-approve {
    color: var(--accent);
    border-color: rgba(16, 185, 129, 0.3);
}

.bo-btn-approve:hover {
    background: var(--accent-glow);
}

.bo-btn-edit {
    color: var(--primary);
    border-color: rgba(139, 92, 246, 0.3);
}

.bo-btn-edit:hover {
    background: var(--primary-glow);
}

.bo-btn-delete {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.3);
}

.bo-btn-delete:hover {
    background: rgba(248, 113, 113, 0.12);
}

.bo-empty-state {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-dim);
}

.bo-empty-state i {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
}

@media (max-width: 720px) {
    .bo-table-wrapper {
        overflow-x: auto;
    }

    .bo-table {
        min-width: 640px;
    }
}
