/* Suppress :active flashes from synthetic clicks that leak in from the
   tap that opened the modal (see armOnFirstPointerdown in utils/modal.js).
   Buttons receive no pointer events until the modal sees a fresh pointerdown,
   which the modal-content catches because the buttons let the event fall through. */
.modal-pre-arm button {
    pointer-events: none;
}

/* Bulk Actions Toolbar */
.bulk-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.bulk-actions #selected-count {
    font-weight: 500;
    color: var(--text-color);
}

/* Checkbox column in tables */
.checkbox-col {
    width: 40px;
    text-align: center;
}

.checkbox-col input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Archived article row styling */
.admin-table tr.archived {
    background: #fef3c7;
}

@media (hover: hover) {
.admin-table tr.archived:hover {
    background: #fde68a;
}
}

/* Disabled checkbox row (when selection mode is active) */
.admin-table tr.checkbox-disabled {
    opacity: 0.5;
}

.admin-table tr.checkbox-disabled .article-checkbox {
    cursor: not-allowed;
}

/* Status label for archived */
.status-archived {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    font-size: 0.75rem;
    border-radius: 3px;
    background: var(--warning-color);
    color: white;
}

/* Terminal device status badges */
.status-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 4px;
    font-weight: 500;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-approved {
    background: #d1fae5;
    color: #065f46;
}

.status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.status-neutral {
    background: #e5e7eb;
    color: #374151;
}

/* Terminal registration codes */
.terminal-codes-section {
    margin-top: 1.5rem;
}

.terminal-codes-section .section-title {
    margin: 0;
}

.terminal-codes-section .section-help {
    font-size: 0.85rem;
    color: var(--text-secondary, #6b7280);
    margin: 0 0 0.75rem 0;
}

.code-row-used,
.code-row-expired,
.code-row-revoked {
    color: #6b7280;
}

.generated-code {
    background: linear-gradient(180deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    margin-bottom: 1rem;
}

.generated-code-label {
    font-size: 0.9rem;
    color: #92400e;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    font-weight: 600;
}

.generated-code-value {
    font-size: 4rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: 0.6rem;
    font-weight: 700;
    color: #78350f;
    line-height: 1.1;
    user-select: all;
    cursor: pointer;
}

.generated-code-value-half {
    display: inline-block;
}

.generated-code-value-gap {
    display: inline-block;
    width: 1.5rem;
}

.generated-code-meta {
    font-size: 0.85rem;
    color: #92400e;
    margin-top: 0.75rem;
}

.generated-code-copy {
    margin-top: 0.75rem;
}

.generated-code-help {
    font-size: 0.85rem;
    color: #6b7280;
    text-align: center;
    margin-bottom: 1rem;
}

.terminal-filters {
    display: flex;
    gap: 0.5rem;
}

.btn-filter {
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

.btn-filter.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.badge-count {
    display: inline-block;
    min-width: 1.2rem;
    padding: 0.1rem 0.3rem;
    background: var(--danger-color);
    color: white;
    border-radius: 10px;
    font-size: 0.7rem;
    text-align: center;
    margin-left: 0.2rem;
}

.device-info {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--secondary-color);
}

.btn-approve {
    background: var(--success-color);
    color: white;
    border: none;
}

.btn-reject,
.btn-revoke {
    background: var(--danger-color);
    color: white;
    border: none;
}

/* Restore button */
.btn-sm.btn-restore {
    background: var(--success-color);
}

@media (hover: hover) {
.btn-sm.btn-restore:hover {
    background: #059669;
}
}

/* Warning button */
.btn-sm.btn-warning {
    background: var(--warning-color);
}

@media (hover: hover) {
.btn-sm.btn-warning:hover {
    background: #d97706;
}
}

/* Filter checkbox in toolbar */
.filter-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
}

.filter-checkbox input {
    cursor: pointer;
}

/* Modal body for scrollable content */
.modal-body {
    padding: 1rem 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}
