/* ===== NEOX Button System ===== */

.neox-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm, 8px);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.4;
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
    transition: all var(--transition-fast, 150ms ease);
    position: relative;
    outline: none;
}

.neox-btn:focus-visible {
    box-shadow: 0 0 0 2px var(--bg-primary, #0a0a0b), 0 0 0 4px var(--accent-blue, #3b82f6);
}

.neox-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* --- Primary: solid blue, for main actions (Create, Save) --- */

.neox-btn-primary {
    background: var(--accent-blue, #3b82f6);
    color: #fff;
    border-color: var(--accent-blue, #3b82f6);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.neox-btn-primary:hover:not(:disabled) {
    background: var(--accent-blue-hover, #2563eb);
    border-color: var(--accent-blue-hover, #2563eb);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.neox-btn-primary:active:not(:disabled) {
    background: #1d4ed8;
    border-color: #1d4ed8;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
    transform: translateY(0.5px);
}

/* --- Secondary: ghost with border, for secondary actions (Edit, Cancel) --- */

.neox-btn-secondary {
    background: var(--bg-card, #18181b);
    color: var(--text-secondary, #a1a1aa);
    border-color: var(--border-color, #27272a);
}

.neox-btn-secondary:hover:not(:disabled) {
    background: var(--bg-hover, #1f1f23);
    color: var(--text-primary, #fafafa);
    border-color: var(--border-light, #3f3f46);
}

.neox-btn-secondary:active:not(:disabled) {
    background: #27272a;
    transform: translateY(0.5px);
}

/* --- Danger: red, for destructive actions (Delete, Deactivate) --- */

.neox-btn-danger {
    background: transparent;
    color: var(--accent-red, #ef4444);
    border-color: rgba(239, 68, 68, 0.4);
}

.neox-btn-danger:hover:not(:disabled) {
    background: var(--accent-red, #ef4444);
    color: #fff;
    border-color: var(--accent-red, #ef4444);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.neox-btn-danger:active:not(:disabled) {
    background: #dc2626;
    border-color: #dc2626;
    transform: translateY(0.5px);
}

/* --- Danger solid variant: for confirm dialogs --- */

.neox-btn-danger-solid {
    background: var(--accent-red, #ef4444);
    color: #fff;
    border-color: var(--accent-red, #ef4444);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.neox-btn-danger-solid:hover:not(:disabled) {
    background: #dc2626;
    border-color: #dc2626;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.neox-btn-danger-solid:active:not(:disabled) {
    background: #b91c1c;
    border-color: #b91c1c;
    transform: translateY(0.5px);
}

/* --- Success: green, for approval/confirm positive actions --- */

.neox-btn-success {
    background: #22c55e;
    color: #fff;
    border-color: #22c55e;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.neox-btn-success:hover:not(:disabled) {
    background: #16a34a;
    border-color: #16a34a;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.neox-btn-success:active:not(:disabled) {
    background: #15803d;
    border-color: #15803d;
    transform: translateY(0.5px);
}

/* --- Size: small for detail panels and tight spaces --- */

.neox-btn-sm {
    padding: 5px 12px;
    font-size: 0.75rem;
    border-radius: 6px;
}

/* --- Spinner inside buttons --- */

.neox-btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: neox-btn-spin 0.6s linear infinite;
}

@keyframes neox-btn-spin {
    to { transform: rotate(360deg); }
}

/* ===== Action Bar ===== */

.neox-action-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 0 10px 0;
}
